content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
rm(list=ls(all=TRUE))
data <- read.csv("customer.csv", header=T, sep=",")
summary(data)
data$region = factor(data$region)
data$gender = factor(data$gender)
data$edcat = factor(data$edcat)
data$age = factor(data$age)
table(data$gender, data$region)
# Question 1
Q1 = select(data, region, card2spent) %>%
gro... | /customer.R | no_license | NTU-CSX-DataScience/pecu | R | false | false | 723 | r | rm(list=ls(all=TRUE))
data <- read.csv("customer.csv", header=T, sep=",")
summary(data)
data$region = factor(data$region)
data$gender = factor(data$gender)
data$edcat = factor(data$edcat)
data$age = factor(data$age)
table(data$gender, data$region)
# Question 1
Q1 = select(data, region, card2spent) %>%
gro... |
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#
## 1. Loading Required Libraries
library(readxl)
library(tidyverse)
library(xgboost)
library(caret)
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#
## 2. Loading required ... | /Best_Model.R | no_license | shreya-apte/Prediction-of-rate-of-spread-of-Covid--19 | R | false | false | 3,117 | r | #$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#
## 1. Loading Required Libraries
library(readxl)
library(tidyverse)
library(xgboost)
library(caret)
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#
## 2. Loading required ... |
#!/usr/bin/env Rscript
library(methylKit)
library(graphics)
library(tools)
#install.packages("dendextend")
library(dendextend)
setwd("/home/stenger/stenger_data/EPIGENETIC_DATA/05_02_bismark")
load("Allmeth.norm.rda")
hc2 <- clusterSamples(Allmeth.norm, dist="correlation", method="ward", plot=TRUE)
#dat <- read.tab... | /00_scripts/21_comparative_hclust_02.R | no_license | PLStenger/Acropora_digitifera_BS_Seq | R | false | false | 8,163 | r | #!/usr/bin/env Rscript
library(methylKit)
library(graphics)
library(tools)
#install.packages("dendextend")
library(dendextend)
setwd("/home/stenger/stenger_data/EPIGENETIC_DATA/05_02_bismark")
load("Allmeth.norm.rda")
hc2 <- clusterSamples(Allmeth.norm, dist="correlation", method="ward", plot=TRUE)
#dat <- read.tab... |
if (!file.exists("./project1"))
dir.create("./project1")
# setwd("./project1")
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",destfile="./project1/data.zip",method='curl')
file <- as.character(unzip("./project1/data.zip", list=TRUE)[1])
unzip("./project1/data.z... | /plot2.R | no_license | daghan/ExData_Plotting1 | R | false | false | 1,062 | r | if (!file.exists("./project1"))
dir.create("./project1")
# setwd("./project1")
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",destfile="./project1/data.zip",method='curl')
file <- as.character(unzip("./project1/data.zip", list=TRUE)[1])
unzip("./project1/data.z... |
#install.packages("text2vec")
#install.packages("tm")
#install.packages("magrittr")
#install.packages("wordcloud")
#install.packages("stopwords", dependencies = TRUE)
library("stopwords")
library(text2vec)
library(tm)
library(magrittr)
library(wordcloud)
#EDIT this row
my_file <- "my_Scopus_TSE_articles_clean_data.RDa... | /WordCloud.R | no_license | Skippari/TrendMining | R | false | false | 993 | r | #install.packages("text2vec")
#install.packages("tm")
#install.packages("magrittr")
#install.packages("wordcloud")
#install.packages("stopwords", dependencies = TRUE)
library("stopwords")
library(text2vec)
library(tm)
library(magrittr)
library(wordcloud)
#EDIT this row
my_file <- "my_Scopus_TSE_articles_clean_data.RDa... |
#install.packages("rdrobust")
library("rdrobust")
data(rdrobust_RDsenate)
attach(rdrobust_RDsenate)
rdbwselect(vote,margin)
rdrobust(vote,margin)
rdplot(vote,margin,x.label = "Violence",y.label = "Arboviral Risk",title = "RD Arboviral risk vs Violence",c=0)
| /k01/rd model.R | no_license | amyrobyn/LaBeaud_Lab | R | false | false | 258 | r | #install.packages("rdrobust")
library("rdrobust")
data(rdrobust_RDsenate)
attach(rdrobust_RDsenate)
rdbwselect(vote,margin)
rdrobust(vote,margin)
rdplot(vote,margin,x.label = "Violence",y.label = "Arboviral Risk",title = "RD Arboviral risk vs Violence",c=0)
|
# STUDY 2: YOUNGER CHILDREN
# read in & tidy data
d2_46 <- read.csv("./anonymized_data/study2_children46_anonymized.csv") %>%
mutate(age = as.numeric(as.character(age))) %>%
filter(((age >= 4 & age < 7) | is.na(age)),
# character %in% c("beetle", "robot"),
!grepl("metal", capWording),
!g... | /manuscript/scripts/data_s2_46.R | no_license | kgweisman/dimkid | R | false | false | 3,037 | r | # STUDY 2: YOUNGER CHILDREN
# read in & tidy data
d2_46 <- read.csv("./anonymized_data/study2_children46_anonymized.csv") %>%
mutate(age = as.numeric(as.character(age))) %>%
filter(((age >= 4 & age < 7) | is.na(age)),
# character %in% c("beetle", "robot"),
!grepl("metal", capWording),
!g... |
#fread
#suppose to be the fastest, will see.
library(data.table)
b=fread("BigDiamonds.csv")
head(b)
library(readr)
system.time(read_csv("BigDiamonds.csv"))
system.time(fread("BigDiamonds.csv"))
system.time(read.csv("BigDiamonds.csv"))
| /R/fread.R | no_license | Decision-Stats/s15_codes | R | false | false | 236 | r | #fread
#suppose to be the fastest, will see.
library(data.table)
b=fread("BigDiamonds.csv")
head(b)
library(readr)
system.time(read_csv("BigDiamonds.csv"))
system.time(fread("BigDiamonds.csv"))
system.time(read.csv("BigDiamonds.csv"))
|
\name{Multinomial regression}
\alias{multinom.reg}
\title{
Multinomial regression
}
\description{
Multinomial regression.
}
\usage{
multinom.reg(y, x, tol = 1e-07, maxiters = 50)
}
\arguments{
\item{y}{
The response variable. A numerical or a factor type vector.
}
\item{x}{
A matrix or a data.fram... | /fuzzedpackages/Rfast/man/multinom.reg.Rd | no_license | akhikolla/testpackages | R | false | false | 1,362 | rd | \name{Multinomial regression}
\alias{multinom.reg}
\title{
Multinomial regression
}
\description{
Multinomial regression.
}
\usage{
multinom.reg(y, x, tol = 1e-07, maxiters = 50)
}
\arguments{
\item{y}{
The response variable. A numerical or a factor type vector.
}
\item{x}{
A matrix or a data.fram... |
library(nnet)
data <- read.csv("customers.csv");
data <- data[
data$Gender!='NULL' &
data$Marital.Status!='NULL' &
data$Home.Ownership!='NULL' &
data$Education.Level!='NULL',
];
data$Gender <- factor(data$Gender)
data$Marital.Status <- factor(data$Marital.Status)
data$Home.Ownership <- ... | /3.5/code1.R | no_license | adam077/data_mining_by_R | R | false | false | 1,077 | r | library(nnet)
data <- read.csv("customers.csv");
data <- data[
data$Gender!='NULL' &
data$Marital.Status!='NULL' &
data$Home.Ownership!='NULL' &
data$Education.Level!='NULL',
];
data$Gender <- factor(data$Gender)
data$Marital.Status <- factor(data$Marital.Status)
data$Home.Ownership <- ... |
#' Search PLoS Journals by article views.
#'
#' @export
#' @import httr
#' @param search search terms (character)
#' @param byfield field to search by, e.g., subject, author, etc. (character)
#' @param views views all time (alltime) or views last 30 days (last30)
#' (character)
#' @param limit number of results to r... | /R/plosviews.R | permissive | akram-mohammed/rplos | R | false | false | 1,553 | r | #' Search PLoS Journals by article views.
#'
#' @export
#' @import httr
#' @param search search terms (character)
#' @param byfield field to search by, e.g., subject, author, etc. (character)
#' @param views views all time (alltime) or views last 30 days (last30)
#' (character)
#' @param limit number of results to r... |
##' Split a Vector of Strings Following a Regular Structure
##'
##' This function takes a vector of strings following a regular
##' structure, and converts that vector into a \code{data.frame}, split
##' on that delimiter. A nice wrapper to \code{\link{strsplit}}, essentially
##' - the primary bonus is the automatic... | /R/str_split.R | no_license | dpastoor/Kmisc | R | false | false | 1,862 | r | ##' Split a Vector of Strings Following a Regular Structure
##'
##' This function takes a vector of strings following a regular
##' structure, and converts that vector into a \code{data.frame}, split
##' on that delimiter. A nice wrapper to \code{\link{strsplit}}, essentially
##' - the primary bonus is the automatic... |
# taken from EM_function_v6.R , and adapted
fitEM <- function(y, X.t, Z.t, K = NULL, Vg = NULL, Ve = NULL,
cov.error = TRUE, stop.if.significant = FALSE,
null.dev = NULL, alpha = 0.01, max.iter = 100,
Vg.start = NULL, ... | /R/fitEM.R | no_license | cran/pcgen | R | false | false | 8,217 | r | # taken from EM_function_v6.R , and adapted
fitEM <- function(y, X.t, Z.t, K = NULL, Vg = NULL, Ve = NULL,
cov.error = TRUE, stop.if.significant = FALSE,
null.dev = NULL, alpha = 0.01, max.iter = 100,
Vg.start = NULL, ... |
\name{predict}
\alias{predict.JMbayes}
\title{Predictions for Joint Models}
\description{
Calculates predicted values for the longitudinal part of a joint model.
}
\usage{
\method{predict}{JMbayes}(object, newdata, type = c("Marginal", "Subject"),
interval = c("none", "confidence", "prediction"), level = 0.95... | /man/predict.Rd | no_license | TobiasPolak/JMbayes | R | false | false | 6,244 | rd | \name{predict}
\alias{predict.JMbayes}
\title{Predictions for Joint Models}
\description{
Calculates predicted values for the longitudinal part of a joint model.
}
\usage{
\method{predict}{JMbayes}(object, newdata, type = c("Marginal", "Subject"),
interval = c("none", "confidence", "prediction"), level = 0.95... |
# script to examine efficacy of surface sterilization procedure
# init: 2019-AUG-28
# PTH
# ------ #
# header #
# ------ #
library(dplyr)
library(tidyr)
library(ggplot2)
library(lme4)
library(lmerTest)
# ---------------- #
# data preparation #
# ---------------- #
# first, load up output from DADA2 which contains s... | /scripts/run_surface_steril_analysis.R | permissive | xiaotuxiaotu520/coinfection | R | false | false | 9,076 | r | # script to examine efficacy of surface sterilization procedure
# init: 2019-AUG-28
# PTH
# ------ #
# header #
# ------ #
library(dplyr)
library(tidyr)
library(ggplot2)
library(lme4)
library(lmerTest)
# ---------------- #
# data preparation #
# ---------------- #
# first, load up output from DADA2 which contains s... |
# Author: Robert J. Hijmans
# Date : June 2008
# Version 0.9
# Licence GPL v3
setMethod("plot", signature(x='Raster', y='Raster'),
function(x, y, maxpixels=100000, cex, xlab, ylab, nc, nr, maxnl=16, main, add=FALSE, gridded=FALSE, ncol=25, nrow=25, ...) {
compareRaster(c(x, y), extent=TRUE, rowcol=T... | /R/plot2rasters.R | no_license | cran/raster | R | false | false | 4,106 | r | # Author: Robert J. Hijmans
# Date : June 2008
# Version 0.9
# Licence GPL v3
setMethod("plot", signature(x='Raster', y='Raster'),
function(x, y, maxpixels=100000, cex, xlab, ylab, nc, nr, maxnl=16, main, add=FALSE, gridded=FALSE, ncol=25, nrow=25, ...) {
compareRaster(c(x, y), extent=TRUE, rowcol=T... |
\name{readTableNoRowNames}
\alias{readTableNoRowNames}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Quickly read a rectangular table that has column names.
}
\description{
Quickly read a rectangular table that has column names.
}
\usage{
readTableNoRowNames(tableFile, what = character(), setNu... | /reference/scripts/xhmmScripts/man/readTableNoRowNames.Rd | no_license | jixuan-wang/jxcnv | R | false | false | 856 | rd | \name{readTableNoRowNames}
\alias{readTableNoRowNames}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Quickly read a rectangular table that has column names.
}
\description{
Quickly read a rectangular table that has column names.
}
\usage{
readTableNoRowNames(tableFile, what = character(), setNu... |
#loading packages
library(ranger)
library(caret)
library(ROCR)
library(e1071)
library(doParallel)
library(randomForest)
#using all cores
cl <- makePSOCKcluster(4)
registerDoParallel(cl)
##########################################################
#splitting data set to train and test set
split_index <- createDataPartiti... | /R_CODE_PROJECT_FILES/randomForest.R | no_license | musanyaks/Titanic-Machine-Learning | R | false | false | 2,494 | r | #loading packages
library(ranger)
library(caret)
library(ROCR)
library(e1071)
library(doParallel)
library(randomForest)
#using all cores
cl <- makePSOCKcluster(4)
registerDoParallel(cl)
##########################################################
#splitting data set to train and test set
split_index <- createDataPartiti... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/subsetByCNVprofile.R
\name{subsetByCNVprofile}
\alias{subsetByCNVprofile}
\title{Get IDs of a subset of models}
\usage{
subsetByCNVprofile(hmms, profile)
}
\arguments{
\item{hmms}{A list of \code{\link{aneuHMM}} objects or a character vector ... | /man/subsetByCNVprofile.Rd | no_license | ataudt/aneufinder | R | false | true | 1,347 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/subsetByCNVprofile.R
\name{subsetByCNVprofile}
\alias{subsetByCNVprofile}
\title{Get IDs of a subset of models}
\usage{
subsetByCNVprofile(hmms, profile)
}
\arguments{
\item{hmms}{A list of \code{\link{aneuHMM}} objects or a character vector ... |
\name{extract.deltas}
\alias{extract.deltas}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Extract Master's Delta parameters from a TAM model.
}
\description{
This function takes as its input a TAM object. It adds reads the TAM item parameters and organizes them into a matrix that can be used a... | /man/extract.deltas.Rd | permissive | david-ti/wrightmap | R | false | false | 2,526 | rd | \name{extract.deltas}
\alias{extract.deltas}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Extract Master's Delta parameters from a TAM model.
}
\description{
This function takes as its input a TAM object. It adds reads the TAM item parameters and organizes them into a matrix that can be used a... |
## Storing the data
powerConsumption <- read.table("household_power_consumption.txt", skip=1, sep=";")
## Giving heading names to the data
names(powerConsumption) <- c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_metering_3")
#... | /plot3.R | no_license | dkchacha/ExData_Plotting1 | R | false | false | 1,601 | r | ## Storing the data
powerConsumption <- read.table("household_power_consumption.txt", skip=1, sep=";")
## Giving heading names to the data
names(powerConsumption) <- c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_metering_3")
#... |
#
# This test file has been generated by kwb.test::create_test_files()
#
test_that("import_table_metadata() works", {
expect_error(
kwb.readxl:::import_table_metadata()
# argument "file" is missing, with no default
)
})
| /tests/testthat/test-function-import_table_metadata.R | permissive | KWB-R/kwb.readxl | R | false | false | 236 | r | #
# This test file has been generated by kwb.test::create_test_files()
#
test_that("import_table_metadata() works", {
expect_error(
kwb.readxl:::import_table_metadata()
# argument "file" is missing, with no default
)
})
|
#' thredds: Crawler for Navigating THREDDS Catalogs
#'
#' A limited crawler for programmatically navigating THREDDS catalogs.
#'
#' @name thredds
#' @docType package
#' @import R6
#' @import rlang
#' @import httr
#' @importFrom magrittr %>%
NULL
| /R/thredds-package.R | permissive | BigelowLab/thredds | R | false | false | 246 | r | #' thredds: Crawler for Navigating THREDDS Catalogs
#'
#' A limited crawler for programmatically navigating THREDDS catalogs.
#'
#' @name thredds
#' @docType package
#' @import R6
#' @import rlang
#' @import httr
#' @importFrom magrittr %>%
NULL
|
# Building a Prod-Ready, Robust Shiny Application.
#
# README: each step of the dev files is optional, and you don't have to
# fill every dev scripts before getting started.
# 01_start.R should be filled at start.
# 02_dev.R should be used to keep track of your development during the project.
# 03_deploy.R should b... | /dev/01_start.R | permissive | ChrisBeeley/shinymde | R | false | false | 2,252 | r | # Building a Prod-Ready, Robust Shiny Application.
#
# README: each step of the dev files is optional, and you don't have to
# fill every dev scripts before getting started.
# 01_start.R should be filled at start.
# 02_dev.R should be used to keep track of your development during the project.
# 03_deploy.R should b... |
#######################
### Einleitung und Wiederholung KliPPs
# von Kai Nehler
#### Wiederholung in R ----
1 + 2 # Addition
3 == 4 # Logische Abfrage auf Gleichheit
## Funktionen und Argumente
sum(1, 2) # Addition durch Funktion
log(x = 23, base = 10) # Benennung von Argumenten
## Hilfe
?log
## Objekte un... | /content/post/KliPPs_MSc5a_R_Files/1_einleitung-und-wiederholung_RCode.R | no_license | martscht/projekte | R | false | false | 3,256 | r | #######################
### Einleitung und Wiederholung KliPPs
# von Kai Nehler
#### Wiederholung in R ----
1 + 2 # Addition
3 == 4 # Logische Abfrage auf Gleichheit
## Funktionen und Argumente
sum(1, 2) # Addition durch Funktion
log(x = 23, base = 10) # Benennung von Argumenten
## Hilfe
?log
## Objekte un... |
#' Generate IndX and mR charts.
#'
#' @references Engineering Statistics Handbook 6.3.2, NIST/SEMATECH e-Handbook of Statistical Methods National Institute of Standards and Technology, Dec 2006
#' @references https://en.wikipedia.org/wiki/Nelson_rules
#' @references Lloyd S. Nelson, "Technical Aids," Journal of Quality... | /R/spcRules.R | no_license | pplupo/processcontrol | R | false | false | 10,206 | r | #' Generate IndX and mR charts.
#'
#' @references Engineering Statistics Handbook 6.3.2, NIST/SEMATECH e-Handbook of Statistical Methods National Institute of Standards and Technology, Dec 2006
#' @references https://en.wikipedia.org/wiki/Nelson_rules
#' @references Lloyd S. Nelson, "Technical Aids," Journal of Quality... |
##' cohort2pool function
##'Calculates total biomass using veg cohort file.
##'
##' @export
##' @param veg_file path to standard cohort veg_file
##' @param allom_param parameters for allometric equation, a and b. Based on base-10 log-log linear model (power law)
##' @author Saloni Shah
##' @examples
##' \dontrun{
##' ... | /modules/data.land/R/cohort2pool.R | permissive | ashiklom/pecan | R | false | false | 1,576 | r | ##' cohort2pool function
##'Calculates total biomass using veg cohort file.
##'
##' @export
##' @param veg_file path to standard cohort veg_file
##' @param allom_param parameters for allometric equation, a and b. Based on base-10 log-log linear model (power law)
##' @author Saloni Shah
##' @examples
##' \dontrun{
##' ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/asDataFrame.R
\name{as.data.frame}
\alias{as.data.frame}
\alias{as.data.frame.listOfBlueprints}
\alias{as.data.frame.listOfFeaturelists}
\alias{as.data.frame.listOfModels}
\alias{as.data.frame.projectSummaryList}
\alias{as.data.frame.listOfDa... | /man/as.data.frame.Rd | no_license | anno526/datarobot | R | false | true | 3,248 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/asDataFrame.R
\name{as.data.frame}
\alias{as.data.frame}
\alias{as.data.frame.listOfBlueprints}
\alias{as.data.frame.listOfFeaturelists}
\alias{as.data.frame.listOfModels}
\alias{as.data.frame.projectSummaryList}
\alias{as.data.frame.listOfDa... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/svd_cov.R
\name{postprocess_preds}
\alias{postprocess_preds}
\title{Extract predictions from X_hat matrix}
\usage{
postprocess_preds(X_hat, newdata)
}
\arguments{
\item{X_hat}{A user x track matrix with predictions.}
\item{newdata}{A... | /emi/man/postprocess_preds.Rd | no_license | krisrs1128/multitable_emi | R | false | false | 762 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/svd_cov.R
\name{postprocess_preds}
\alias{postprocess_preds}
\title{Extract predictions from X_hat matrix}
\usage{
postprocess_preds(X_hat, newdata)
}
\arguments{
\item{X_hat}{A user x track matrix with predictions.}
\item{newdata}{A... |
###################################################
# ecological functions, graphed #
# adapted from B. Bolker, 2008 #
# #
# 0. print directory, parameter values, and par() #
# 1. piecewise polynomial functions #
# ... | /R/EcologicalFunctions_OnePage.R | no_license | dispersing/dispersing.github.io_old | R | false | false | 11,811 | r | ###################################################
# ecological functions, graphed #
# adapted from B. Bolker, 2008 #
# #
# 0. print directory, parameter values, and par() #
# 1. piecewise polynomial functions #
# ... |
#' Add variant effect prediction
#'
#' Experimental, use with caution
#'
#' @param cds Coding sequence coordinates
#' @param vcf Data frame of variants from a variant call format file
#' @param genome A genome reference compatible with [get_genomic_sequence]
#'
#' @details
#'
#' `cds`, `vcf`, and `genome` should have m... | /R/predict-variant-effect.R | no_license | EricBryantPhD/mutagenesis | R | false | false | 7,588 | r | #' Add variant effect prediction
#'
#' Experimental, use with caution
#'
#' @param cds Coding sequence coordinates
#' @param vcf Data frame of variants from a variant call format file
#' @param genome A genome reference compatible with [get_genomic_sequence]
#'
#' @details
#'
#' `cds`, `vcf`, and `genome` should have m... |
## This function culculates the inverse of a matrix and if the inversed of this matrix has already ## been culculated previously returns the results from the cache (where has store the results
## from previous calculation).
## This function stores an inverse of matrix x in the variable 'xinv'.
## Then uses a set fun... | /cachematrix.R | no_license | kate19/ProgrammingAssignment2 | R | false | false | 1,256 | r | ## This function culculates the inverse of a matrix and if the inversed of this matrix has already ## been culculated previously returns the results from the cache (where has store the results
## from previous calculation).
## This function stores an inverse of matrix x in the variable 'xinv'.
## Then uses a set fun... |
#' Minimal TMB example, MLE estimation to find the mean and variance of a normally distributed variable
#'
#' @return Nothing
#' @importFrom stats nlminb
#' @importFrom TMB sdreport
#' @export
run_minimal <- function(){
data <- list(x = rivers)
parameters <- list(mu = 0, logSigma = 0)
obj <- MakeADFun(data, param... | /R/minimal.R | no_license | cgrandin/tmbcompilationmwe | R | false | false | 453 | r | #' Minimal TMB example, MLE estimation to find the mean and variance of a normally distributed variable
#'
#' @return Nothing
#' @importFrom stats nlminb
#' @importFrom TMB sdreport
#' @export
run_minimal <- function(){
data <- list(x = rivers)
parameters <- list(mu = 0, logSigma = 0)
obj <- MakeADFun(data, param... |
### likes of post_root get all the likes of nested replies.
## get_likes, get_reply_names, get_replies_and_type are the functions for get_one_page
get_likes <- function(posts, post_action, post_count) {
if (post_action & post_count) {
likes <- rvest::html_node(posts, ".post__actions") %>%
rvest::html_node(... | /R/hidden_functions.R | permissive | mkearney/patientforum | R | false | false | 15,121 | r |
### likes of post_root get all the likes of nested replies.
## get_likes, get_reply_names, get_replies_and_type are the functions for get_one_page
get_likes <- function(posts, post_action, post_count) {
if (post_action & post_count) {
likes <- rvest::html_node(posts, ".post__actions") %>%
rvest::html_node(... |
library(gotmtools)
library(LakeEnsemblR)
library(ggplot2)
library(LakeEnsemblR)
library(ggpubr)
library(dplyr)
library(rLakeAnalyzer)
library(reshape)
library(reshape2)
library(RColorBrewer)
library(lubridate)
library(Metrics)
library(plotrix)
library(here)
setwd(paste0(here()))
ncdf <- "./LER_validation/output/ense... | /scripts/stepthrough/step_3_validation/s3.2_surface_bottom_temp_vali.R | no_license | jacob8776/sunapee_LER_projections | R | false | false | 1,692 | r | library(gotmtools)
library(LakeEnsemblR)
library(ggplot2)
library(LakeEnsemblR)
library(ggpubr)
library(dplyr)
library(rLakeAnalyzer)
library(reshape)
library(reshape2)
library(RColorBrewer)
library(lubridate)
library(Metrics)
library(plotrix)
library(here)
setwd(paste0(here()))
ncdf <- "./LER_validation/output/ense... |
#' CSWTransaction
#'
#' @docType class
#' @export
#' @keywords OGC CSW Transaction
#' @return Object of \code{\link{R6Class}} for modelling a CSW Transaction request
#' @format \code{\link{R6Class}} object.
#'
#' @section Methods:
#' \describe{
#' \item{\code{new(url, version, id)}}{
#' This method is used to insta... | /R/CSWTransaction.R | no_license | SIBeckers/ows4R | R | false | false | 1,693 | r | #' CSWTransaction
#'
#' @docType class
#' @export
#' @keywords OGC CSW Transaction
#' @return Object of \code{\link{R6Class}} for modelling a CSW Transaction request
#' @format \code{\link{R6Class}} object.
#'
#' @section Methods:
#' \describe{
#' \item{\code{new(url, version, id)}}{
#' This method is used to insta... |
# Download the file
fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
if(!file.exists("data")) {
dir.create("data")
}
download.file(fileUrl, destfile = "./data/data.zip", method = "curl")
dateDownloaded <- date()
print(dateDownloaded)
# Unzip the file
unzip("./dat... | /run_analysis.R | no_license | jorditejedor/gettingandcleaningdata | R | false | false | 2,659 | r | # Download the file
fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
if(!file.exists("data")) {
dir.create("data")
}
download.file(fileUrl, destfile = "./data/data.zip", method = "curl")
dateDownloaded <- date()
print(dateDownloaded)
# Unzip the file
unzip("./dat... |
bbox_to_matrix <- function(bbox){
bb_lst <- lapply(strsplit(bbox, ",\\s?|\\s+"), as.numeric)
do.call(rbind, bb_lst)
}
#' Convert bbox to magick-geometry
#'
#' @param x character vector with bounding boxes (top-left coordinates). Expects four integers separated by comma or space
#'
#' @return character vector of ma... | /R/bbox.R | permissive | dmi3kno/hocr | R | false | false | 8,646 | r | bbox_to_matrix <- function(bbox){
bb_lst <- lapply(strsplit(bbox, ",\\s?|\\s+"), as.numeric)
do.call(rbind, bb_lst)
}
#' Convert bbox to magick-geometry
#'
#' @param x character vector with bounding boxes (top-left coordinates). Expects four integers separated by comma or space
#'
#' @return character vector of ma... |
<?xml version="1.0" encoding="utf-8"?>
<serviceModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BlobSample" generation="1" functional="0" release="0" Id="f9a7f00a-1169-43b7-bf2e-99af528e7b80" dslVersion="1.2.0.0" xmlns="http://schemas.microsoft.com/dsltools... | /BlobSample/BlobSample/csx/Debug/ServiceDefinition.rd | no_license | SudhirVinjamuri/BlobStore | R | false | false | 11,852 | rd | <?xml version="1.0" encoding="utf-8"?>
<serviceModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BlobSample" generation="1" functional="0" release="0" Id="f9a7f00a-1169-43b7-bf2e-99af528e7b80" dslVersion="1.2.0.0" xmlns="http://schemas.microsoft.com/dsltools... |
rm(list=ls(all=T))
library(zoo)
library(longitudinal)
library(foreign)
library(nlme)
library(plyr)
library(lattice)
#library(lme4)
library(mgcv)
library(ggplot2)
library(reshape2)
setwd("/home/evaliliane/Documents/PhD/Codes")
# Read in the two children dataset
#addata <- read.csv("/home/evaliliane/Documents/PhD/C... | /NlmeModels.R | no_license | EvaLiliane/Data-Preparation | R | false | false | 19,630 | r | rm(list=ls(all=T))
library(zoo)
library(longitudinal)
library(foreign)
library(nlme)
library(plyr)
library(lattice)
#library(lme4)
library(mgcv)
library(ggplot2)
library(reshape2)
setwd("/home/evaliliane/Documents/PhD/Codes")
# Read in the two children dataset
#addata <- read.csv("/home/evaliliane/Documents/PhD/C... |
Height = c(170,169,182,175,173)
Weight = c(66,59,72,78,90)
# choose color
# 1:black 2:red 3:green 4:blue 5:pink
plot(Height,Weight,col=4) | /03Plotting/07Parameter__col.R | no_license | MomusChao/R | R | false | false | 147 | r | Height = c(170,169,182,175,173)
Weight = c(66,59,72,78,90)
# choose color
# 1:black 2:red 3:green 4:blue 5:pink
plot(Height,Weight,col=4) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/texreg.R
\name{knitreg}
\alias{knitreg}
\title{Flexibly choose the right table output format for use with \pkg{knitr}}
\usage{
knitreg(...)
}
\arguments{
\item{...}{Arguments to be handed over to the \link{texreg}, \link{htmlreg},
\link{scree... | /man/knitreg.Rd | no_license | fmerhout/texreg | R | false | true | 2,797 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/texreg.R
\name{knitreg}
\alias{knitreg}
\title{Flexibly choose the right table output format for use with \pkg{knitr}}
\usage{
knitreg(...)
}
\arguments{
\item{...}{Arguments to be handed over to the \link{texreg}, \link{htmlreg},
\link{scree... |
#! /usr/bin/env Rscript
#
#-------------------------------------------------------------------#
# Run the entire pipeline
# ! Transform metabolome data into a computable format !
# Store in MongoDB
#-------------------------------------------------------------------#
.author = "Aaron Brooks"
.copyright = "Copyright 20... | /genphen/metabolome/pipeline/main.R | no_license | scalefreegan/steinmetz-lab | R | false | false | 1,348 | r | #! /usr/bin/env Rscript
#
#-------------------------------------------------------------------#
# Run the entire pipeline
# ! Transform metabolome data into a computable format !
# Store in MongoDB
#-------------------------------------------------------------------#
.author = "Aaron Brooks"
.copyright = "Copyright 20... |
## Loading Data from 2/1/2007 to 2/2/2007
filePower <- "C:/Users/Johnny/Desktop/course/1-R Programming/R/data/household_power_consumption.txt"
data <- read.table(filePower, header = TRUE,sep=";", stringsAsFactors=FALSE, dec=".")
data1 <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
## Plot4
#str(subSetData)
Dat... | /plot4.R | no_license | macauclay/ExData_Plotting1 | R | false | false | 1,444 | r | ## Loading Data from 2/1/2007 to 2/2/2007
filePower <- "C:/Users/Johnny/Desktop/course/1-R Programming/R/data/household_power_consumption.txt"
data <- read.table(filePower, header = TRUE,sep=";", stringsAsFactors=FALSE, dec=".")
data1 <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
## Plot4
#str(subSetData)
Dat... |
testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032927L, 1837701012L, 1632068659L), pts = c(1758370433L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... | /IntervalSurgeon/inst/testfiles/rcpp_pile/AFL_rcpp_pile/rcpp_pile_valgrind_files/1609873678-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 729 | r | testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032927L, 1837701012L, 1632068659L), pts = c(1758370433L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
## The following function makecachematrix creates a special matrix that can caches its inverse
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x ... | /cachematrix.R | no_license | Abdulrahman-Saleh/ProgrammingAssignment2 | R | false | false | 1,024 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
## The following function makecachematrix creates a special matrix that can caches its inverse
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x ... |
rm(list=ls())
setwd("/srv/ccrc/data34/z3478332/CMIP-WRF-ECLs/")
library(ggplot2)
library(reshape2)
library(abind)
library(RNetCDF)
wrf=c("R1","R2","R3")
namelist=rep("aaa",12)
events<-fixes<-list()
n=1
for(proj in c(100,240))
for(r in 1:3)
{
if(proj==100) cv=1 else cv=1.35
events[[n]]=read.csv(paste("outp... | /NCEP-WRF_skill.R | no_license | apepler/Code-R | R | false | false | 14,181 | r | rm(list=ls())
setwd("/srv/ccrc/data34/z3478332/CMIP-WRF-ECLs/")
library(ggplot2)
library(reshape2)
library(abind)
library(RNetCDF)
wrf=c("R1","R2","R3")
namelist=rep("aaa",12)
events<-fixes<-list()
n=1
for(proj in c(100,240))
for(r in 1:3)
{
if(proj==100) cv=1 else cv=1.35
events[[n]]=read.csv(paste("outp... |
# Utilities for this package
EnsurePackage <- function(x) {
# EnsurePackage(x) - Installs and loads a package if necessary
# Args:
# x: name of package
x <- as.character(x)
if (!require(x, character.only=TRUE)) {
install.packages(pkgs=x, repos="http://cran.r-project.org")
require(x, character.on... | /twitteR/utilities.R | no_license | KartikKannapur/R-Statistical-Computing | R | false | false | 1,122 | r | # Utilities for this package
EnsurePackage <- function(x) {
# EnsurePackage(x) - Installs and loads a package if necessary
# Args:
# x: name of package
x <- as.character(x)
if (!require(x, character.only=TRUE)) {
install.packages(pkgs=x, repos="http://cran.r-project.org")
require(x, character.on... |
### predict.slm.R (2017-03-28)
###
### Prediction from linear model
###
### Copyright 2011-17 Korbinian Strimmer
###
###
### This file is part of the `sda' library for R and related languages.
### It is made available under the terms of the GNU General Public
### License, version 3, or at your option, any later ver... | /R/predict.slm.R | no_license | cran/care | R | false | false | 2,039 | r | ### predict.slm.R (2017-03-28)
###
### Prediction from linear model
###
### Copyright 2011-17 Korbinian Strimmer
###
###
### This file is part of the `sda' library for R and related languages.
### It is made available under the terms of the GNU General Public
### License, version 3, or at your option, any later ver... |
#######################################
# This R script called run_analysis.R does the following:
#
# 1.- Merges the training and the test sets to create one data set.
# 2.- Extracts only the measurements on the mean and standard deviation for each measurement.
# 3.- Uses descriptive activity names to name the activiti... | /run_analysis.R | no_license | neucast/Getting_And_Cleaning_Data_Final_Project | R | false | false | 7,451 | r | #######################################
# This R script called run_analysis.R does the following:
#
# 1.- Merges the training and the test sets to create one data set.
# 2.- Extracts only the measurements on the mean and standard deviation for each measurement.
# 3.- Uses descriptive activity names to name the activiti... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 523
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 523
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/que... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query24_ntrivil_1344n/query24_ntrivil_1344n.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 704 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 523
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 523
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/que... |
library(stuart)
### Name: holdout
### Title: Data selection for holdout validation.
### Aliases: holdout
### ** Examples
# seeded selection, 25% validation sample
data(fairplayer)
split <- holdout(fairplayer, .75, seed = 55635)
lapply(split, nrow) # check size of samples
| /data/genthat_extracted_code/stuart/examples/holdout.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 281 | r | library(stuart)
### Name: holdout
### Title: Data selection for holdout validation.
### Aliases: holdout
### ** Examples
# seeded selection, 25% validation sample
data(fairplayer)
split <- holdout(fairplayer, .75, seed = 55635)
lapply(split, nrow) # check size of samples
|
library(biomod2)
### Name: full_suffling
### Title: data set shuffling tool
### Aliases: full_suffling
### Keywords: suffle random importance
### ** Examples
xx <- matrix(rep(1:10,3),10,3)
full_suffling(xx,c(1,2))
| /data/genthat_extracted_code/biomod2/examples/full_shuffling.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 221 | r | library(biomod2)
### Name: full_suffling
### Title: data set shuffling tool
### Aliases: full_suffling
### Keywords: suffle random importance
### ** Examples
xx <- matrix(rep(1:10,3),10,3)
full_suffling(xx,c(1,2))
|
message("R/data/process_data.R")
# paquetes ----------------------------------------------------------------
library(dplyr)
library(stringr)
# lectura de datos --------------------------------------------------------
# Script que procesa movid18.csv
mv <- data.table::fread("data/movid19.csv", encoding = "UTF-8")
mv ... | /R/data/movid_data.R | no_license | MOVID19/movid19-shiny | R | false | false | 12,353 | r | message("R/data/process_data.R")
# paquetes ----------------------------------------------------------------
library(dplyr)
library(stringr)
# lectura de datos --------------------------------------------------------
# Script que procesa movid18.csv
mv <- data.table::fread("data/movid19.csv", encoding = "UTF-8")
mv ... |
\name{summarise.size.frq.bet}
\alias{summarise.size.frq.bet}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
summarise.size.frq.bet.Rd
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
Takes two frq files from the bigeye assessment and compares the length and ... | /man/summarise.size.frq.bet.Rd | no_license | PacificCommunity/ofp-sam-r4mfcl | R | false | false | 1,552 | rd | \name{summarise.size.frq.bet}
\alias{summarise.size.frq.bet}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
summarise.size.frq.bet.Rd
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
Takes two frq files from the bigeye assessment and compares the length and ... |
# load packages -----------------------------------------------------------
require(ggplot2)
require(plotly)
library(stringi)
require(tidyr)
require(purrr)
require(dplyr)
require(rio)
require(lubridate)
require(readxl)
require(stringdist)
library(xlsx) #
library(reldist)
library(ggthemes)
library(ggalt) #for lollipop c... | /BiHLaws/BiHLawAnalysis.R | no_license | rs2903/BiH | R | false | false | 29,984 | r | # load packages -----------------------------------------------------------
require(ggplot2)
require(plotly)
library(stringi)
require(tidyr)
require(purrr)
require(dplyr)
require(rio)
require(lubridate)
require(readxl)
require(stringdist)
library(xlsx) #
library(reldist)
library(ggthemes)
library(ggalt) #for lollipop c... |
#' Create a data cube from an image collection
#'
#' Create a proxy data cube, which loads data from a given image collection according to a data cube view
#'
#' @param image_collection Source image collection as from \code{image_collection} or \code{create_image_collection}
#' @param view A data cube view defining t... | /R/cube.R | permissive | rsbivand/gdalcubes_R | R | false | false | 45,236 | r |
#' Create a data cube from an image collection
#'
#' Create a proxy data cube, which loads data from a given image collection according to a data cube view
#'
#' @param image_collection Source image collection as from \code{image_collection} or \code{create_image_collection}
#' @param view A data cube view defining t... |
# Load the package
installed.packages("eurostat")
library(devtools)
install_github("ropengov/eurostat")
library(eurostat)
library(rvest)
# Get Eurostat data listing
toc <-get_eurostat_toc()
# Check the first items
library(knitr)
kable(head(toc))
# Search for Themes
kable(head(search_eurostat("cars"), n = 15))
# Check... | /Eurostat/eurostat.R | no_license | fabiorcampos/Innovation-Analysis | R | false | false | 2,195 | r | # Load the package
installed.packages("eurostat")
library(devtools)
install_github("ropengov/eurostat")
library(eurostat)
library(rvest)
# Get Eurostat data listing
toc <-get_eurostat_toc()
# Check the first items
library(knitr)
kable(head(toc))
# Search for Themes
kable(head(search_eurostat("cars"), n = 15))
# Check... |
\name{maxlof}
\alias{maxlof}
\title{ Detection of multivariate outliers using the LOF algorithm}
\description{
A function that detects multivariate outliers using the local outlier factor for a matrix
over a range of neighbors called minpts.
}
\usage{
maxlof(data, name = "", minptsl = 10, minptsu = 20)
}
\a... | /man/maxlof.Rd | no_license | a704261687/dprep | R | false | false | 1,590 | rd | \name{maxlof}
\alias{maxlof}
\title{ Detection of multivariate outliers using the LOF algorithm}
\description{
A function that detects multivariate outliers using the local outlier factor for a matrix
over a range of neighbors called minpts.
}
\usage{
maxlof(data, name = "", minptsl = 10, minptsu = 20)
}
\a... |
library(ggplot2)
library(tidyr)
library(dplyr)
library(vegan)
#load file and tiding up
Oehl2003<-read.csv("Oehl_etal2003.csv",header = TRUE,stringsAsFactors = FALSE)
Oehl2003$Species<-sub("\\s","_",Oehl2003$Species)
Oehl2003<-Oehl2003[-grep("BR\\d$",Oehl2003$Species),]
Oehl2003$Species[which(Oehl2003$Species=="Acaul... | /Scripts/Oehl_etal2003.R | no_license | aguilart/SporeSize | R | false | false | 3,207 | r | library(ggplot2)
library(tidyr)
library(dplyr)
library(vegan)
#load file and tiding up
Oehl2003<-read.csv("Oehl_etal2003.csv",header = TRUE,stringsAsFactors = FALSE)
Oehl2003$Species<-sub("\\s","_",Oehl2003$Species)
Oehl2003<-Oehl2003[-grep("BR\\d$",Oehl2003$Species),]
Oehl2003$Species[which(Oehl2003$Species=="Acaul... |
## data path
setwd("data")
# librarys
library(raster)
library(rgdal)
getShapefileInfo <- function(fileName){
if(!file.exists(fileName))
return;
# Get the layer names
fileLayers <- ogrListLayers(dsn = fileName)
# Get the file information for the first layer
fileInfo <- ogrInfo(dsn = fileNa... | /shp_to_raster.r | no_license | hguerra/geospatial_conversion_tools | R | false | false | 1,651 | r | ## data path
setwd("data")
# librarys
library(raster)
library(rgdal)
getShapefileInfo <- function(fileName){
if(!file.exists(fileName))
return;
# Get the layer names
fileLayers <- ogrListLayers(dsn = fileName)
# Get the file information for the first layer
fileInfo <- ogrInfo(dsn = fileNa... |
library(shiny)
#setwd("C:/Users/Charles/Desktop")
shinyUI(
fluidPage(
titlePanel("An Overview of the Federalist Papers"),
sidebarPanel(width = 3,
sliderInput("fedPaper", "Range of Federalist Papers:", min=1, max=85, value=c(5,13)),
selectInput("colorScheme", "Color Sc... | /project-prototype/ui.R | no_license | chrono721/msan622 | R | false | false | 3,265 | r |
library(shiny)
#setwd("C:/Users/Charles/Desktop")
shinyUI(
fluidPage(
titlePanel("An Overview of the Federalist Papers"),
sidebarPanel(width = 3,
sliderInput("fedPaper", "Range of Federalist Papers:", min=1, max=85, value=c(5,13)),
selectInput("colorScheme", "Color Sc... |
# -*- tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
# vi: set ts=2 noet:
#
# (c) Copyright Rosetta Commons Member Institutions.
# (c) This file is part of the Rosetta software suite and is made available under license.
# (c) The Rosetta software is developed by the contributing memb... | /inst/scripts/analysis/plots/hbonds/hydroxyl_sites/OHacceptor_chi.R | no_license | momeara/RosettaFeatures | R | false | false | 4,208 | r | # -*- tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
# vi: set ts=2 noet:
#
# (c) Copyright Rosetta Commons Member Institutions.
# (c) This file is part of the Rosetta software suite and is made available under license.
# (c) The Rosetta software is developed by the contributing memb... |
#Rcode
library(RColorBrewer)
mycol <- brewer.pal(8,'Accent')
b1 <- read.table('../analysis2/fitness_residue.txt',header=1)
drawpic <- function(name,colu){
png(paste('../figures/Fitness_profile_',name,'.png',sep=''),res=600,height=2500,width=4500)
plot(b1$Pos,b1[,colu],type='h',lwd=4,col=mycol[1],ylab='log10 fitness',y... | /drawprofile.R | no_license | Tian-hao/Nef | R | false | false | 518 | r | #Rcode
library(RColorBrewer)
mycol <- brewer.pal(8,'Accent')
b1 <- read.table('../analysis2/fitness_residue.txt',header=1)
drawpic <- function(name,colu){
png(paste('../figures/Fitness_profile_',name,'.png',sep=''),res=600,height=2500,width=4500)
plot(b1$Pos,b1[,colu],type='h',lwd=4,col=mycol[1],ylab='log10 fitness',y... |
# Spect.R
# by Shuce Zhang May 4, 2018
#This script is to analyze spectrum data from plate readers.
#Should you have any questions please contact Shuce: shuce@ualberta.ca
rm(list = ls())
library(plyr)
library(ggplot2)
library(reshape2)
setwd("G:/Wet_Data_Analysis/Campbell/Spectrum/new/test")
#raw <- read.tabl... | /spect.R | no_license | shucez/Spectrum | R | false | false | 4,798 | r | # Spect.R
# by Shuce Zhang May 4, 2018
#This script is to analyze spectrum data from plate readers.
#Should you have any questions please contact Shuce: shuce@ualberta.ca
rm(list = ls())
library(plyr)
library(ggplot2)
library(reshape2)
setwd("G:/Wet_Data_Analysis/Campbell/Spectrum/new/test")
#raw <- read.tabl... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_eccentricity.R
\name{get_eccentricity}
\alias{get_eccentricity}
\title{Get node eccentricities}
\usage{
get_eccentricity(graph)
}
\arguments{
\item{graph}{a graph object of class
\code{dgr_graph}.}
}
\value{
a data frame containing eccent... | /man/get_eccentricity.Rd | no_license | pcuthbert/DiagrammeR | R | false | true | 709 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_eccentricity.R
\name{get_eccentricity}
\alias{get_eccentricity}
\title{Get node eccentricities}
\usage{
get_eccentricity(graph)
}
\arguments{
\item{graph}{a graph object of class
\code{dgr_graph}.}
}
\value{
a data frame containing eccent... |
install.packages("recommenderlab", dependencies=TRUE)
library(Matrix)
library(recommenderlab)
library(caTools)
str(book)
View(book)
hist(book$Book.Rating)
book_data_matrix <- as(book, 'realRatingMatrix')
book_recomm_model <- Recommender(book_data_matrix, method = "POPULAR")
recomm_items1 <- predict(book_re... | /Recommandation System/Solution (Book).R | no_license | Abhishek012345/Data-Science-Assignment | R | false | false | 566 | r | install.packages("recommenderlab", dependencies=TRUE)
library(Matrix)
library(recommenderlab)
library(caTools)
str(book)
View(book)
hist(book$Book.Rating)
book_data_matrix <- as(book, 'realRatingMatrix')
book_recomm_model <- Recommender(book_data_matrix, method = "POPULAR")
recomm_items1 <- predict(book_re... |
#' List all the observable partial capture histories
#'
#' This function returns a list of all the observable partial capture histories which can be recorded in a discrete-time capture-recapture setting with \eqn{t} consecutive trapping occasions. The observable partial capture histories are \eqn{2^t-1}
#'
#' @usage li... | /R/list.historylabels.R | no_license | lucatardella/BBRecapture | R | false | false | 1,766 | r | #' List all the observable partial capture histories
#'
#' This function returns a list of all the observable partial capture histories which can be recorded in a discrete-time capture-recapture setting with \eqn{t} consecutive trapping occasions. The observable partial capture histories are \eqn{2^t-1}
#'
#' @usage li... |
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615831291-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 2,048 | r | testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... |
png("elograph.png", height=400, width=800);
# Load the winner csv file
mydata <- read.csv("c:\\python34\\winner_scores_2.csv");
# Pick the first column in vector form for input into histogram
mydata1 <- mydata[,1];
# Create the histogram
histdata1 <- hist(mydata1, xlim=c(0,1), breaks=c(seq(0,1,0.05)));
print("avera... | /r/elohistogram.R | no_license | KaiserKyle/Kayfabermetrics | R | false | false | 1,888 | r | png("elograph.png", height=400, width=800);
# Load the winner csv file
mydata <- read.csv("c:\\python34\\winner_scores_2.csv");
# Pick the first column in vector form for input into histogram
mydata1 <- mydata[,1];
# Create the histogram
histdata1 <- hist(mydata1, xlim=c(0,1), breaks=c(seq(0,1,0.05)));
print("avera... |
\name{affy.mgu74bv2}
\alias{affy.mgu74bv2}
\docType{data}
\title{Mouse(Affymetrix) :affy.mgu74bv2}
\description{
Information about accession ID and affy ID
}
\usage{data(affy.mgu74bv2)}
\examples{
data(affy.mgu74bv2)
}
\keyword{datasets}
| /man/affy.mgu74bv2.Rd | no_license | cran/BootCL | R | false | false | 255 | rd | \name{affy.mgu74bv2}
\alias{affy.mgu74bv2}
\docType{data}
\title{Mouse(Affymetrix) :affy.mgu74bv2}
\description{
Information about accession ID and affy ID
}
\usage{data(affy.mgu74bv2)}
\examples{
data(affy.mgu74bv2)
}
\keyword{datasets}
|
#################################################################
############# BAR GRAPH: Represent discrete categories of data
# length- represents the magnitude or frequencies of data
head(mtcars)
c <- table(mtcars$gear)
barplot(c, main="Car Distribution",
xlab="Number of Gears")
t=tapply(iris$Se... | /r/Lecture19_barplt1.r | permissive | praveentn/hgwxx7 | R | false | false | 2,396 | r | #################################################################
############# BAR GRAPH: Represent discrete categories of data
# length- represents the magnitude or frequencies of data
head(mtcars)
c <- table(mtcars$gear)
barplot(c, main="Car Distribution",
xlab="Number of Gears")
t=tapply(iris$Se... |
#-------------------------------------------------------------------------------------------------------------------------------------------------------
#--------------------------------------------------------- 170612 - redirect STDOUT ---------------------------------------------------------------
#------------------... | /old_scripts/prova.R | no_license | efonzi/my_functions | R | false | false | 6,407 | r | #-------------------------------------------------------------------------------------------------------------------------------------------------------
#--------------------------------------------------------- 170612 - redirect STDOUT ---------------------------------------------------------------
#------------------... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{example.spacemix.map.list}
\alias{example.spacemix.map.list}
\title{Example spacemix.map.list object}
\format{A list with 15 elements,
using \code{K} as the number of samples
\describe{
\item{MCMC.output... | /man/example.spacemix.map.list.Rd | no_license | HansonMenghan/SpaceMix | R | false | false | 3,861 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{example.spacemix.map.list}
\alias{example.spacemix.map.list}
\title{Example spacemix.map.list object}
\format{A list with 15 elements,
using \code{K} as the number of samples
\describe{
\item{MCMC.output... |
context("dummy_rows_returns right data set")
load(system.file("testdata", "fastDummies_data.rda",
package = "fastDummies"))
test_that("dummy_rows return expected data.frame", {
expect_equal(dummy_rows(no_dummies_needed),
no_dummies_needed)
expect_equal(dummy_rows(no_dummies_needed,... | /tests/testthat/test-rows-right-values.R | permissive | jacobkap/fastDummies | R | false | false | 3,615 | r | context("dummy_rows_returns right data set")
load(system.file("testdata", "fastDummies_data.rda",
package = "fastDummies"))
test_that("dummy_rows return expected data.frame", {
expect_equal(dummy_rows(no_dummies_needed),
no_dummies_needed)
expect_equal(dummy_rows(no_dummies_needed,... |
library(foreach)
library(doMC)
registerDoMC(10)
curDir <- ("~/Dropbox/sxoli/ptixiaki/evo3")
n<-25
foreach(i = 1:n) %dopar% {
dirName <- paste(curDir,"/selection.run.", i, sep="")
setwd(dirName)
mydata<-read.table("matrix.txt")
num_of_gens<-nrow(mydata)/500
generation<-matrix(nrow=500,ncol=1)
mean_power<-c... | /r_plots/power_interaction.R | no_license | antokioukis/evonet | R | false | false | 3,462 | r | library(foreach)
library(doMC)
registerDoMC(10)
curDir <- ("~/Dropbox/sxoli/ptixiaki/evo3")
n<-25
foreach(i = 1:n) %dopar% {
dirName <- paste(curDir,"/selection.run.", i, sep="")
setwd(dirName)
mydata<-read.table("matrix.txt")
num_of_gens<-nrow(mydata)/500
generation<-matrix(nrow=500,ncol=1)
mean_power<-c... |
# Lista de Exercícios - Gráficos
# Obs: Caso tenha problemas com a acentuação, consulte este link:
# https://support.rstudio.com/hc/en-us/articles/200532197-Character-Encoding
# Configurando o diretório de trabalho
# Coloque entre aspas o diretório de trabalho que você está usando no seu computador
# Não use diretóri... | /Graficos.R | no_license | NelioMuniz/exerciciosRFundamentos | R | false | false | 3,450 | r | # Lista de Exercícios - Gráficos
# Obs: Caso tenha problemas com a acentuação, consulte este link:
# https://support.rstudio.com/hc/en-us/articles/200532197-Character-Encoding
# Configurando o diretório de trabalho
# Coloque entre aspas o diretório de trabalho que você está usando no seu computador
# Não use diretóri... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/class_definitions.R, R/cover_methods.R
\docType{class}
\name{cover-class}
\alias{cover-class}
\alias{patch-class}
\alias{show,cover-method}
\alias{show,patch-method}
\title{An S4 class to represent a cover.}
\usage{
\S4method{show}{cover}(obj... | /man/cover-class.Rd | no_license | blasern/dcph | R | false | true | 1,197 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/class_definitions.R, R/cover_methods.R
\docType{class}
\name{cover-class}
\alias{cover-class}
\alias{patch-class}
\alias{show,cover-method}
\alias{show,patch-method}
\title{An S4 class to represent a cover.}
\usage{
\S4method{show}{cover}(obj... |
#!/usr/bin/env rscript
library(lubridate)
source('data_loader.R')
d <- load_data()
png("plot4.png", width = 480, height = 480)
par(mfrow=c(2,2))
# First plot
plot(
x = d$d,
y = as.numeric(d[,"Global_active_power"]),
xlab="",
ylab="Global Active Power",
col="bla... | /plot4.R | no_license | learnerconstant/ExData_Plotting1 | R | false | false | 1,319 | r | #!/usr/bin/env rscript
library(lubridate)
source('data_loader.R')
d <- load_data()
png("plot4.png", width = 480, height = 480)
par(mfrow=c(2,2))
# First plot
plot(
x = d$d,
y = as.numeric(d[,"Global_active_power"]),
xlab="",
ylab="Global Active Power",
col="bla... |
/Code/createTable.R | no_license | mywanuo/PLPPS-pipeline | R | false | false | 530 | r | ||
require(httr)
require(jsonlite)
require(magrittr)
require(stringr)
#' A TessituraService class
#'
#' This is a more useable Tessitura Service class that can be implemented by
#' further objects to create requests.
#'
#' @docType class
#' @title TessituraService
#' @field tessituraUrl Base Tessitura REST API url
#' @fi... | /R/control.R | no_license | gdgkirkley/tessituraR | R | false | false | 13,417 | r | require(httr)
require(jsonlite)
require(magrittr)
require(stringr)
#' A TessituraService class
#'
#' This is a more useable Tessitura Service class that can be implemented by
#' further objects to create requests.
#'
#' @docType class
#' @title TessituraService
#' @field tessituraUrl Base Tessitura REST API url
#' @fi... |
\name{groupRatio}
%
\alias{groupRatio}
\alias{groupRatio-methods}
\alias{groupRatio,exonLoessModel-method}
%
\title{Calculates group-wise ratios of alignment depth (AD)}
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %
% Description
% - - - - - - - - - - - - - - - - - - - - - - - - - - - ... | /man/groupRatio.Rd | no_license | cran/rbamtools | R | false | false | 3,680 | rd | \name{groupRatio}
%
\alias{groupRatio}
\alias{groupRatio-methods}
\alias{groupRatio,exonLoessModel-method}
%
\title{Calculates group-wise ratios of alignment depth (AD)}
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %
% Description
% - - - - - - - - - - - - - - - - - - - - - - - - - - - ... |
library(table1)
### Name: render.varlabel
### Title: Render variable labels for table output.
### Aliases: render.varlabel
### Keywords: utilities
### ** Examples
x <- exp(rnorm(100, 1, 1))
label(x) <- "Weight"
units(x) <- "kg"
render.varlabel(x)
y <- factor(sample(0:1, 99, replace=TRUE), labels=c("Female", "Male"... | /data/genthat_extracted_code/table1/examples/render.varlabel.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 377 | r | library(table1)
### Name: render.varlabel
### Title: Render variable labels for table output.
### Aliases: render.varlabel
### Keywords: utilities
### ** Examples
x <- exp(rnorm(100, 1, 1))
label(x) <- "Weight"
units(x) <- "kg"
render.varlabel(x)
y <- factor(sample(0:1, 99, replace=TRUE), labels=c("Female", "Male"... |
library(tidyverse)
library(rjags)
library(ggmcmc)
library(devtools)
load_all("deconvolution.data")
extdir <- system.file("extdata", package="deconvolution.data")
fname <- file.path(extdir, "500kb_deconvolution.rds")
dat <- readRDS(fname) %>%
as_tibble() %>%
rename(tissue_source=sample) %>%
## I'm guessing ... | /code/mixmodel_jags.R | no_license | cancer-genomics/deconvolution | R | false | false | 1,887 | r | library(tidyverse)
library(rjags)
library(ggmcmc)
library(devtools)
load_all("deconvolution.data")
extdir <- system.file("extdata", package="deconvolution.data")
fname <- file.path(extdir, "500kb_deconvolution.rds")
dat <- readRDS(fname) %>%
as_tibble() %>%
rename(tissue_source=sample) %>%
## I'm guessing ... |
ntests <- 15
muList <- seq(from=3, to = 15, by=(15-3)/(ntests-1))/5
errR <- c()
for (i in (1:ntests)){
mu <- muList[i]
A <- .sparseDiagonal(x=1, n) + mu*L
for (k in (1:3)){
Xmu[k,] <- t(pcg(as.matrix(A),X[k,]))
errR <- c(errR,snr(X0,Xmu))
}
}
plot(errR, type="b", col="blue", xlab ... | /r/nt_solutions/meshproc_3_denoising/exo4.R | no_license | akn264/numerical-tours | R | false | false | 341 | r | ntests <- 15
muList <- seq(from=3, to = 15, by=(15-3)/(ntests-1))/5
errR <- c()
for (i in (1:ntests)){
mu <- muList[i]
A <- .sparseDiagonal(x=1, n) + mu*L
for (k in (1:3)){
Xmu[k,] <- t(pcg(as.matrix(A),X[k,]))
errR <- c(errR,snr(X0,Xmu))
}
}
plot(errR, type="b", col="blue", xlab ... |
##使用ライブラリ
library(pROC)
library(dplyr)
library(ggplot2)
library(gridExtra)
##データ読込
train<-read.csv("../motodata/train.csv", header=T)
test<-read.csv("../motodata/test.csv", header=T)
## Customerを分割. Old
train_old <- train %>%
dplyr::filter(pdays > -1)
test_old <- test %>%
dplyr::filter(pdays >... | /pgm-r/PreviousCampagin.R | no_license | zoe3/bank | R | false | false | 3,099 | r | ##使用ライブラリ
library(pROC)
library(dplyr)
library(ggplot2)
library(gridExtra)
##データ読込
train<-read.csv("../motodata/train.csv", header=T)
test<-read.csv("../motodata/test.csv", header=T)
## Customerを分割. Old
train_old <- train %>%
dplyr::filter(pdays > -1)
test_old <- test %>%
dplyr::filter(pdays >... |
x <- 1:10
x[1:2] <- 3:4
.Last.value ## 3:4
x[1:2] <- 1
.Last.value ## 1
x[1:2] = 2
.Last.value ## 2
x[1:2] <- x[1:2] * 2
.Last.value ## 4:8
1:10 * 1:2
| /tmp-tests/pb-with-subset.R | no_license | privefl/inplace | R | false | false | 158 | r | x <- 1:10
x[1:2] <- 3:4
.Last.value ## 3:4
x[1:2] <- 1
.Last.value ## 1
x[1:2] = 2
.Last.value ## 2
x[1:2] <- x[1:2] * 2
.Last.value ## 4:8
1:10 * 1:2
|
######################
# Pre-processing 2014
######################
#install.packages("XLConnect")
options(java.parameters = "-Xmx7000m")
library(XLConnect)
basePath = file.path("D:/Monash Study/Winter Research/")
input = file.path(basePath, "source/Podes_Survey_2014trim.xlsx")
data.raw = readWorksheetFromFile(input... | /1.PODES+Pre-processing.r | no_license | robertf99/PODES | R | false | false | 9,491 | r |
######################
# Pre-processing 2014
######################
#install.packages("XLConnect")
options(java.parameters = "-Xmx7000m")
library(XLConnect)
basePath = file.path("D:/Monash Study/Winter Research/")
input = file.path(basePath, "source/Podes_Survey_2014trim.xlsx")
data.raw = readWorksheetFromFile(input... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/crm_fit.R
\name{summary.crm_fit}
\alias{summary.crm_fit}
\title{Obtain summary of an crm_fit}
\usage{
\method{summary}{crm_fit}(object, ...)
}
\arguments{
\item{object}{\code{\link{crm_fit}} object to summarise.}
\item{...}{Extra parameters,... | /man/summary.crm_fit.Rd | no_license | brockk/trialr | R | false | true | 448 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/crm_fit.R
\name{summary.crm_fit}
\alias{summary.crm_fit}
\title{Obtain summary of an crm_fit}
\usage{
\method{summary}{crm_fit}(object, ...)
}
\arguments{
\item{object}{\code{\link{crm_fit}} object to summarise.}
\item{...}{Extra parameters,... |
### ガンマ分布に従う乱数の生成
set.seed(123) # 乱数の初期値を指定
rgamma(10, # ガンマ分布に従う乱数を10個発生
shape=3, rate=1)
## 統計的性質
nu <- 4
alpha <- 2
x <- rgamma(10^5, # ガンマ乱数を10000個発生
shape=nu, rate=alpha)
mean(x) # nu/alpha=2 に近い(大数の法則)
## データのヒストグラム(密度表示)
if(Sys.info()["sysname"]=="Darwin") { # MacOSの場合
par(family="Hiragi... | /docs/code/sreg-gamma.r | no_license | noboru-murata/sda | R | false | false | 915 | r | ### ガンマ分布に従う乱数の生成
set.seed(123) # 乱数の初期値を指定
rgamma(10, # ガンマ分布に従う乱数を10個発生
shape=3, rate=1)
## 統計的性質
nu <- 4
alpha <- 2
x <- rgamma(10^5, # ガンマ乱数を10000個発生
shape=nu, rate=alpha)
mean(x) # nu/alpha=2 に近い(大数の法則)
## データのヒストグラム(密度表示)
if(Sys.info()["sysname"]=="Darwin") { # MacOSの場合
par(family="Hiragi... |
#' GiveAction
#'
#' The act of transferring ownership of an object to a destination. Reciprocal of TakeAction.Related actions:* [[TakeAction]]: Reciprocal of GiveAction.* [[SendAction]]: Unlike SendAction, GiveAction implies that ownership is being transferred (e.g. I may send my laptop to you, but that doesn't mean I... | /R/GiveAction.R | no_license | cboettig/schemar | R | false | false | 6,817 | r | #' GiveAction
#'
#' The act of transferring ownership of an object to a destination. Reciprocal of TakeAction.Related actions:* [[TakeAction]]: Reciprocal of GiveAction.* [[SendAction]]: Unlike SendAction, GiveAction implies that ownership is being transferred (e.g. I may send my laptop to you, but that doesn't mean I... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/embed.R
\name{embed_data}
\alias{embed_data}
\title{embed a dataframe into a set of model specifications}
\usage{
embed_data(mspecs, data, ...)
}
\arguments{
\item{mspecs}{two-sided formula with outcome(s)
on the left hand side and exposure(s... | /man/embed_data.Rd | permissive | bcjaeger/rpriori | R | false | true | 635 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/embed.R
\name{embed_data}
\alias{embed_data}
\title{embed a dataframe into a set of model specifications}
\usage{
embed_data(mspecs, data, ...)
}
\arguments{
\item{mspecs}{two-sided formula with outcome(s)
on the left hand side and exposure(s... |
#_____________________________________________________________________________
# Introduction
#_____________________________________________________________________________
# Welcome to the LOBSTER R demo.
# http://www.lobsterdata.com
#__________________________________________________________... | /demo.R | permissive | lobsterdata/r4lobster | R | false | false | 2,149 | r | #_____________________________________________________________________________
# Introduction
#_____________________________________________________________________________
# Welcome to the LOBSTER R demo.
# http://www.lobsterdata.com
#__________________________________________________________... |
y.fit <-
function(bug,sims,ysim=NULL,pre.beg=FALSE){
if(is.null(colnames(sims)))
stop("columns of sims can not be NULL. names should correspond to parameters")
if(class(bug)!="tsbugs")
stop("bug must be a object of class tsbugs")
k<-nrow(sims)
y<-bug$data$y
n<-bug$info$n
beg<-bug$info$a... | /tsbridge/R/y.fit.R | no_license | ingted/R-Examples | R | false | false | 935 | r | y.fit <-
function(bug,sims,ysim=NULL,pre.beg=FALSE){
if(is.null(colnames(sims)))
stop("columns of sims can not be NULL. names should correspond to parameters")
if(class(bug)!="tsbugs")
stop("bug must be a object of class tsbugs")
k<-nrow(sims)
y<-bug$data$y
n<-bug$info$n
beg<-bug$info$a... |
######################################################################
### Luxor Strategy
######################################################################
library(quantmod)
Xt = getSymbols("^SOX",auto.assign = F)
chartSeries(Xt,TA=NULL, theme = "white")
addSMA(n = 5,col = 2)
addSMA(n = 60, col = 3)
Cl5SMA = SM... | /part1/quantmod101/Example3_eventDetection.R | no_license | datasci-info/ms-partner-training-20160308 | R | false | false | 4,616 | r | ######################################################################
### Luxor Strategy
######################################################################
library(quantmod)
Xt = getSymbols("^SOX",auto.assign = F)
chartSeries(Xt,TA=NULL, theme = "white")
addSMA(n = 5,col = 2)
addSMA(n = 60, col = 3)
Cl5SMA = SM... |
#Remove all env variables
rm(list = ls(all.names = T))
#Load the data from packages
library(caret)
library(pROC)
set.seed(100)
CTR_SD_Data <- read.csv("/home/raghunandangupta/Downloads/splits/sub-testtaa")
#Convert categorical values to numeric
CTR_SD_Data$site_id = as.numeric(CTR_SD_Data$site_id)
CTR_SD... | /ctr_analysis/ctr_gbm_alternate.R | no_license | ragnar-lothbrok/data-analytics | R | false | false | 1,828 | r | #Remove all env variables
rm(list = ls(all.names = T))
#Load the data from packages
library(caret)
library(pROC)
set.seed(100)
CTR_SD_Data <- read.csv("/home/raghunandangupta/Downloads/splits/sub-testtaa")
#Convert categorical values to numeric
CTR_SD_Data$site_id = as.numeric(CTR_SD_Data$site_id)
CTR_SD... |
library(tidyverse)
library(glmnet)
setwd('~/mortalityblob/glmnet/')
#############################
# Continent No-AEZ
#############################
fs <- list.files(pattern='noloc.Rdata$|afr.Rdata')
resdf <- data.frame(spei=seq(-2.5, 2.5, 0.1))
for (f in fs){
load(f)
df <- data.frame(as.matrix(mod$beta)) %>%
... | /visualize/Plot_Glmnet_Res.R | no_license | mcooper/mortality | R | false | false | 4,938 | r | library(tidyverse)
library(glmnet)
setwd('~/mortalityblob/glmnet/')
#############################
# Continent No-AEZ
#############################
fs <- list.files(pattern='noloc.Rdata$|afr.Rdata')
resdf <- data.frame(spei=seq(-2.5, 2.5, 0.1))
for (f in fs){
load(f)
df <- data.frame(as.matrix(mod$beta)) %>%
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/viz.R
\name{plot_affinity_matrix}
\alias{plot_affinity_matrix}
\title{Plot clustered affinity matrix}
\usage{
plot_affinity_matrix(affinity_matrix, partition)
}
\arguments{
\item{affinity_matrix}{An affinity matrix.}
\item{partition}{A parti... | /man/plot_affinity_matrix.Rd | permissive | agapow/subtypr | R | false | true | 419 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/viz.R
\name{plot_affinity_matrix}
\alias{plot_affinity_matrix}
\title{Plot clustered affinity matrix}
\usage{
plot_affinity_matrix(affinity_matrix, partition)
}
\arguments{
\item{affinity_matrix}{An affinity matrix.}
\item{partition}{A parti... |
################################################################################
########################## GSEA1 PLOTS ############################
################################################################################
##--------------------------------------------------------------------------... | /Alexis_work/project_6/dataset/RTN/R/AllPlotsTNA.R | no_license | yann-zhong/Project_resys_YZ | R | false | false | 25,777 | r | ################################################################################
########################## GSEA1 PLOTS ############################
################################################################################
##--------------------------------------------------------------------------... |
# title: ps3.R
# author: nadia lucas
# updated: march 2021
#================================================#
# set up
#================================================#
# packages
library(tidyverse)
library(tigris)
library(sf)
library(RColorBrewer)
library(ggmap)
library(ggthemes)
library(mapview)
library(websh... | /data/production_cleaning.R | no_license | nadialucas/ercot | R | false | false | 15,704 | r | # title: ps3.R
# author: nadia lucas
# updated: march 2021
#================================================#
# set up
#================================================#
# packages
library(tidyverse)
library(tigris)
library(sf)
library(RColorBrewer)
library(ggmap)
library(ggthemes)
library(mapview)
library(websh... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.