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
library(methylKit) basedir="/data/r933r/giab/mock_bsseq_from_nanopore/" for (sample in c("HG002", "HG003", "HG004")) { bsfile = paste0(basedir, sample, "_mock_bsseq.bedGraph") myobj = methRead(bsfile, assembly="hg38", sample.id=sample, treatment=0, header=FALSE, context="CpG", resolution="base", pipeline=list...
/Rscripts/methylkit_mockbsseq_asm.R
permissive
snajder-r/benchmark_meth5
R
false
false
578
r
library(methylKit) basedir="/data/r933r/giab/mock_bsseq_from_nanopore/" for (sample in c("HG002", "HG003", "HG004")) { bsfile = paste0(basedir, sample, "_mock_bsseq.bedGraph") myobj = methRead(bsfile, assembly="hg38", sample.id=sample, treatment=0, header=FALSE, context="CpG", resolution="base", pipeline=list...
# create bullet points for first page of report describing any restrictions to the data # create function to generate bullet points bullet.function = function(x, is.null.text){ if(is.null(x)){ bullet = is.null.text } else if(!is.null(x)){ bullet = paste("Restricted to - ", paste(x, collapse = ", ")) } ...
/R/z05.bullet.points.R
no_license
DanielGardiner/AutomatedExceedanceDescriptiveEpi
R
false
false
1,551
r
# create bullet points for first page of report describing any restrictions to the data # create function to generate bullet points bullet.function = function(x, is.null.text){ if(is.null(x)){ bullet = is.null.text } else if(!is.null(x)){ bullet = paste("Restricted to - ", paste(x, collapse = ", ")) } ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_symbols_list.R \name{get_symbols_list} \alias{get_symbols_list} \title{Get all available symbols} \usage{ get_symbols_list(index = "any") } \arguments{ \item{index}{Includes only symbols that appear in determined indexes ('sp500'). Deaful...
/man/get_symbols_list.Rd
permissive
sebastianBIanalytics/rfinance
R
false
true
601
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_symbols_list.R \name{get_symbols_list} \alias{get_symbols_list} \title{Get all available symbols} \usage{ get_symbols_list(index = "any") } \arguments{ \item{index}{Includes only symbols that appear in determined indexes ('sp500'). Deaful...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/forwardfeatureselection.R \name{forwardfeatureselection} \alias{forwardfeatureselection} \title{Forward Feature Selection. Performs forward feature selection on the given list of features, placing them in order of discriminative power using a...
/man/forwardfeatureselection.Rd
no_license
Core-Bioinformatics/feamiR
R
false
true
1,966
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/forwardfeatureselection.R \name{forwardfeatureselection} \alias{forwardfeatureselection} \title{Forward Feature Selection. Performs forward feature selection on the given list of features, placing them in order of discriminative power using a...
\name{as.box3} \Rdversion{1.1} \alias{as.box3} \title{ Convert Data to Three-Dimensional Box } \description{ Interprets data as the dimensions of a three-dimensional box. } \usage{ as.box3(...) } \arguments{ \item{\dots}{ Data that can be interpreted as giving the dimensions of a three-dimensional box. Se...
/man/as.box3.Rd
no_license
cuulee/spatstat
R
false
false
1,301
rd
\name{as.box3} \Rdversion{1.1} \alias{as.box3} \title{ Convert Data to Three-Dimensional Box } \description{ Interprets data as the dimensions of a three-dimensional box. } \usage{ as.box3(...) } \arguments{ \item{\dots}{ Data that can be interpreted as giving the dimensions of a three-dimensional box. Se...
#install.packages('glmnet') #install.packages('ISLR') #install.packages('plotmo') library(plotmo) # nicer plotting of glmnet output library(glmnet) # this contains procedures for fitting ridge and lasso library(ISLR) # load for data set 'Hitters' attach(Hitters) # works since we loaded the package ISLR #...
/Kaggle-Submission-master/STA314-Lecture05-HittersDataAnalysis-LASSO.R
no_license
HJNVR/UTM_STA_314
R
false
false
1,499
r
#install.packages('glmnet') #install.packages('ISLR') #install.packages('plotmo') library(plotmo) # nicer plotting of glmnet output library(glmnet) # this contains procedures for fitting ridge and lasso library(ISLR) # load for data set 'Hitters' attach(Hitters) # works since we loaded the package ISLR #...
### riskRegressionLight-package.R --- ##---------------------------------------------------------------------- ## Author: Brice Ozenne ## Created: maj 6 2019 (14:57) ## Version: ## Last-Updated: maj 6 2019 (15:02) ## By: Brice Ozenne ## Update #: 4 ##-------------------------------------------------...
/R/riskRegressionLight-package.R
no_license
bozenne/riskRegressionLight
R
false
false
3,679
r
### riskRegressionLight-package.R --- ##---------------------------------------------------------------------- ## Author: Brice Ozenne ## Created: maj 6 2019 (14:57) ## Version: ## Last-Updated: maj 6 2019 (15:02) ## By: Brice Ozenne ## Update #: 4 ##-------------------------------------------------...
\alias{ATK} \name{ATK} \title{ATK} \description{ATK is the Accessibility Toolkit. It provides a set of generic interfaces allowing accessibility technologies to interact with a graphical user interface. For example, a screen reader uses ATK to discover the text in an interface and read it to blind users. GTK+ widgets h...
/man/ATK.Rd
no_license
cran/RGtk2
R
false
false
3,159
rd
\alias{ATK} \name{ATK} \title{ATK} \description{ATK is the Accessibility Toolkit. It provides a set of generic interfaces allowing accessibility technologies to interact with a graphical user interface. For example, a screen reader uses ATK to discover the text in an interface and read it to blind users. GTK+ widgets h...
################################################################################ ## mlr3 weighted observation ################################################################################ # Creating tasks and learners --------------------------------------------- ml_task <- mlr3::TaskRegr$new(id = "mtcars", backend...
/inst/demos/learning-weights.R
permissive
harell/mlr3
R
false
false
1,029
r
################################################################################ ## mlr3 weighted observation ################################################################################ # Creating tasks and learners --------------------------------------------- ml_task <- mlr3::TaskRegr$new(id = "mtcars", backend...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gplots.R \name{gplot.table} \alias{gplot.table} \title{gplot method for \code{table} objects} \usage{ \method{gplot}{table}( x, type = "h", ylim = c(0, max(x)), lwd = 2, xlab = NULL, ylab = NULL, frame.plot = is.num, ..., gr...
/man/gplot.table.Rd
no_license
raredd/plotr
R
false
true
1,338
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gplots.R \name{gplot.table} \alias{gplot.table} \title{gplot method for \code{table} objects} \usage{ \method{gplot}{table}( x, type = "h", ylim = c(0, max(x)), lwd = 2, xlab = NULL, ylab = NULL, frame.plot = is.num, ..., gr...
library('derfinder') library('devtools') library('BiocParallel') library('getopt') ## Specify parameters spec <- matrix(c( 'chr', 'c', 1, 'character', 'Chromosome in the following format: chr1, chrX, chrY', 'help' , 'h', 0, 'logical', 'Display help' ), byrow=TRUE, ncol=5) opt <- getopt(spec) ## if help was aske...
/gtex/DER_analysis/coverageMatrix/run_railMatrix.R
permissive
gitter-badger/runs
R
false
false
2,156
r
library('derfinder') library('devtools') library('BiocParallel') library('getopt') ## Specify parameters spec <- matrix(c( 'chr', 'c', 1, 'character', 'Chromosome in the following format: chr1, chrX, chrY', 'help' , 'h', 0, 'logical', 'Display help' ), byrow=TRUE, ncol=5) opt <- getopt(spec) ## if help was aske...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get.data.set.R \name{get.data.set} \alias{get.data.set} \title{Get expression data set} \usage{ get.data.set(geo.id, output.dir, is.annotation = F) } \arguments{ \item{geo.id}{GEO id.} \item{output.dir}{Output directory to write / look for f...
/man/get.data.set.Rd
no_license
emreg00/pepper
R
false
true
388
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get.data.set.R \name{get.data.set} \alias{get.data.set} \title{Get expression data set} \usage{ get.data.set(geo.id, output.dir, is.annotation = F) } \arguments{ \item{geo.id}{GEO id.} \item{output.dir}{Output directory to write / look for f...
library(RSelenium) ?tryCatch driver<- rsDriver(browser=c("chrome")) #starting selenium server for chrome browser remDr <- driver[["client"]] #linking chrome browser remDr$navigate("https://unicheck.com/login/business/") EMail <- remDr$findElement(using = "css","[class='_1uOq0o']") #selecting email ...
/All R Codes/Download Unicheck.R
no_license
ashutoshsingh25/R-Scripts
R
false
false
3,064
r
library(RSelenium) ?tryCatch driver<- rsDriver(browser=c("chrome")) #starting selenium server for chrome browser remDr <- driver[["client"]] #linking chrome browser remDr$navigate("https://unicheck.com/login/business/") EMail <- remDr$findElement(using = "css","[class='_1uOq0o']") #selecting email ...
library(muHVT) ### Name: predictHVT ### Title: predictHVT ### Aliases: predictHVT ### Keywords: predict ### ** Examples data(USArrests) #Split in train and test train <- USArrests[1:40,] test <- USArrests[41:50,] hvt.results <- list() hvt.results <- HVT(train, nclust = 3, depth = 2, quant.err = 0.2, ...
/data/genthat_extracted_code/muHVT/examples/predictHVT.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
478
r
library(muHVT) ### Name: predictHVT ### Title: predictHVT ### Aliases: predictHVT ### Keywords: predict ### ** Examples data(USArrests) #Split in train and test train <- USArrests[1:40,] test <- USArrests[41:50,] hvt.results <- list() hvt.results <- HVT(train, nclust = 3, depth = 2, quant.err = 0.2, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PeptidePCA.R \docType{data} \name{convmat.4} \alias{convmat.4} \title{Amino acid conversion matrix with 4 properties} \format{A data frame with 20 rows (amino acids) and 4 columns (properties)} \usage{ data(convmat.4) } \description{ Conversi...
/man/convmat.4.Rd
no_license
ParhamLab/PeptidePCA
R
false
true
545
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PeptidePCA.R \docType{data} \name{convmat.4} \alias{convmat.4} \title{Amino acid conversion matrix with 4 properties} \format{A data frame with 20 rows (amino acids) and 4 columns (properties)} \usage{ data(convmat.4) } \description{ Conversi...
library(ggsci) library(dplyr) library(viridis) library(ggplot2) library(anytime) library(wordcloud) library(hrbrthemes) library(RColorBrewer) set.seed(101) df <- read.csv("claps_v1.csv", stringsAsFactors = FALSE) df$datePosted <- as.POSIXlt(df$postedAt, origin="1970-01-01") df$yearPosted <- df$date$year + 1900 df$mon...
/claps_viz.R
no_license
tharangni/medium-scraper
R
false
false
2,529
r
library(ggsci) library(dplyr) library(viridis) library(ggplot2) library(anytime) library(wordcloud) library(hrbrthemes) library(RColorBrewer) set.seed(101) df <- read.csv("claps_v1.csv", stringsAsFactors = FALSE) df$datePosted <- as.POSIXlt(df$postedAt, origin="1970-01-01") df$yearPosted <- df$date$year + 1900 df$mon...
library(shiny) library(DT) library(RColorBrewer) plot_cols <- brewer.pal(11, 'Spectral') shinyServer(function(input, output) { if (!Sys.info()[['sysname']] == 'Darwin'){ # When running on shinyapps.io, create a virtualenv reticulate::virtualenv_create(envname = 'python35_env', ...
/Hospital capacity/Python integration/server.R
no_license
maxeyre/COVID-19
R
false
false
2,317
r
library(shiny) library(DT) library(RColorBrewer) plot_cols <- brewer.pal(11, 'Spectral') shinyServer(function(input, output) { if (!Sys.info()[['sysname']] == 'Darwin'){ # When running on shinyapps.io, create a virtualenv reticulate::virtualenv_create(envname = 'python35_env', ...
### RUN DT # install.packages("rpart") library(rpart) ##### train_path <- "../Python/train_input" train_filenames <- list.files(train_path, pattern="*.csv", full.names=FALSE) train_df <- data.frame() num_train_files <- length(train_filenames) for (i in 1:num_train_files){ temp_train_file_path <- paste(train_path, "/...
/forced-alignment/boundary_corrections/R/dt_all.R
no_license
cwtliu/conversational-forced-alignment
R
false
false
2,032
r
### RUN DT # install.packages("rpart") library(rpart) ##### train_path <- "../Python/train_input" train_filenames <- list.files(train_path, pattern="*.csv", full.names=FALSE) train_df <- data.frame() num_train_files <- length(train_filenames) for (i in 1:num_train_files){ temp_train_file_path <- paste(train_path, "/...
library("knitr") library("rgl") #knit("aminoethyl_phosphoro.Rmd") #markdownToHTML('aminoethyl_phosphoro.md', 'aminoethyl_phosphoro.html', options=c("use_xhml")) #system("pandoc -s aminoethyl_phosphoro.html -o aminoethyl_phosphoro.pdf") knit2html('aminoethyl_phosphoro.Rmd')
/FDA_Pesticide_Glossary/aminoethyl_phosphoro.R
permissive
andrewdefries/andrewdefries.github.io
R
false
false
276
r
library("knitr") library("rgl") #knit("aminoethyl_phosphoro.Rmd") #markdownToHTML('aminoethyl_phosphoro.md', 'aminoethyl_phosphoro.html', options=c("use_xhml")) #system("pandoc -s aminoethyl_phosphoro.html -o aminoethyl_phosphoro.pdf") knit2html('aminoethyl_phosphoro.Rmd')
context("Test Suite 2 (States) --> State 2.1") library(RSelenium) library(testthat) source("functions.R", local=TRUE) drivers <- getRemDrivers("Test Suite 2 (States) --> State 2.1") rD <- drivers$rDr remDr <- drivers$remDr openRemDriver(remDr) tryCatch({ test_that("can connect to app", { connectToApp(remDr) ...
/tests/testthat/testSuite002-states-testState2.1.R
permissive
jstockwin/EpiEstimApp
R
false
false
2,792
r
context("Test Suite 2 (States) --> State 2.1") library(RSelenium) library(testthat) source("functions.R", local=TRUE) drivers <- getRemDrivers("Test Suite 2 (States) --> State 2.1") rD <- drivers$rDr remDr <- drivers$remDr openRemDriver(remDr) tryCatch({ test_that("can connect to app", { connectToApp(remDr) ...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/compMetaLandsat.R \name{compMetaLandsat} \alias{compMetaLandsat} \title{Get calibration information from Landsat 8 standard level 1B/T filename} \usage{ compMetaLandsat(files) } \arguments{ \item{files}{Path and filename of the Landsa...
/man/compMetaLandsat.Rd
no_license
BENR0/satellite
R
false
false
2,260
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/compMetaLandsat.R \name{compMetaLandsat} \alias{compMetaLandsat} \title{Get calibration information from Landsat 8 standard level 1B/T filename} \usage{ compMetaLandsat(files) } \arguments{ \item{files}{Path and filename of the Landsa...
##' Simple MC integration on the simplex for joint excess probability, ##' in the PB model. ##' ##' @title Estimates the probability of joint excess, given a PB parameter. ##' @param par the DM parameter, as a list ##' @param thres the multivariate threshold ##' @param precision The desired relative precision of the ...
/R/excessProb.pb.r
no_license
cran/BMAmevt
R
false
false
7,959
r
##' Simple MC integration on the simplex for joint excess probability, ##' in the PB model. ##' ##' @title Estimates the probability of joint excess, given a PB parameter. ##' @param par the DM parameter, as a list ##' @param thres the multivariate threshold ##' @param precision The desired relative precision of the ...
## Camera trap Analytics Course - ICCB, Cartagena, July 22, 2017 ## Jorge Ahumada @ Conservation International ## ----Load libraries------------------------ library(TeachingDemos) library(lubridate) library(unmarked) library(ggplot2) library(dplyr) library(chron) library(vegan) library(activity) library(ggmap) library...
/silvania-temporario/silvania-data-analysis.R
no_license
ICMBio-CENAP/REST-REM
R
false
false
7,792
r
## Camera trap Analytics Course - ICCB, Cartagena, July 22, 2017 ## Jorge Ahumada @ Conservation International ## ----Load libraries------------------------ library(TeachingDemos) library(lubridate) library(unmarked) library(ggplot2) library(dplyr) library(chron) library(vegan) library(activity) library(ggmap) library...
step1 <- function(consumer_key, callback_url) { pocket_url <- "https://getpocket.com/v3/oauth/request" body <- list(consumer_key = consumer_key, redirect_uri = callback_url) request <- httr::POST(pocket_url, body = body, encode = "form") httr::stop_for_status(request) code <- httr::content(request)$code v...
/R/main.R
no_license
filipstachura/pocketr
R
false
false
1,414
r
step1 <- function(consumer_key, callback_url) { pocket_url <- "https://getpocket.com/v3/oauth/request" body <- list(consumer_key = consumer_key, redirect_uri = callback_url) request <- httr::POST(pocket_url, body = body, encode = "form") httr::stop_for_status(request) code <- httr::content(request)$code v...
## ----setup, echo=FALSE, results="asis"---------------------------------------- library(rebook) chapterPreamble() ## ---- message=FALSE----------------------------------------------------------- library(mia) ## ---- warning=FALSE, message=FALSE-------------------------------------------- # Load example data librar...
/R/12_quality_control.R
no_license
microbiome/OMA
R
false
false
7,060
r
## ----setup, echo=FALSE, results="asis"---------------------------------------- library(rebook) chapterPreamble() ## ---- message=FALSE----------------------------------------------------------- library(mia) ## ---- warning=FALSE, message=FALSE-------------------------------------------- # Load example data librar...
#' vcr recording options #' #' @section once: #' The `once` record mode will: #' #' - Replay previously recorded interactions. #' - Record new interactions if there is no cassette file. #' - Cause an error to be raised for new requests if there is a cassette file. #' #' #' It is similar to the `new_episodes` record mod...
/R/recording.R
permissive
pat-s/vcr
R
false
false
1,561
r
#' vcr recording options #' #' @section once: #' The `once` record mode will: #' #' - Replay previously recorded interactions. #' - Record new interactions if there is no cassette file. #' - Cause an error to be raised for new requests if there is a cassette file. #' #' #' It is similar to the `new_episodes` record mod...
library(ggplot2) ### Name: theme_get ### Title: Get, set, and modify the active theme ### Aliases: theme_get theme_set theme_update theme_replace %+replace% ### ** Examples p <- ggplot(mtcars, aes(mpg, wt)) + geom_point() p # Use theme_set() to completely override the current theme. # Here we have the old theme ...
/data/genthat_extracted_code/ggplot2/examples/theme_get.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
975
r
library(ggplot2) ### Name: theme_get ### Title: Get, set, and modify the active theme ### Aliases: theme_get theme_set theme_update theme_replace %+replace% ### ** Examples p <- ggplot(mtcars, aes(mpg, wt)) + geom_point() p # Use theme_set() to completely override the current theme. # Here we have the old theme ...
library(igraph) ### Name: igraph-vs-indexing2 ### Title: Select vertices and show their metadata ### Aliases: igraph-vs-indexing2 [[.igraph.vs ### ** Examples g <- make_ring(10) %>% set_vertex_attr("color", value = "red") %>% set_vertex_attr("name", value = LETTERS[1:10]) V(g) V(g)[[]] V(g)[1:5] V(g)[[1:5]]
/data/genthat_extracted_code/igraph/examples/igraph-vs-indexing2.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
320
r
library(igraph) ### Name: igraph-vs-indexing2 ### Title: Select vertices and show their metadata ### Aliases: igraph-vs-indexing2 [[.igraph.vs ### ** Examples g <- make_ring(10) %>% set_vertex_attr("color", value = "red") %>% set_vertex_attr("name", value = LETTERS[1:10]) V(g) V(g)[[]] V(g)[1:5] V(g)[[1:5]]
FixedNBinary <- function(kappa0, n, props, raters=2, alpha=0.05) { #Error Checking if ( (raters != 1) && (raters !=2) && (raters !=3) && (raters != 4) && (raters != 5) && (raters != 6) ) stop("Sorry, this function is designed for between 2 to 6 raters.") if (length(props) == 1) { if ((props >= 1) || (p...
/R/FixedNBinary.R
no_license
cran/kappaSize
R
false
false
7,498
r
FixedNBinary <- function(kappa0, n, props, raters=2, alpha=0.05) { #Error Checking if ( (raters != 1) && (raters !=2) && (raters !=3) && (raters != 4) && (raters != 5) && (raters != 6) ) stop("Sorry, this function is designed for between 2 to 6 raters.") if (length(props) == 1) { if ((props >= 1) || (p...
\name{export.eps} \alias{export.eps} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Exports a graph to an EPS file.} \description{ Exports a graph from the current device in R, or the \code{graphsheet} in S-Plus, to an \code{EPS} file. } \usage{ export.eps(FileName.in, Name.in="GSD2...
/man/export.eps.Rd
no_license
PhDMeiwp/HH
R
false
false
1,625
rd
\name{export.eps} \alias{export.eps} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Exports a graph to an EPS file.} \description{ Exports a graph from the current device in R, or the \code{graphsheet} in S-Plus, to an \code{EPS} file. } \usage{ export.eps(FileName.in, Name.in="GSD2...
# Setup ------------------------------------------------------------------ library(ghyp) library(rugarch) library(zoo) library(tictoc) rm(list = ls()) MODEL_NAME <- 'constant_ghskt' N <- 1000 load(sprintf('data/derived/model_copula_%s.RData', MODEL_NAME)) load('data/derived/model_GARCH.RData') load('data/derived/wee...
/do_var_constant.R
no_license
4350/grandslam
R
false
false
2,507
r
# Setup ------------------------------------------------------------------ library(ghyp) library(rugarch) library(zoo) library(tictoc) rm(list = ls()) MODEL_NAME <- 'constant_ghskt' N <- 1000 load(sprintf('data/derived/model_copula_%s.RData', MODEL_NAME)) load('data/derived/model_GARCH.RData') load('data/derived/wee...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gui_featureSetVisualization.R \name{FeatureSetVisualization} \alias{FeatureSetVisualization} \title{Shiny Server Function for Feature Set Component} \usage{ FeatureSetVisualization(input, output, session, stringsAsFactors, feat.object) } \arg...
/man/FeatureSetVisualization.Rd
no_license
hansterc/flacco
R
false
true
1,367
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gui_featureSetVisualization.R \name{FeatureSetVisualization} \alias{FeatureSetVisualization} \title{Shiny Server Function for Feature Set Component} \usage{ FeatureSetVisualization(input, output, session, stringsAsFactors, feat.object) } \arg...
# # ## Marta R. Hidalgo # # library(hipathia) # context("Create report") # # data("brca") # data("comp") # data(results) # extdata_folder <- system.file("extdata", package = "hipathia") # output_folder <- paste0(extdata_folder, "/save_noColors") # mgi <- load_pathways("hsa", pathways_list = c("hsa03320", "hsa04012")) #...
/tests/testthat/test-create-report.R
no_license
mialaalv/hipathia
R
false
false
2,171
r
# # ## Marta R. Hidalgo # # library(hipathia) # context("Create report") # # data("brca") # data("comp") # data(results) # extdata_folder <- system.file("extdata", package = "hipathia") # output_folder <- paste0(extdata_folder, "/save_noColors") # mgi <- load_pathways("hsa", pathways_list = c("hsa03320", "hsa04012")) #...
library(glmnet) mydata = read.table("./TrainingSet/RF/stomach.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.2,family="gaussian",standardize=FALSE) sink('./Model/EN/Classifier/stomach/stomach_034.txt',append=TR...
/Model/EN/Classifier/stomach/stomach_034.R
no_license
leon1003/QSMART
R
false
false
353
r
library(glmnet) mydata = read.table("./TrainingSet/RF/stomach.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.2,family="gaussian",standardize=FALSE) sink('./Model/EN/Classifier/stomach/stomach_034.txt',append=TR...
pumaPCALikelihoodBound <- function ( model , expectations , varY , Y ) { dataDim <- dim(Y)[2] numData <- dim(Y)[1] # z <- rep(0,numData) # s <- rep(0,numData) # s1 <- rep(0,numData) # s2 <- rep(0,numData) # s3 <- matrix(0, numData, dataDim) # trxHatCxHatT <- rep(0, numData) sigm...
/R/pumaPCALikelihoodBound.R
no_license
PUGEA/puma
R
false
false
2,066
r
pumaPCALikelihoodBound <- function ( model , expectations , varY , Y ) { dataDim <- dim(Y)[2] numData <- dim(Y)[1] # z <- rep(0,numData) # s <- rep(0,numData) # s1 <- rep(0,numData) # s2 <- rep(0,numData) # s3 <- matrix(0, numData, dataDim) # trxHatCxHatT <- rep(0, numData) sigm...
data <- read.table("/Users/Nikon/Desktop/Econ_stats/part 2/moscow_covid/covid_moscow.txt") names(data) data$V1 <- as.Date(data$V1, "%d.%m.%Y") data plot(data$V1, data$V3, main = "Stats Covid-19 in Moscow", xlab = "Date", ylab = "Count new incidence", col.main = "red",type = "l", lwd = 0.5, col = "blue", axes = TRUE...
/for_git/part 2/covid_moscow.r
no_license
candelabrum/econom_2020
R
false
false
680
r
data <- read.table("/Users/Nikon/Desktop/Econ_stats/part 2/moscow_covid/covid_moscow.txt") names(data) data$V1 <- as.Date(data$V1, "%d.%m.%Y") data plot(data$V1, data$V3, main = "Stats Covid-19 in Moscow", xlab = "Date", ylab = "Count new incidence", col.main = "red",type = "l", lwd = 0.5, col = "blue", axes = TRUE...
library(plyr) library(ape) compare_near_order <- function(number_br,number_cell,ts){ #################################################################################################### #################################################################################################### #extract the tree,...
/simulation/FiguresS10_Scenarios11_12/Scenario11_result/MO_Binary/Binary_Adjacent_Order_accuracy_finite_count.R
no_license
DavidSimone/MO
R
false
false
16,128
r
library(plyr) library(ape) compare_near_order <- function(number_br,number_cell,ts){ #################################################################################################### #################################################################################################### #extract the tree,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_R2.R \name{get_R2.lm} \alias{get_R2.lm} \title{R2 and adjusted R2 for Linear Models.} \usage{ \method{get_R2}{lm}(fit, ...) } \arguments{ \item{fit}{A linear model.} \item{...}{Arguments passed to or from other methods.} } \description{ ...
/man/get_R2.lm.Rd
permissive
HugoNjb/psycho.R
R
false
true
550
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_R2.R \name{get_R2.lm} \alias{get_R2.lm} \title{R2 and adjusted R2 for Linear Models.} \usage{ \method{get_R2}{lm}(fit, ...) } \arguments{ \item{fit}{A linear model.} \item{...}{Arguments passed to or from other methods.} } \description{ ...
#' Raw water level at ruta3 #' #' @format A data.frame with 2 columns: #' \describe{ #' \item{Date}{dates in POSIXct format} #' \item{LEVEL}{Water level (m)} #' } #' @source \url{http://agua.unorte.edu.uy/} "level_ruta3"
/R/level_ruta3.R
no_license
rafaelnavas/SanAntonioData
R
false
false
225
r
#' Raw water level at ruta3 #' #' @format A data.frame with 2 columns: #' \describe{ #' \item{Date}{dates in POSIXct format} #' \item{LEVEL}{Water level (m)} #' } #' @source \url{http://agua.unorte.edu.uy/} "level_ruta3"
utils::globalVariables(c('time', 'value', 'level_data', '..cols_breaks', '.', 'weekday', 'Date', 'level', 'heart_rate',...
/R/fitbit_utils.R
no_license
lucaz01/fitbitViz
R
false
false
77,148
r
utils::globalVariables(c('time', 'value', 'level_data', '..cols_breaks', '.', 'weekday', 'Date', 'level', 'heart_rate',...
#' Perfil de distribución por profundidad #' #' Crea un gráfico de perfil de distribución por profundidad de la biomasa o número de una especie o grupo de especies a partir de los datos de peso y número de la faunística tomados en una campaña #' @param gr Grupo de la especie: 1 peces, 2 crustaceos 3 moluscos 4 equinode...
/R/DpthPrfl.r
no_license
Franvgls/CampR
R
false
false
7,288
r
#' Perfil de distribución por profundidad #' #' Crea un gráfico de perfil de distribución por profundidad de la biomasa o número de una especie o grupo de especies a partir de los datos de peso y número de la faunística tomados en una campaña #' @param gr Grupo de la especie: 1 peces, 2 crustaceos 3 moluscos 4 equinode...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_all_tests.R \name{get_all_tests} \alias{get_all_tests} \title{get_all_tests} \usage{ get_all_tests(api_key, page_size = 50, page_number = 1) } \arguments{ \item{api_key}{An active GTmetrix API key. (string)} \item{page_size}{Page size (d...
/man/get_all_tests.Rd
no_license
s-mohanasundaram/rgtmx
R
false
true
605
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_all_tests.R \name{get_all_tests} \alias{get_all_tests} \title{get_all_tests} \usage{ get_all_tests(api_key, page_size = 50, page_number = 1) } \arguments{ \item{api_key}{An active GTmetrix API key. (string)} \item{page_size}{Page size (d...
baujat.rma.peto <- function (x, xlim, ylim, xlab, ylab, cex, grid = TRUE, ...) { if (!is.element("rma.peto", class(x))) stop("Argument 'x' must be an object of class \"rma.peto\".") na.act <- getOption("na.action") if (!is.element(na.act, c("na.omit", "na.exclude", "na.fail", "na.p...
/metafor/R/baujat.rma.peto.r
no_license
ingted/R-Examples
R
false
false
2,188
r
baujat.rma.peto <- function (x, xlim, ylim, xlab, ylab, cex, grid = TRUE, ...) { if (!is.element("rma.peto", class(x))) stop("Argument 'x' must be an object of class \"rma.peto\".") na.act <- getOption("na.action") if (!is.element(na.act, c("na.omit", "na.exclude", "na.fail", "na.p...
library("matrixStats") FUNs <- list( varDiffs=c(rowVarDiffs, colVarDiffs), sdDiff=c(rowSdDiffs, colSdDiffs) ) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Subsetted tests # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - source("utils/validateIndicesFramework.R") for (fcn i...
/tests/rowVarDiffs_var,sd_subset.R
no_license
kaushikg06/matrixStats
R
false
false
1,112
r
library("matrixStats") FUNs <- list( varDiffs=c(rowVarDiffs, colVarDiffs), sdDiff=c(rowSdDiffs, colSdDiffs) ) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Subsetted tests # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - source("utils/validateIndicesFramework.R") for (fcn i...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/displayOptPath.R \name{displayOptPath} \alias{displayOptPath} \title{Display MOGSA's Optimization Path as a HTML or LaTeX table.} \usage{ displayOptPath(opt.path, format = "html", ...) } \arguments{ \item{opt.path}{[\code{\link{data.frame}}]\...
/man/displayOptPath.Rd
permissive
lgslegend/mogsa
R
false
true
1,174
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/displayOptPath.R \name{displayOptPath} \alias{displayOptPath} \title{Display MOGSA's Optimization Path as a HTML or LaTeX table.} \usage{ displayOptPath(opt.path, format = "html", ...) } \arguments{ \item{opt.path}{[\code{\link{data.frame}}]\...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/finalfit.R \name{finalfit} \alias{finalfit} \alias{finalfit.lm} \alias{finalfit.glm} \alias{finalfit.coxph} \title{Final output tables for common regression models} \usage{ finalfit( .data, dependent, explanatory, explanatory_multi = ...
/man/finalfit.Rd
no_license
migariane/finalfit
R
false
true
6,522
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/finalfit.R \name{finalfit} \alias{finalfit} \alias{finalfit.lm} \alias{finalfit.glm} \alias{finalfit.coxph} \title{Final output tables for common regression models} \usage{ finalfit( .data, dependent, explanatory, explanatory_multi = ...
# find patch borders by row. # patch0 is patch data with NA replaced by 0, patch_number is a vector of ordered patch numbers # border_count is an array, initailly 0 but will be filled with the number of times patch i # touches patch j. the diagonal will be the number of times patch i touches anything. find_border_row<...
/RHESSysPreprocessing/R/find_bprder_row.R
no_license
renjianning/RHESSys_2018
R
false
false
1,779
r
# find patch borders by row. # patch0 is patch data with NA replaced by 0, patch_number is a vector of ordered patch numbers # border_count is an array, initailly 0 but will be filled with the number of times patch i # touches patch j. the diagonal will be the number of times patch i touches anything. find_border_row<...
######################## # Caculcate points for all rounds ######################### library(tidyverse) round_stop <- 38 pen_min <- 4 pen_max <- 20 hor_min <- 1 hor_max <- 10 f_hor_min <- 3 f_hor_max <- 7 runs <- (pen_max-pen_min+1)*(hor_max-hor_min+1)*(f_hor_max-f_hor_min+1) run <- 1 penalty_horizon_ov <- data.fram...
/Rcode/R/points_forecasting/.Rproj.user/817FEB5B/sources/per/t/4215FDDD-contents
no_license
willisgram/master_thesis
R
false
false
9,555
######################## # Caculcate points for all rounds ######################### library(tidyverse) round_stop <- 38 pen_min <- 4 pen_max <- 20 hor_min <- 1 hor_max <- 10 f_hor_min <- 3 f_hor_max <- 7 runs <- (pen_max-pen_min+1)*(hor_max-hor_min+1)*(f_hor_max-f_hor_min+1) run <- 1 penalty_horizon_ov <- data.fram...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{not_empty} \alias{not_empty} \title{Function to check if input path is empty} \usage{ not_empty(file) } \arguments{ \item{file}{image path} } \value{ True if file path is specified else false } \description{ Function to chec...
/smur/man/not_empty.Rd
no_license
portergoh/capstone
R
false
true
347
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{not_empty} \alias{not_empty} \title{Function to check if input path is empty} \usage{ not_empty(file) } \arguments{ \item{file}{image path} } \value{ True if file path is specified else false } \description{ Function to chec...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pvs_formulas.R \name{scriteria_phase} \alias{scriteria_phase} \title{Percentages and scores by Plant Development} \usage{ scriteria_phase(phase, data) } \arguments{ \item{phase}{Phase or Stage of the plant development. There are 3 options: Fl...
/man/scriteria_phase.Rd
permissive
c5sire/sbformula
R
false
true
463
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pvs_formulas.R \name{scriteria_phase} \alias{scriteria_phase} \title{Percentages and scores by Plant Development} \usage{ scriteria_phase(phase, data) } \arguments{ \item{phase}{Phase or Stage of the plant development. There are 3 options: Fl...
GET("https://opendata.ecdc.europa.eu/covid19/casedistribution/csv", authenticate(":", ":", type="ntlm"), write_disk(tf <- tempfile(fileext = ".csv"))) ##select data <- read.csv(tf) head(data) mydata <-filter(data, deaths > 1000) mydata ####barplot with > deaths ggplot(data = country, aes(x = reorder(c...
/countrydeaths.R
no_license
Four33/Corona
R
false
false
1,158
r
GET("https://opendata.ecdc.europa.eu/covid19/casedistribution/csv", authenticate(":", ":", type="ntlm"), write_disk(tf <- tempfile(fileext = ".csv"))) ##select data <- read.csv(tf) head(data) mydata <-filter(data, deaths > 1000) mydata ####barplot with > deaths ggplot(data = country, aes(x = reorder(c...
## New members ---- v.structure <- read.csv2(file = "/Users/gaston/Desktop/ifp/new_member_structure.csv") v.structure %>% filter(is.na(id.interview), name != "") %>% select(name) # 263 new members new.members <- v.structure %>% filter(is.na(id.interview), name != "") summary(new.members) new.members$a...
/new_members.R
no_license
gbizel/debt
R
false
false
978
r
## New members ---- v.structure <- read.csv2(file = "/Users/gaston/Desktop/ifp/new_member_structure.csv") v.structure %>% filter(is.na(id.interview), name != "") %>% select(name) # 263 new members new.members <- v.structure %>% filter(is.na(id.interview), name != "") summary(new.members) new.members$a...
rm(list=ls()) source(paste0(here::here(), "/0-config.R")) d <- readRDS(paste0(BV_dir,"/results/mortality-results/full_cox_results.RDS")) %>% filter(!is.na(HR)) dim(d) head(d) d %>% distinct(studyid) d %>% ungroup() %>% distinct(X, Y) d[is.na(d$studyid),] d <- d %>% mutate( Xname = case_when(X=="stunt" ...
/5-visualizations/risk factors/02-HR-sens-figs.R
no_license
child-growth/ki-longitudinal-growth
R
false
false
6,608
r
rm(list=ls()) source(paste0(here::here(), "/0-config.R")) d <- readRDS(paste0(BV_dir,"/results/mortality-results/full_cox_results.RDS")) %>% filter(!is.na(HR)) dim(d) head(d) d %>% distinct(studyid) d %>% ungroup() %>% distinct(X, Y) d[is.na(d$studyid),] d <- d %>% mutate( Xname = case_when(X=="stunt" ...
#################################################################### ## Title: Preprocess Radar Data ## Date: 22 October 2019 ## Author: Andrew Zammit-Mangion ## Description: Takes the Radar dataset as described in Wikle et al. ## (2019) and regrids it on a 64 x 64 grid. Then puts ## the data ...
/1_Preproc_data/1_3_proc_Radar_data.R
no_license
rishirelan/deepIDE
R
false
false
3,064
r
#################################################################### ## Title: Preprocess Radar Data ## Date: 22 October 2019 ## Author: Andrew Zammit-Mangion ## Description: Takes the Radar dataset as described in Wikle et al. ## (2019) and regrids it on a 64 x 64 grid. Then puts ## the data ...
#' Data from ple.27.24-32 #' #' @name ple.27.24-32 #' @format csv file #' @tafOriginator ICES, WGCSE #' @tafYear 2020 #' @tafAccess Public #' @tafSource script library(icesTAF) source(taf.boot.path("..", "utilities_bootstrap.R")) data <- get_soa_fs("ple.27.2432_2020_v2") data$stock_code <- "ple.27.24-32" data$assessm...
/bootstrap/ple.27.24-32.R
no_license
ices-taf/2020_4029-29_SpecialRequest
R
false
false
353
r
#' Data from ple.27.24-32 #' #' @name ple.27.24-32 #' @format csv file #' @tafOriginator ICES, WGCSE #' @tafYear 2020 #' @tafAccess Public #' @tafSource script library(icesTAF) source(taf.boot.path("..", "utilities_bootstrap.R")) data <- get_soa_fs("ple.27.2432_2020_v2") data$stock_code <- "ple.27.24-32" data$assessm...
# Decision Tree Regression # Importing the dataset dataset = read.csv('Position_Salaries.csv') dataset = dataset[2:3] # install.packages('rpart') library(rpart) regressor = rpart(formula = Salary ~ ., data = dataset, control = rpart.control(minsplit = 1)) # Predicting a new result...
/2. Regression/5. Decision Tree Regression/decision_tree_regression.R
permissive
JaydipRadadiya/Machine-Learning-A2Z
R
false
false
838
r
# Decision Tree Regression # Importing the dataset dataset = read.csv('Position_Salaries.csv') dataset = dataset[2:3] # install.packages('rpart') library(rpart) regressor = rpart(formula = Salary ~ ., data = dataset, control = rpart.control(minsplit = 1)) # Predicting a new result...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tags.R \name{htmlPreserve} \alias{htmlPreserve} \alias{extractPreserveChunks} \alias{restorePreserveChunks} \title{Preserve HTML regions} \usage{ htmlPreserve(x) extractPreserveChunks(strval) restorePreserveChunks(strval, chunks) } \argumen...
/man/htmlPreserve.Rd
no_license
rstudio/htmltools
R
false
true
2,330
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tags.R \name{htmlPreserve} \alias{htmlPreserve} \alias{extractPreserveChunks} \alias{restorePreserveChunks} \title{Preserve HTML regions} \usage{ htmlPreserve(x) extractPreserveChunks(strval) restorePreserveChunks(strval, chunks) } \argumen...
## ---------------------------------------------------------------------- ## FUNCTIONS OPERATING ON DATES ## ---------------------------------------------------------------------- ## TODO: ## - re-write as generic to both allow df and individual columns ## name it: convert.date ## - possibly extract "convert.unknown...
/R/convert_dates.R
no_license
DeborahVogt/DM_secuTrial_R
R
false
false
14,303
r
## ---------------------------------------------------------------------- ## FUNCTIONS OPERATING ON DATES ## ---------------------------------------------------------------------- ## TODO: ## - re-write as generic to both allow df and individual columns ## name it: convert.date ## - possibly extract "convert.unknown...
setwd("/development/projects/statisticallyfit/github/learningmathstat/RStatistics/STAT320 Generalized Linear Models/") source('/development/projects/statisticallyfit/github/learningmathstat/RStatistics/STAT320 Generalized Linear Models/ASSIGNMENTS/A4/plotTools.R') library(ggfortify) library(lme4) # for glmer() for fi...
/STAT320 Generalized Linear Models/ASSIGNMENTS/A4/Question1_Tick_GLMM.R
no_license
statisticallyfit/RStatistics
R
false
false
10,481
r
setwd("/development/projects/statisticallyfit/github/learningmathstat/RStatistics/STAT320 Generalized Linear Models/") source('/development/projects/statisticallyfit/github/learningmathstat/RStatistics/STAT320 Generalized Linear Models/ASSIGNMENTS/A4/plotTools.R') library(ggfortify) library(lme4) # for glmer() for fi...
#eda getwd() setwd("E:/Other Business/RamonPioRoda/eda/") getwd() ## Download File URL = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" destfile = "household_power_consumption.zip" download.file(URL, destfile) dir() ###### unzip(destfile) dir() ################ Plot 1 dataFi...
/plot1.R
no_license
PIOLORODA-DOSTCO/ExData_Plotting1
R
false
false
766
r
#eda getwd() setwd("E:/Other Business/RamonPioRoda/eda/") getwd() ## Download File URL = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" destfile = "household_power_consumption.zip" download.file(URL, destfile) dir() ###### unzip(destfile) dir() ################ Plot 1 dataFi...
#' Perform a descendant search for a query term #' #' This function will take a query term, and find all descendants and neighbors of that term #' in the specified ontologies. By default, a match is considered if a the query is a subset #' of a database entry. i.e., "alzheimer" matches "Alzheimer's disease". #' This pr...
/R/output_gene_prioritization.R
no_license
jeinson/PhenolyzerR
R
false
false
8,337
r
#' Perform a descendant search for a query term #' #' This function will take a query term, and find all descendants and neighbors of that term #' in the specified ontologies. By default, a match is considered if a the query is a subset #' of a database entry. i.e., "alzheimer" matches "Alzheimer's disease". #' This pr...
# Title : Data Clean NSW - ITS # Objective : Clean NSW Datasets and process for modelling # Created by: TOsosanya # Created on: 02/06/2020 library(dplyr) library(magrittr) library(DescTools) library(readxl) library(tidyr) library(data.table) ## its projects # Functions ------------------------------------------...
/tfnsw/R_post_intervention/scripts/ITS NPI.R
no_license
tayoso2/tfnsw_2020
R
false
false
7,845
r
# Title : Data Clean NSW - ITS # Objective : Clean NSW Datasets and process for modelling # Created by: TOsosanya # Created on: 02/06/2020 library(dplyr) library(magrittr) library(DescTools) library(readxl) library(tidyr) library(data.table) ## its projects # Functions ------------------------------------------...
Clout.by.month <- read.csv("C:/Users/NABIL AHMED/Desktop/Assignment 1/cleaned/arham by month/Clout-by-month.csv") View(Clout.by.month) clout2=ts(Clout.by.month$Clout,frequency=12,start=c(2002,1)) clout2 plot(clout2) clout3=decompose(clout2) plot(clout3)
/by month/clout by month.R
no_license
nabilahmed06/Data-Analytics-
R
false
false
271
r
Clout.by.month <- read.csv("C:/Users/NABIL AHMED/Desktop/Assignment 1/cleaned/arham by month/Clout-by-month.csv") View(Clout.by.month) clout2=ts(Clout.by.month$Clout,frequency=12,start=c(2002,1)) clout2 plot(clout2) clout3=decompose(clout2) plot(clout3)
source("./functions/choose_properties.R") source("./functions/create_encodings.R") source("./functions/encode_amyloids.R") source("./functions/cv.R") source("./functions/cv_analysis.R") source("./functions/make_classifier.R") source("./functions/plot_tools.R") if(Sys.info()["nodename"] == "tobit" ) setwd("~/Dropbox/...
/functions/publication_functions/pub_functions.R
no_license
michbur/prediction_amyloidogenicity_ngram
R
false
false
8,827
r
source("./functions/choose_properties.R") source("./functions/create_encodings.R") source("./functions/encode_amyloids.R") source("./functions/cv.R") source("./functions/cv_analysis.R") source("./functions/make_classifier.R") source("./functions/plot_tools.R") if(Sys.info()["nodename"] == "tobit" ) setwd("~/Dropbox/...
model.setup <- function(sudriv, settings = "settings.json",writeO=TRUE,f.path.hru=NA,f.path.transK=NA,f.path.hyperfun=NA, ...){ options(list(stringsAsFactors = FALSE)) if(class(settings) == "character"){ settings <- fromJSON(file = settings, ...) }else if(class(settings) ...
/sudriv_package/R/model.setup.r
no_license
LXJ1002/sudriv
R
false
false
3,569
r
model.setup <- function(sudriv, settings = "settings.json",writeO=TRUE,f.path.hru=NA,f.path.transK=NA,f.path.hyperfun=NA, ...){ options(list(stringsAsFactors = FALSE)) if(class(settings) == "character"){ settings <- fromJSON(file = settings, ...) }else if(class(settings) ...
# Figure S8 library(ape) library(adephylo) mytree <- function(col) { cat("((((human:",file[1,col],",chimpanzee:",file[2,col],"):",file[3,col],",orangutan:",file[4,col],"):",file[5,col],",(baboon:",file[6,col],",rhesus_macaque:",file[7,col],"):",file[8,col],"):",file[9,col],",marmoset:",file[10,col],");", sep="", fi...
/FigureS8.R
no_license
priyamoorjani/Molecular-clock_figures-and-data
R
false
false
2,069
r
# Figure S8 library(ape) library(adephylo) mytree <- function(col) { cat("((((human:",file[1,col],",chimpanzee:",file[2,col],"):",file[3,col],",orangutan:",file[4,col],"):",file[5,col],",(baboon:",file[6,col],",rhesus_macaque:",file[7,col],"):",file[8,col],"):",file[9,col],",marmoset:",file[10,col],");", sep="", fi...
library(readr) library(tidyverse) data = read_csv("C:/Users/Emma/Desktop/prgdnkp1.csv") data = data %>% select(c("AGE_R", "B_Q01a", "B_Q01a3", "B_Q01b", "B_Q02a", "B_Q02b","B_Q02c", "B_Q04a", "B_Q05a", "B_Q05b", "B_Q...
/oecd_skills.R
no_license
erikmnielsen/Speciale-oecon
R
false
false
3,279
r
library(readr) library(tidyverse) data = read_csv("C:/Users/Emma/Desktop/prgdnkp1.csv") data = data %>% select(c("AGE_R", "B_Q01a", "B_Q01a3", "B_Q01b", "B_Q02a", "B_Q02b","B_Q02c", "B_Q04a", "B_Q05a", "B_Q05b", "B_Q...
############################################################################### # 413_Assignment_09.R # Last updated: 2016-03-08 by MJG ############################################################################### # Clear workspace rm(list=ls()) # Load packages library(fBasics) library(fGarch) library(MTS) library(...
/413_Assignment_09.R
no_license
jmichaelgilbert/mspaScripts
R
false
false
18,079
r
############################################################################### # 413_Assignment_09.R # Last updated: 2016-03-08 by MJG ############################################################################### # Clear workspace rm(list=ls()) # Load packages library(fBasics) library(fGarch) library(MTS) library(...
library(tidyverse) rst_data<-read.csv("Restrictions data.csv") covid_data<-read.csv("covid data.csv") flights_data<-read.csv("flights data\\flights data.csv") #formatting the flights data names(flights_data) <- substring(names(flights_data),2,8) colnames(flights_data)[1]<-"country" colnames(flights_data)[2:1...
/ASAP_group6_Rscript/Code to put databases together.R
no_license
baozcheng/ASAPgroup
R
false
false
1,420
r
library(tidyverse) rst_data<-read.csv("Restrictions data.csv") covid_data<-read.csv("covid data.csv") flights_data<-read.csv("flights data\\flights data.csv") #formatting the flights data names(flights_data) <- substring(names(flights_data),2,8) colnames(flights_data)[1]<-"country" colnames(flights_data)[2:1...
setwd("E:/Dropbox/Dropbox/Data Science Courses/Data Science Specialization/04 - Exploratory Data Analysis/exdata%2Fdata%2Fhousehold_power_consumption") ## Getting full dataset data_full <- read.csv("E:/Dropbox/Dropbox/Data Science Courses/Data Science Specialization/04 - Exploratory Data Analysis/exdata%2Fdata%2Fho...
/plot1.R
no_license
DataScienceCours/ExData_Plotting1
R
false
false
1,050
r
setwd("E:/Dropbox/Dropbox/Data Science Courses/Data Science Specialization/04 - Exploratory Data Analysis/exdata%2Fdata%2Fhousehold_power_consumption") ## Getting full dataset data_full <- read.csv("E:/Dropbox/Dropbox/Data Science Courses/Data Science Specialization/04 - Exploratory Data Analysis/exdata%2Fdata%2Fho...
#------------------------------------------------------------------------------- # Copyright (c) 2012 University of Illinois, NCSA. # All rights reserved. This program and the accompanying materials # are made available under the terms of the # University of Illinois/NCSA Open Source License # which accompanies this d...
/utils/R/help.R
permissive
davidjpmoore/pecan
R
false
false
2,628
r
#------------------------------------------------------------------------------- # Copyright (c) 2012 University of Illinois, NCSA. # All rights reserved. This program and the accompanying materials # are made available under the terms of the # University of Illinois/NCSA Open Source License # which accompanies this d...
## The makecacheMatrix function set a matrix as the input. The matrix object ## can cache it's own objects. ## set an function where the matrix is the input makeCacheMatrix <- function(x = matrix()) { invMatrix <- NULL setMatrix <- function(y){ x <<- y invMatr...
/cachematrix.R
no_license
DrNeutrophil/ProgrammingAssignment2
R
false
false
2,074
r
## The makecacheMatrix function set a matrix as the input. The matrix object ## can cache it's own objects. ## set an function where the matrix is the input makeCacheMatrix <- function(x = matrix()) { invMatrix <- NULL setMatrix <- function(y){ x <<- y invMatr...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/wrappers.R \name{createStyle} \alias{createStyle} \title{Create a cell style} \usage{ createStyle(fontName = NULL, fontSize = NULL, fontColour = NULL, numFmt = "GENERAL", border = NULL, borderColour = getOption("openxlsx.borderCol...
/man/createStyle.Rd
no_license
ktaranov/openxlsx
R
false
false
5,257
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/wrappers.R \name{createStyle} \alias{createStyle} \title{Create a cell style} \usage{ createStyle(fontName = NULL, fontSize = NULL, fontColour = NULL, numFmt = "GENERAL", border = NULL, borderColour = getOption("openxlsx.borderCol...
setwd("/Users/silv6928/crossfitgamesdata") rmarkdown::render_site()
/build_site.R
no_license
tonytrill/crossfitgamesdata
R
false
false
69
r
setwd("/Users/silv6928/crossfitgamesdata") rmarkdown::render_site()
#### filter the pca source("~/edu/mpg-envinsys-plygrnd/mpg-envinfosys-teams-2018-rs_18_axmideda/src/000_env_setup.R") source("~/edu/mpg-envinsys-plygrnd/mpg-envinfosys-teams-2018-rs_18_axmideda/src/filterFunction.R") shape = readOGR("~/edu/mpg-envinsys-plygrnd/data/data_mof/training.shp") ############ preparation#####...
/src/009_predictor_preparation.R
no_license
goergen95/mof_caldern
R
false
false
2,310
r
#### filter the pca source("~/edu/mpg-envinsys-plygrnd/mpg-envinfosys-teams-2018-rs_18_axmideda/src/000_env_setup.R") source("~/edu/mpg-envinsys-plygrnd/mpg-envinfosys-teams-2018-rs_18_axmideda/src/filterFunction.R") shape = readOGR("~/edu/mpg-envinsys-plygrnd/data/data_mof/training.shp") ############ preparation#####...
## makeCacheMatrix is a function creating a matrix object ## that may cache its inverse. makeCacheMatrix <- function(x = matrix()) { inv = NULL set = function(y) { x <<- y inv <<- NULL } get = function() x setinv = function(inverse) inv <<- inverse getinv = function() inv list(set=set, get=get, s...
/cachematrix.R
no_license
dsapnguyen/CourseraProgAssignment2
R
false
false
1,134
r
## makeCacheMatrix is a function creating a matrix object ## that may cache its inverse. makeCacheMatrix <- function(x = matrix()) { inv = NULL set = function(y) { x <<- y inv <<- NULL } get = function() x setinv = function(inverse) inv <<- inverse getinv = function() inv list(set=set, get=get, s...
library(data.table) factDistCreate <- function (df) { factorSize <- sapply(df, function(x) { if (is.factor(x)) { return (length(levels(x)));} else { return (-1);} } ) facts <- which(factorSize >= 0) factDist <- data.table() # if there's not TARGET if (!('TARGET' %in% names(df))) { TARGET <- 0 } fo...
/code/fe_func.R
no_license
RobotkaKaggle/KaggleDaysParis
R
false
false
1,775
r
library(data.table) factDistCreate <- function (df) { factorSize <- sapply(df, function(x) { if (is.factor(x)) { return (length(levels(x)));} else { return (-1);} } ) facts <- which(factorSize >= 0) factDist <- data.table() # if there's not TARGET if (!('TARGET' %in% names(df))) { TARGET <- 0 } fo...
## Set Working Directory setwd("C:/Users/dave_/OneDrive/GitHub/Coursera/Exploratory Data Analysis/Week 1/ExData_Plotting1") ## Load the data uci <- read.table("household_power_consumption.txt", header = TRUE, sep=";") ## Tidy the data before we plot uci$Date <- as.Date(uci$Date, format = "%d/%m/%Y") ## Set the Date v...
/plot2.R
no_license
DaveHeatonOH/ExData_Plotting1
R
false
false
1,111
r
## Set Working Directory setwd("C:/Users/dave_/OneDrive/GitHub/Coursera/Exploratory Data Analysis/Week 1/ExData_Plotting1") ## Load the data uci <- read.table("household_power_consumption.txt", header = TRUE, sep=";") ## Tidy the data before we plot uci$Date <- as.Date(uci$Date, format = "%d/%m/%Y") ## Set the Date v...
#' Extract residuals from a grpreg or grpsurv fit #' #' Currently, only deviance residuals are supported. #' #' @param object Object of class `grpreg` or `grpsurv`. #' @param lambda Values of the regularization parameter at which residuals are requested (numeric vector). For values of lambda not in the sequence o...
/R/residuals.R
no_license
pbreheny/grpreg
R
false
false
2,624
r
#' Extract residuals from a grpreg or grpsurv fit #' #' Currently, only deviance residuals are supported. #' #' @param object Object of class `grpreg` or `grpsurv`. #' @param lambda Values of the regularization parameter at which residuals are requested (numeric vector). For values of lambda not in the sequence o...
#' Given position return rectangle code. #' #' #' Functions that convert positions in decimal degrees latitude and longitude #' to rectangle codes for statistical rectangles, their subrectangles or #' rectangle codes in systems of various resolutions as described below and #' relating to (see \code{\link{rect2deg}})....
/R/deg2rect.R
no_license
Hafro/geo
R
false
false
3,653
r
#' Given position return rectangle code. #' #' #' Functions that convert positions in decimal degrees latitude and longitude #' to rectangle codes for statistical rectangles, their subrectangles or #' rectangle codes in systems of various resolutions as described below and #' relating to (see \code{\link{rect2deg}})....
### Determine Data Distribution Script ## Install & Load Required Library Packages # Install if it's not installed on this computer pkg <- c("fitdistrplus","logspline","tidyverse") new.pkg <- pkg[!(pkg %in% installed.packages())] if (length(new.pkg)) { install.packages(new.pkg) } rm(pkg,new.pkg) # load the library ...
/analytics/userDefinedFcns/thesis_paper_determineDistribution.R
permissive
cosmomeese/mhsc-thesis
R
false
false
1,943
r
### Determine Data Distribution Script ## Install & Load Required Library Packages # Install if it's not installed on this computer pkg <- c("fitdistrplus","logspline","tidyverse") new.pkg <- pkg[!(pkg %in% installed.packages())] if (length(new.pkg)) { install.packages(new.pkg) } rm(pkg,new.pkg) # load the library ...
\encoding{UTF-8} \name{pauc} \alias{pauc} \title{ Calculates the p-values } \description{ This auxiliary function calculates the p-value of the statistical significance test of the difference of samples from two classes using AUC values (for each input feature). It takes as an input the results of the AUC v...
/fuzzedpackages/Biocomb/man/pauc.Rd
no_license
akhikolla/testpackages
R
false
false
2,152
rd
\encoding{UTF-8} \name{pauc} \alias{pauc} \title{ Calculates the p-values } \description{ This auxiliary function calculates the p-value of the statistical significance test of the difference of samples from two classes using AUC values (for each input feature). It takes as an input the results of the AUC v...
library(lgr) ### Name: pad_right ### Title: Pad Character Vectors ### Aliases: pad_right pad_left ### ** Examples pad_left("foo", 5) pad_right("foo", 5, ".") pad_left(c("foo", "foooooo"), pad = ".")
/data/genthat_extracted_code/lgr/examples/pad_right.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
206
r
library(lgr) ### Name: pad_right ### Title: Pad Character Vectors ### Aliases: pad_right pad_left ### ** Examples pad_left("foo", 5) pad_right("foo", 5, ".") pad_left(c("foo", "foooooo"), pad = ".")
# makeCacheMatrix creates a list containing a function to # 1. set the value of the matrix # 2. get the value of the matrix # 3. set the value of inverse of the matrix # 4. get the value of inverse of the matrix makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y ...
/cachematrix.R
no_license
cadarsh88/ProgrammingAssignment2
R
false
false
1,078
r
# makeCacheMatrix creates a list containing a function to # 1. set the value of the matrix # 2. get the value of the matrix # 3. set the value of inverse of the matrix # 4. get the value of inverse of the matrix makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils_volume.R \name{unmask_subcortex} \alias{unmask_subcortex} \title{Undo a volumetric mask} \usage{ unmask_subcortex(dat, mask, fill = NA) } \arguments{ \item{dat}{Data matrix with locations along the rows and measurements along the column...
/man/unmask_subcortex.Rd
no_license
mandymejia/ciftiTools
R
false
true
884
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils_volume.R \name{unmask_subcortex} \alias{unmask_subcortex} \title{Undo a volumetric mask} \usage{ unmask_subcortex(dat, mask, fill = NA) } \arguments{ \item{dat}{Data matrix with locations along the rows and measurements along the column...
################################################################# # THIS PROGRAM BUILD A 2.5D MAP ON GDP PER INH. IN EUROPE IN 2016 # N. LAMBERT, 2019 ################################################################# library("sf") library("rnaturalearth") library("cartography") library("eurostat") library("reshape2") ...
/_archives/ironcurtain.R
no_license
neocarto/ironcurtain
R
false
false
8,170
r
################################################################# # THIS PROGRAM BUILD A 2.5D MAP ON GDP PER INH. IN EUROPE IN 2016 # N. LAMBERT, 2019 ################################################################# library("sf") library("rnaturalearth") library("cartography") library("eurostat") library("reshape2") ...
### In this program I will calculate UnoC for models A, B, C and D (female cohort) ## First load relevant packageslibrary(mice) library(mice) library(foreach) library(doParallel) library(dplyr) library(survival) library(nnet) library(VGAM) library(knitr) # Load packages library(survcomp) library(survAUC) library(Hmisc...
/Chapter 3/code/p2.5.1 generate_discrim_measures_female_UnoC.R
no_license
alexpate30/AlexPate-PhD
R
false
false
33,312
r
### In this program I will calculate UnoC for models A, B, C and D (female cohort) ## First load relevant packageslibrary(mice) library(mice) library(foreach) library(doParallel) library(dplyr) library(survival) library(nnet) library(VGAM) library(knitr) # Load packages library(survcomp) library(survAUC) library(Hmisc...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/misc.R \name{run_DESeq2} \alias{run_DESeq2} \title{Run DEseq2} \usage{ run_DESeq2(data, colData, design, workers = 8) } \description{ This function allows you to run DESeq2 if provided required data } \examples{ run_DESeq2() } \keyword{DESeq2...
/man/run_DESeq2.Rd
no_license
naikai/sake
R
false
true
322
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/misc.R \name{run_DESeq2} \alias{run_DESeq2} \title{Run DEseq2} \usage{ run_DESeq2(data, colData, design, workers = 8) } \description{ This function allows you to run DESeq2 if provided required data } \examples{ run_DESeq2() } \keyword{DESeq2...
\name{kmknnnews} \title{kmknn News} \encoding{UTF-8} \section{Version 1.0.0}{\itemize{ \item New package kmknn, for k-means-based k-nearest neighbor detection. }}
/inst/NEWS.Rd
no_license
avanindra/kmknn
R
false
false
165
rd
\name{kmknnnews} \title{kmknn News} \encoding{UTF-8} \section{Version 1.0.0}{\itemize{ \item New package kmknn, for k-means-based k-nearest neighbor detection. }}
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/render.R \name{my_render} \alias{my_render} \title{Render an Rmd file} \usage{ my_render(rmd) } \arguments{ \item{rmd}{Path of the R Markdown file to render.} } \description{ Render an Rmd file }
/man/my_render.Rd
no_license
privefl/minipkg
R
false
true
274
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/render.R \name{my_render} \alias{my_render} \title{Render an Rmd file} \usage{ my_render(rmd) } \arguments{ \item{rmd}{Path of the R Markdown file to render.} } \description{ Render an Rmd file }
## test data for bb(): texttest <- "Bedeutet nach jedem Vokal oder Diphtong die Konsonanten..." test_vec <- strsplit(texttest, " ")[[1]] test_matrix <- matrix(test_vec, nrow = 2, ncol = 4, byrow = TRUE) test_array <- array(test_vec, dim = c(2, 2, 2)) test_list <- as.list(test_vec) test_listoflists <- list(as.list(test_...
/test-s3-bb.R
no_license
fort-w2021/s3-ex-marquach
R
false
false
1,887
r
## test data for bb(): texttest <- "Bedeutet nach jedem Vokal oder Diphtong die Konsonanten..." test_vec <- strsplit(texttest, " ")[[1]] test_matrix <- matrix(test_vec, nrow = 2, ncol = 4, byrow = TRUE) test_array <- array(test_vec, dim = c(2, 2, 2)) test_list <- as.list(test_vec) test_listoflists <- list(as.list(test_...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MCMC_Utilities.R \name{is.spBFA} \alias{is.spBFA} \title{is.spBFA} \usage{ is.spBFA(x) } \arguments{ \item{x}{object to be tested.} } \value{ \code{is.spBFA} returns a logical, depending on whether the object is of class \code{\link{spBFA}}. ...
/man/is.spBFA.Rd
no_license
berchuck/spBFA
R
false
true
679
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MCMC_Utilities.R \name{is.spBFA} \alias{is.spBFA} \title{is.spBFA} \usage{ is.spBFA(x) } \arguments{ \item{x}{object to be tested.} } \value{ \code{is.spBFA} returns a logical, depending on whether the object is of class \code{\link{spBFA}}. ...
\name{rrsc} \alias{rrsc} \title{Data class rrsc} \description{ Data class rrsc } \section{Fields}{ \itemize{ \item[\code{estimate}]{ vector with point and interval estimate} \item[\code{rnd}]{ how many digits to round display} \item[\code{alpha}]{ complement of c.i.} \item[\code{estimator}]{ either \code{"PF"...
/man/rrscclass.Rd
no_license
tmrealphd/PF
R
false
false
484
rd
\name{rrsc} \alias{rrsc} \title{Data class rrsc} \description{ Data class rrsc } \section{Fields}{ \itemize{ \item[\code{estimate}]{ vector with point and interval estimate} \item[\code{rnd}]{ how many digits to round display} \item[\code{alpha}]{ complement of c.i.} \item[\code{estimator}]{ either \code{"PF"...
#Trying different models #Data frame containing all errors errors = as.data.frame(matrix(data = NA, nrow = 4, ncol = 4)) colnames(errors) = c('directDataLearn', 'directDataTest', 'enhancedLearn', 'enhancedTest') rownames(errors) = c('Decesion Tree', 'Logistic regression', 'Lasso Regression', 'Ridge Regression') #Func...
/model.R
no_license
Simobain/MLexerciceInternshipDataiku
R
false
false
707
r
#Trying different models #Data frame containing all errors errors = as.data.frame(matrix(data = NA, nrow = 4, ncol = 4)) colnames(errors) = c('directDataLearn', 'directDataTest', 'enhancedLearn', 'enhancedTest') rownames(errors) = c('Decesion Tree', 'Logistic regression', 'Lasso Regression', 'Ridge Regression') #Func...
# ***************************************************************************** # Task: RETAIL SALES FORECASTING CASE STUDY # Course: PGDDA Course, IIIT- BANGALORE # Time Line: Oct - Dec 2016 # Team: AtchiReddy Chavva (atchireddi@gmail.com) # Ananth Bommakanti (ananth.bommaka...
/GlobalMart/Global Mart.R
no_license
armandohalder/UpGrad-Projects
R
false
false
79,146
r
# ***************************************************************************** # Task: RETAIL SALES FORECASTING CASE STUDY # Course: PGDDA Course, IIIT- BANGALORE # Time Line: Oct - Dec 2016 # Team: AtchiReddy Chavva (atchireddi@gmail.com) # Ananth Bommakanti (ananth.bommaka...
library (igraph) ##################################################################################################################### # Main Function # ##################################################################...
/CP-structure.R
no_license
AnkitDimri/spreading-patterns-sna-cores
R
false
false
12,334
r
library (igraph) ##################################################################################################################### # Main Function # ##################################################################...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) {i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x setinverse <- function(inverse) i <<- inverse getinverse <- functi...
/cachematrix.R
no_license
agam1999/ProgrammingAssignment2
R
false
false
706
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) {i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x setinverse <- function(inverse) i <<- inverse getinverse <- functi...
# Let's define the colors for the Main Methods: colors4 <- c("black", "deepskyblue2", "orange", "deeppink3") colors4 <- c("black", "deepskyblue2", "deeppink2", "orange", "deeppink4") colors4 <- c("black", "deepskyblue2", "orange", "deeppink2") names4 <- c("Raw", "Quantile", "noob", "Funnorm") names4 <- c("Raw", "Quan...
/paper_figures_filtered/generate.main.results.plots.R
no_license
Jfortin1/funnorm_repro
R
false
false
7,766
r
# Let's define the colors for the Main Methods: colors4 <- c("black", "deepskyblue2", "orange", "deeppink3") colors4 <- c("black", "deepskyblue2", "deeppink2", "orange", "deeppink4") colors4 <- c("black", "deepskyblue2", "orange", "deeppink2") names4 <- c("Raw", "Quantile", "noob", "Funnorm") names4 <- c("Raw", "Quan...
######################## ******* PART 2 ******* ################### # Write a function that reads a directory full of files and reports the # number of completely observed cases in each data file. The function # should return a data frame where the first column is the name of the # file and the second column is ...
/complete.R
no_license
Veena-S/RProgramming
R
false
false
1,528
r
######################## ******* PART 2 ******* ################### # Write a function that reads a directory full of files and reports the # number of completely observed cases in each data file. The function # should return a data frame where the first column is the name of the # file and the second column is ...
# Pass a vector of strings with packages required in the analysis InstallPackages <- function(a){ # check to see if packages in passed vector are already installed. # If not, then put the package name in new.packages new.packages <- a[!(a %in% installed.packages()[ , "Package"])] # If there is anything listed ...
/modeling_clv_w_linear_regression.R
no_license
ewc2g/datacamp_training
R
false
false
3,198
r
# Pass a vector of strings with packages required in the analysis InstallPackages <- function(a){ # check to see if packages in passed vector are already installed. # If not, then put the package name in new.packages new.packages <- a[!(a %in% installed.packages()[ , "Package"])] # If there is anything listed ...