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
chrom.to.num <- function(x){ x <- gsub("group", "", x) chrom.rom <- as.character(as.roman(c(1:21))) return(match(x, chrom.rom)) }
/shared_functions/chrom_to_num.R
permissive
ksamuk/gene_flow_linkage
R
false
false
132
r
chrom.to.num <- function(x){ x <- gsub("group", "", x) chrom.rom <- as.character(as.roman(c(1:21))) return(match(x, chrom.rom)) }
colores<-c( '#032B35', '#0D413A', '#0D413A', '#1BA9CF', '#2991AE', '#3FC172', '#3FC172') reds_greens<-c('#7FCDAE', '#9AD97B', '#E5C877', '#EB9474', '#EE7772') lj_greens<-c('#00B74A','#00D95A','#14E569') lj_purples<-c('#410B68','#570b84','#5E0F96') lj_blacks<-c('#000000','#101010','#202020') lj_whites<-c(...
/theme.R
no_license
1HughSawbridge/ngeso_embedded_forecasts
R
false
false
3,246
r
colores<-c( '#032B35', '#0D413A', '#0D413A', '#1BA9CF', '#2991AE', '#3FC172', '#3FC172') reds_greens<-c('#7FCDAE', '#9AD97B', '#E5C877', '#EB9474', '#EE7772') lj_greens<-c('#00B74A','#00D95A','#14E569') lj_purples<-c('#410B68','#570b84','#5E0F96') lj_blacks<-c('#000000','#101010','#202020') lj_whites<-c(...
################################################################################ # DESCRIPTION: PROCESS ACTIGRAPH DATA FILES # AUTHOR: SHI XIN # CONTACT: STEVEXINSHI@GMAIL.COM # LAST EDIT: 2018-12-03 ################################################################################ # GUIDELINES # use 15 sec fi...
/scripts/process_data.R
no_license
Energy-Balance-Lab-VUMC/soslow
R
false
false
47,152
r
################################################################################ # DESCRIPTION: PROCESS ACTIGRAPH DATA FILES # AUTHOR: SHI XIN # CONTACT: STEVEXINSHI@GMAIL.COM # LAST EDIT: 2018-12-03 ################################################################################ # GUIDELINES # use 15 sec fi...
#2019.5.29 #https://www.tidyverse.org/articles/2019/05/vroom-1-0-0/ p_load(vroom) ?vroom ##读取文件速度超级快 ##读入OTU,注意从Results_2019.2.21里面读 setwd('E:/桌面/2017.8.11-8.17-内蒙采样/Results_2019.2.21/') OTU_dat=vroom("uparse/97/uparse_otu_table_combine.txt") spec(OTU_dat) #查看每一列变量类型 file <- "https://raw.githubuserco...
/文件及序列处理/vroom.R
no_license
mrzhangqjankun/R-code-for-myself
R
false
false
498
r
#2019.5.29 #https://www.tidyverse.org/articles/2019/05/vroom-1-0-0/ p_load(vroom) ?vroom ##读取文件速度超级快 ##读入OTU,注意从Results_2019.2.21里面读 setwd('E:/桌面/2017.8.11-8.17-内蒙采样/Results_2019.2.21/') OTU_dat=vroom("uparse/97/uparse_otu_table_combine.txt") spec(OTU_dat) #查看每一列变量类型 file <- "https://raw.githubuserco...
library(CoxPhLb) ### Name: coxphlb.phtest ### Title: Test the Proportional Hazards Assumption of Cox Model with ### Right-Censored Length-Biased Data ### Aliases: coxphlb.phtest ### ** Examples ## Not run: ##D # Fit a Cox model ##D fit.ee <- coxph.lb(ExampleData1$y, ExampleData1$a, ExampleData1$delta, ##D ...
/data/genthat_extracted_code/CoxPhLb/examples/coxphlb.phtest.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
990
r
library(CoxPhLb) ### Name: coxphlb.phtest ### Title: Test the Proportional Hazards Assumption of Cox Model with ### Right-Censored Length-Biased Data ### Aliases: coxphlb.phtest ### ** Examples ## Not run: ##D # Fit a Cox model ##D fit.ee <- coxph.lb(ExampleData1$y, ExampleData1$a, ExampleData1$delta, ##D ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/iplot_abundance.R \name{iplot_abundance} \alias{iplot_abundance} \title{Plot of the Relative Abundance of the Pollen Types} \usage{ iplot_abundance(data, n.types = 15, y.start = NULL, y.end = NULL, interpolation = TRUE, int.method = ...
/man/iplot_abundance.Rd
no_license
aerobiology/AeRobiology
R
false
true
7,860
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/iplot_abundance.R \name{iplot_abundance} \alias{iplot_abundance} \title{Plot of the Relative Abundance of the Pollen Types} \usage{ iplot_abundance(data, n.types = 15, y.start = NULL, y.end = NULL, interpolation = TRUE, int.method = ...
library(magrittr) legislators <- c("current", "historic") %>% paste0("https://www.govtrack.us/data/congress-legislators/legislators-", ., ".csv") %>% lapply(read.csv) %>% rbindlist legislators[last_name %like% "Burdick" & first_name %like% "Jocelyn", icpsr_id := 49103] setnames(legislators, c("icpsr_id", ...
/dev/get_govtrack_legislators_csv_data_extended.R
no_license
Hershberger/partycalls
R
false
false
452
r
library(magrittr) legislators <- c("current", "historic") %>% paste0("https://www.govtrack.us/data/congress-legislators/legislators-", ., ".csv") %>% lapply(read.csv) %>% rbindlist legislators[last_name %like% "Burdick" & first_name %like% "Jocelyn", icpsr_id := 49103] setnames(legislators, c("icpsr_id", ...
.First.lib <- function(libname, pkgname) library.dynam(.package.name, pkgname, libname) .onLoad <- .First.lib
/proj4/R/zzz.R
no_license
ingted/R-Examples
R
false
false
113
r
.First.lib <- function(libname, pkgname) library.dynam(.package.name, pkgname, libname) .onLoad <- .First.lib
# Title: Private Auxiliary Functions for Summary Measures # Author: Shivansh Kumar # Date: 1 May 2019 # Description: Code creates all the required private auxiliary functions for summary measures for the binomial R package. # Private auxiliary functions include aux_mean(), aux_variance(), aux_mode(), aux_skewness(), au...
/binomial/R/private-auxiliary-functions-summary-measures.R
no_license
stat133-sp19/hw-stat133-shivanshk5
R
false
false
2,324
r
# Title: Private Auxiliary Functions for Summary Measures # Author: Shivansh Kumar # Date: 1 May 2019 # Description: Code creates all the required private auxiliary functions for summary measures for the binomial R package. # Private auxiliary functions include aux_mean(), aux_variance(), aux_mode(), aux_skewness(), au...
library(dplyr) library(readr) library(stringr) library(tidyr) library(purrr) library(readxl) library(googlesheets4) #read in schema df_schema <- readxl::read_excel("schema.xlsx", sheet = "master_table") %>% filter(!str_detect(STATUS, "remove|REMOVE|eliminate")) empty_schema <- df_schema %>% select(field, type)...
/data_prep_scripts/prep_source_scripts/prep_just_harvest_google_sheets.R
permissive
CodeForPittsburgh/food-access-map-data
R
false
false
4,584
r
library(dplyr) library(readr) library(stringr) library(tidyr) library(purrr) library(readxl) library(googlesheets4) #read in schema df_schema <- readxl::read_excel("schema.xlsx", sheet = "master_table") %>% filter(!str_detect(STATUS, "remove|REMOVE|eliminate")) empty_schema <- df_schema %>% select(field, type)...
# test_collaborator_all------------------- library(collaborator) # Test data_dict ---------------------- testthat::test_that("data_dict excludes variables", {testthat::expect_equal(as.character(data_dict(collaborator::example_data_dict, var_exclude = c("id_num","sex"))$variable[8]), ...
/tests/testthat/test_collaborator_all.R
no_license
kamclean/collaborator
R
false
false
2,307
r
# test_collaborator_all------------------- library(collaborator) # Test data_dict ---------------------- testthat::test_that("data_dict excludes variables", {testthat::expect_equal(as.character(data_dict(collaborator::example_data_dict, var_exclude = c("id_num","sex"))$variable[8]), ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ch.AIC.r \name{ch.AIC} \alias{ch.AIC} \title{A function calculate the AIC from a model fit} \usage{ ch.AIC(y, fitY, numParameters, standardize = FALSE) } \arguments{ \item{y}{A numeric vector containing the empirical Y from the data.} \item{...
/man/ch.AIC.Rd
no_license
ccpluncw/ccpl_R_chutils
R
false
true
1,003
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ch.AIC.r \name{ch.AIC} \alias{ch.AIC} \title{A function calculate the AIC from a model fit} \usage{ ch.AIC(y, fitY, numParameters, standardize = FALSE) } \arguments{ \item{y}{A numeric vector containing the empirical Y from the data.} \item{...
library(checkmate) library(testthat) context("gs_rectangle") test_that("output is valid geometry", { coords <- data.frame(x = c(40, 70, 70, 50), y = c(40, 40, 60, 70), fid = 1) output <- gs_rectangle(anchor = coords) expect_class(output, classes = "geom") expect_...
/tests/testthat/test_gs_rectangle.R
no_license
EhrmannS/geometr
R
false
false
431
r
library(checkmate) library(testthat) context("gs_rectangle") test_that("output is valid geometry", { coords <- data.frame(x = c(40, 70, 70, 50), y = c(40, 40, 60, 70), fid = 1) output <- gs_rectangle(anchor = coords) expect_class(output, classes = "geom") expect_...
# Functions to calculate confusion matrices - returned as a named vector # Get CM at Specified threshold value of threshold_type #' Title #' #' @param predictions A vector of predictions in (0, 1) from estimator #' @param labels A vector of binary truth labels #' @param threshold_type One of ("prob", "sens", "spec", "...
/R/confusion_mat_functions.R
no_license
james-roose/cvAUCcompare
R
false
false
2,513
r
# Functions to calculate confusion matrices - returned as a named vector # Get CM at Specified threshold value of threshold_type #' Title #' #' @param predictions A vector of predictions in (0, 1) from estimator #' @param labels A vector of binary truth labels #' @param threshold_type One of ("prob", "sens", "spec", "...
#This script plots the emission states of the ChromHMM analysis for Figure S2H #Requires the emmision state .txt file from /NGS_downstream/ChromHMM.sh as input library(tidyverse) library(egg) library(extrafont) loadfonts() theme_set(theme_classic() + theme(legend.title = element_text(size = 6, family = "Arial"), plo...
/NGS_downstream/scripts/ChromHMM.R
permissive
hjanime/Xert_paper
R
false
false
1,948
r
#This script plots the emission states of the ChromHMM analysis for Figure S2H #Requires the emmision state .txt file from /NGS_downstream/ChromHMM.sh as input library(tidyverse) library(egg) library(extrafont) loadfonts() theme_set(theme_classic() + theme(legend.title = element_text(size = 6, family = "Arial"), plo...
testlist <- list(A = structure(c(2.32784507357645e-308, 9.53818253928576e+295, 1.98938959033562e+307, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_ro...
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613108208-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
344
r
testlist <- list(A = structure(c(2.32784507357645e-308, 9.53818253928576e+295, 1.98938959033562e+307, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_ro...
% Generated by roxygen2 (4.1.1.9000): do not edit by hand % Please edit documentation in R/install.R \name{system.PATH} \alias{system.PATH} \title{Returns the search path for executable files} \usage{ system.PATH() } \value{ A character vector with the search path for executable files } \description{ Returns the search...
/man/system.PATH.Rd
no_license
absolutoslo/installr
R
false
false
542
rd
% Generated by roxygen2 (4.1.1.9000): do not edit by hand % Please edit documentation in R/install.R \name{system.PATH} \alias{system.PATH} \title{Returns the search path for executable files} \usage{ system.PATH() } \value{ A character vector with the search path for executable files } \description{ Returns the search...
# likert survey data #' http://reganmian.net/blog/2013/10/02/likert-graphs-in-r-embedding-metadata-for-easier-plotting/ #' http://rcrastinate.blogspot.com/2016/07/visualisation-of-likert-scale-results.html
/work/analysis/analysis-likert.R
no_license
gloriakang/banana-phone
R
false
false
208
r
# likert survey data #' http://reganmian.net/blog/2013/10/02/likert-graphs-in-r-embedding-metadata-for-easier-plotting/ #' http://rcrastinate.blogspot.com/2016/07/visualisation-of-likert-scale-results.html
### DESeq2 RNA Seq Analysis Script for multiple factors / treatments # Author: Hannes Reinwald # Contact: hannes.reinwald@ime.fraunhofer.de # README #### # This script is desgined to run DESeq2 normalization and statistical testing on RNAseq experiments # in Ecotox testing with multiple concentrations. This scri...
/DESeq2_multifactor_PairwiseWalds_v01.R
no_license
FabFeld/DESeq2Analysis
R
false
false
71,002
r
### DESeq2 RNA Seq Analysis Script for multiple factors / treatments # Author: Hannes Reinwald # Contact: hannes.reinwald@ime.fraunhofer.de # README #### # This script is desgined to run DESeq2 normalization and statistical testing on RNAseq experiments # in Ecotox testing with multiple concentrations. This scri...
#' @title Convert Sequences To \code{gtypes} #' @description Create a \linkS4class{gtypes} object from sequence data. #' #' @param x DNA sequences as a character matrix, a \code{\link{DNAbin}} object, #' or \linkS4class{multidna} object. #' @param strata a vector or factor giving stratification for each sequence. I...
/strataG/R/sequence2gtypes.R
no_license
ingted/R-Examples
R
false
false
2,098
r
#' @title Convert Sequences To \code{gtypes} #' @description Create a \linkS4class{gtypes} object from sequence data. #' #' @param x DNA sequences as a character matrix, a \code{\link{DNAbin}} object, #' or \linkS4class{multidna} object. #' @param strata a vector or factor giving stratification for each sequence. I...
library(testthat) library(HWPackage) test_check("HWPackage")
/Week5/class_packs/Laura_HW5/HWPackage.Rcheck/00_pkg_src/HWPackage/tests/testthat.R
no_license
tyler-abbot/ProgrammingFall2016
R
false
false
62
r
library(testthat) library(HWPackage) test_check("HWPackage")
context("trap") f <- function(x) { x^2 } expect_equal(trap(f, 0, 1, m = 10), 1 / 3, 1e-2) expect_equal(trap(f, 0, 1, m = 100), 1 / 3, 1e-3) expect_equal(trap(f, 0, 1, m = 1000), 1 / 3, 1e-4) f <- function(x) { 1 / x } expect_false(isTRUE(all.equal(trap(f, 1, 10, m = 1000), log(10)))) expect_equal(trap(f, 1, 10, m = 1...
/tests/testthat/test-trap.R
no_license
helixcn/cmna
R
false
false
598
r
context("trap") f <- function(x) { x^2 } expect_equal(trap(f, 0, 1, m = 10), 1 / 3, 1e-2) expect_equal(trap(f, 0, 1, m = 100), 1 / 3, 1e-3) expect_equal(trap(f, 0, 1, m = 1000), 1 / 3, 1e-4) f <- function(x) { 1 / x } expect_false(isTRUE(all.equal(trap(f, 1, 10, m = 1000), log(10)))) expect_equal(trap(f, 1, 10, m = 1...
source("http://bioconductor.org/biocLite.R") require(igraph) require(plotrix) library(STRINGdb) require(shiny) source("/home/cicconella/Desktop/GUI/funcoes.R") ### UI ui <- fluidPage( titlePanel("Create Network"), sidebarLayout( sidebarPanel( textInput(inputId = "nome1", label = "N...
/original.R
no_license
Cicconella/GUI
R
false
false
1,167
r
source("http://bioconductor.org/biocLite.R") require(igraph) require(plotrix) library(STRINGdb) require(shiny) source("/home/cicconella/Desktop/GUI/funcoes.R") ### UI ui <- fluidPage( titlePanel("Create Network"), sidebarLayout( sidebarPanel( textInput(inputId = "nome1", label = "N...
require(tm) require(RWeka) collapseAllSampleToOneList <- function(outputFolder){ print("* Loading all samples data...") load("./data/03_termFrequency/randomSample_1_collapsed_term_frequency.rdata") s1.1g <- term_frequency_1g[, c("terms", "total")] s1.2g <- term_frequency_2g[, c("terms", "total")] s...
/ingestionPipeline/scripts/03_transformingData.R
permissive
kaanksh/CapstoneProjectDataScienceSpecialization
R
false
false
10,736
r
require(tm) require(RWeka) collapseAllSampleToOneList <- function(outputFolder){ print("* Loading all samples data...") load("./data/03_termFrequency/randomSample_1_collapsed_term_frequency.rdata") s1.1g <- term_frequency_1g[, c("terms", "total")] s1.2g <- term_frequency_2g[, c("terms", "total")] s...
PD = function (demand = demand, tau = 0.5, eps = 0.005) { res <- try(RM2:::PD_internal(demand, tau, eps), silent = TRUE) if (class(res) == 'try-error') {print("Warning: All demand instances are unconstrained")} else {return(res)} } # end PD function
/R/PD.R
no_license
cran/RM2
R
false
false
262
r
PD = function (demand = demand, tau = 0.5, eps = 0.005) { res <- try(RM2:::PD_internal(demand, tau, eps), silent = TRUE) if (class(res) == 'try-error') {print("Warning: All demand instances are unconstrained")} else {return(res)} } # end PD function
rm(list = ls()) setwd("~/Desktop/2017Spring/R/DHSTeam1/TEAM1FinalCode") # library all the packages library(dplyr) library(readr) library(readxl) library(zoo) library(ggplot2) library(plyr) library(magrittr) library("stringi") install.packages("plotrix") install.packages("readr") install.packages("RColorBrewer") librar...
/TEAM1FinalCode/TEAM1FinalCode.R
no_license
nicolethegrape/DHSTeam1-Ziyi-Shuning-Xiaoying
R
false
false
25,396
r
rm(list = ls()) setwd("~/Desktop/2017Spring/R/DHSTeam1/TEAM1FinalCode") # library all the packages library(dplyr) library(readr) library(readxl) library(zoo) library(ggplot2) library(plyr) library(magrittr) library("stringi") install.packages("plotrix") install.packages("readr") install.packages("RColorBrewer") librar...
library(testthat) library(imageCompressR) test_check("imageCompressR")
/tests/testthat.R
permissive
Sayanti86/image-compression-toolkit--R
R
false
false
72
r
library(testthat) library(imageCompressR) test_check("imageCompressR")
jags_fit_NtHM_HN<-function(df=df, mu_prior_mean=0, mu_prior_prec=1/(4^2), tau_prior_prec=1/(0.5^2), params=c("mu", "theta", "tau", "log_tau", "theta_new"), nchains=4, ...
/R/jags_fit_NtHM_HN.R
no_license
hunansona/si4bayesmeta
R
false
false
1,550
r
jags_fit_NtHM_HN<-function(df=df, mu_prior_mean=0, mu_prior_prec=1/(4^2), tau_prior_prec=1/(0.5^2), params=c("mu", "theta", "tau", "log_tau", "theta_new"), nchains=4, ...
library(rjags) library(RColorBrewer) data = read.delim("/Users/cass/Documents/AppliedMachineLearning/HW1/train.csv",header=T,sep=",",nrow=1000) labels = data[,1] data[data>=1] = 1 data = sapply(data,as.numeric) model_string2 <- " var z[1000], p[10,784], pi[10] model{ for(i in 1:1000){ z[i] ~ dcat(pi) for(j in 1:784){ ...
/BernoulliMixture_jags.R
no_license
resurgo-genetics/scATAC-seq
R
false
false
890
r
library(rjags) library(RColorBrewer) data = read.delim("/Users/cass/Documents/AppliedMachineLearning/HW1/train.csv",header=T,sep=",",nrow=1000) labels = data[,1] data[data>=1] = 1 data = sapply(data,as.numeric) model_string2 <- " var z[1000], p[10,784], pi[10] model{ for(i in 1:1000){ z[i] ~ dcat(pi) for(j in 1:784){ ...
library(sbtools) ### Name: sbitem ### Title: ScienceBase item class ### Aliases: as.sbitem as.sbitem.default is.sbitem sbitem ### ** Examples ## Not run: ##D # Single item from item_get() ##D item_get("4f4e4b24e4b07f02db6aea14") ##D ##D # Get many w/ e.g., an lapply() call ##D library("httr") ##D res <- query_ite...
/data/genthat_extracted_code/sbtools/examples/sbitem.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
686
r
library(sbtools) ### Name: sbitem ### Title: ScienceBase item class ### Aliases: as.sbitem as.sbitem.default is.sbitem sbitem ### ** Examples ## Not run: ##D # Single item from item_get() ##D item_get("4f4e4b24e4b07f02db6aea14") ##D ##D # Get many w/ e.g., an lapply() call ##D library("httr") ##D res <- query_ite...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/contrast.R \name{contrast} \alias{contrast} \title{Adjust contrast of image} \usage{ contrast(input_img, intensity = 5, display = F, output_img = "") } \arguments{ \item{input_img}{string, path of the input image} \item{intensity}{int, inten...
/man/contrast.Rd
permissive
mani-kohli/picfixR
R
false
true
802
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/contrast.R \name{contrast} \alias{contrast} \title{Adjust contrast of image} \usage{ contrast(input_img, intensity = 5, display = F, output_img = "") } \arguments{ \item{input_img}{string, path of the input image} \item{intensity}{int, inten...
function (y, lp, tau2, gh) { e <- get("data.env", .GlobalEnv) e[["llrandbinomcpp"]][[length(e[["llrandbinomcpp"]]) + 1]] <- list(y = y, lp = lp, tau2 = tau2, gh = gh) .Call("_robmixglm_llrandbinomcpp", y, lp, tau2, gh) }
/valgrind_test_dir/llrandbinomcpp-test.R
no_license
akhikolla/RcppDeepStateTest
R
false
false
243
r
function (y, lp, tau2, gh) { e <- get("data.env", .GlobalEnv) e[["llrandbinomcpp"]][[length(e[["llrandbinomcpp"]]) + 1]] <- list(y = y, lp = lp, tau2 = tau2, gh = gh) .Call("_robmixglm_llrandbinomcpp", y, lp, tau2, gh) }
## Overall program stores a matrix in the cache and then subsequently inverses it ## MakeCacheMatrix makes a special "matrix" and stores it in the cache makeCacheMatrix <- function(x = matrix()) { m<-NULL set<-function(y){ x<<-y m<<-NULL } get<-function() x setmatrix<-function(solve) m<<- solve get...
/cachematrix.R
no_license
hoang00/ProgrammingAssignment2
R
false
false
713
r
## Overall program stores a matrix in the cache and then subsequently inverses it ## MakeCacheMatrix makes a special "matrix" and stores it in the cache makeCacheMatrix <- function(x = matrix()) { m<-NULL set<-function(y){ x<<-y m<<-NULL } get<-function() x setmatrix<-function(solve) m<<- solve get...
#function provides the ability to get and set values related to a cached matrix #returns a list object containing set, get, setInverse, and getInverse functions makeCacheMatrix <- function(x) { i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x setInverse <- function(inv) i <<- in...
/cachematrix.R
no_license
clwebster/ProgrammingAssignment2
R
false
false
834
r
#function provides the ability to get and set values related to a cached matrix #returns a list object containing set, get, setInverse, and getInverse functions makeCacheMatrix <- function(x) { i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x setInverse <- function(inv) i <<- in...
good <-c(1,2,3,4,5,6,7,8,9,10) good better <- matrix(1:20,byrow = TRUE,nrow = 2) better d.b <- rivers d.b fish <-list(good,better,d.b) fish fish <-list(tables_g = good, tables_b = better,tables_d.b = d.b) fish fish[2] fish['tables_d.b'] fish[['tables_d.b']] double_list <- c(fish,fish) double_list str...
/R list.R
no_license
Dynamicideas/newme
R
false
false
422
r
good <-c(1,2,3,4,5,6,7,8,9,10) good better <- matrix(1:20,byrow = TRUE,nrow = 2) better d.b <- rivers d.b fish <-list(good,better,d.b) fish fish <-list(tables_g = good, tables_b = better,tables_d.b = d.b) fish fish[2] fish['tables_d.b'] fish[['tables_d.b']] double_list <- c(fish,fish) double_list str...
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/Correlation/breast.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.01,family="gaussian",standardize=TRUE) sink('./breast_005.txt',append=TRUE)...
/Model/EN/Correlation/breast/breast_005.R
no_license
esbgkannan/QSMART
R
false
false
350
r
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/Correlation/breast.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.01,family="gaussian",standardize=TRUE) sink('./breast_005.txt',append=TRUE)...
args=(commandArgs(TRUE)); for(i in 1:length(args)) { eval(parse(text=args[[i]])) } library(SDMTools) source('/home/jc148322/scripts/libraries/cool_functions.r') base.asc = read.asc.gz('/home/jc165798/Climate/CIAS/Australia/5km/baseline.76to05/base.asc.gz') #read in the base.asc=make.base.asc(base.asc) work.dir=past...
/SDM/richness/family_richness.r
no_license
davan690/CliMAS-Modelling
R
false
false
1,268
r
args=(commandArgs(TRUE)); for(i in 1:length(args)) { eval(parse(text=args[[i]])) } library(SDMTools) source('/home/jc148322/scripts/libraries/cool_functions.r') base.asc = read.asc.gz('/home/jc165798/Climate/CIAS/Australia/5km/baseline.76to05/base.asc.gz') #read in the base.asc=make.base.asc(base.asc) work.dir=past...
context("Test summary measure functions") test_that("aux_mean input is valid", { expect_equal(aux_mean(30, 0.3), 9) expect_length(aux_mean(10, 0.5), 1) expect_type(aux_mean(30, 0.3), 'double') }) test_that("aux_variance input is valid", { expect_equal(aux_variance(30, 0.3), 6.3) expect_length(aux_variance(1...
/binomial/tests/testthat/test-check-coin.R
no_license
16zhaoq1997/workout3
R
false
false
939
r
context("Test summary measure functions") test_that("aux_mean input is valid", { expect_equal(aux_mean(30, 0.3), 9) expect_length(aux_mean(10, 0.5), 1) expect_type(aux_mean(30, 0.3), 'double') }) test_that("aux_variance input is valid", { expect_equal(aux_variance(30, 0.3), 6.3) expect_length(aux_variance(1...
library(tidyverse) icd10_lookup = read_csv("original_data/icd10_lookup.csv") mapping_raw = read_csv("original_data/IHME_GBD_2016_ICD_CAUSE_MAP_CAUSES_OF_DEATH_Y2017M09D14.csv", skip = 1) %>% select(cause_name = Cause, icd10 = ICD10) mapping_missing = read_csv("original_data/GBD_map_missing_surginf_17042018.csv"...
/01_expand_level3.R
no_license
SurgicalInformatics/gbd_icd_mapping
R
false
false
4,258
r
library(tidyverse) icd10_lookup = read_csv("original_data/icd10_lookup.csv") mapping_raw = read_csv("original_data/IHME_GBD_2016_ICD_CAUSE_MAP_CAUSES_OF_DEATH_Y2017M09D14.csv", skip = 1) %>% select(cause_name = Cause, icd10 = ICD10) mapping_missing = read_csv("original_data/GBD_map_missing_surginf_17042018.csv"...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/neuron-io-fiji.R \name{read.neuron.fiji} \alias{read.neuron.fiji} \title{Read a neuron saved by Fiji's Simple Neurite Tracer Plugin} \usage{ read.neuron.fiji( f, ..., simplify = TRUE, components = c("path", "fill"), Verbose = FALSE ...
/man/read.neuron.fiji.Rd
no_license
natverse/nat
R
false
true
2,068
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/neuron-io-fiji.R \name{read.neuron.fiji} \alias{read.neuron.fiji} \title{Read a neuron saved by Fiji's Simple Neurite Tracer Plugin} \usage{ read.neuron.fiji( f, ..., simplify = TRUE, components = c("path", "fill"), Verbose = FALSE ...
#' @useDynLib fosr #' @importFrom Rcpp sourceCpp NULL #' MCMC Sampling Algorithm for the Function-on-Scalars Regression Model #' #' Runs the MCMC for the function-on-scalars regression model based on #' an FDLM-type expansion. Here we assume the factor regression has independent errors, #' which allows for sub...
/R/mcmc_sampler.R
no_license
stevenhurwitt/fosr
R
false
false
18,874
r
#' @useDynLib fosr #' @importFrom Rcpp sourceCpp NULL #' MCMC Sampling Algorithm for the Function-on-Scalars Regression Model #' #' Runs the MCMC for the function-on-scalars regression model based on #' an FDLM-type expansion. Here we assume the factor regression has independent errors, #' which allows for sub...
test_that("grouping is identical to extraction", { c <- 6 mat <- matrix(runif(10 * c), ncol = c) meta <- paste(as.integer((seq_len(c) - 1) / 2)) lst <- CytoTalk:::new_named_list(mat, meta) expect_identical( CytoTalk::extract_group(meta[1], lst), CytoTalk::group_meta(lst)[[meta[1]]...
/tests/testthat/test_matrix.R
permissive
tanlabcode/CytoTalk
R
false
false
331
r
test_that("grouping is identical to extraction", { c <- 6 mat <- matrix(runif(10 * c), ncol = c) meta <- paste(as.integer((seq_len(c) - 1) / 2)) lst <- CytoTalk:::new_named_list(mat, meta) expect_identical( CytoTalk::extract_group(meta[1], lst), CytoTalk::group_meta(lst)[[meta[1]]...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/connect.R \name{pullAccuracy} \alias{pullAccuracy} \title{Pull Accuracy from model_factory.model_test_results table based on session_id, threshold_value and threshold_type} \usage{ pullAccuracy(session_id, threshold_value, threshold_type) } \...
/man/pullAccuracy.Rd
no_license
kpnDataScienceLab/modelFactoryR
R
false
true
873
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/connect.R \name{pullAccuracy} \alias{pullAccuracy} \title{Pull Accuracy from model_factory.model_test_results table based on session_id, threshold_value and threshold_type} \usage{ pullAccuracy(session_id, threshold_value, threshold_type) } \...
#ensuring github package dependencies available on load .onLoad <- function(libname, pkgname){ devtools::install_github("MaayanLab/genesetr") }
/R/pkg_dependencies.R
no_license
MaayanLab/chea3
R
false
false
145
r
#ensuring github package dependencies available on load .onLoad <- function(libname, pkgname){ devtools::install_github("MaayanLab/genesetr") }
library(DiagrammeR) library(piecewiseSEM) library(DiagrammeRsvg) library(magrittr) library(rsvg) library(RColorBrewer) library(colorspace) library(gplots) ### #this function modifies a coefs_df from sem to plot the sem later coefsdf_to_grViz <- function(coefs.df, mode = c('single','with_CI','pseudoposterior')){ ##gr...
/R/plot_sems.R
no_license
javierigea/elevation_speciation
R
false
false
12,748
r
library(DiagrammeR) library(piecewiseSEM) library(DiagrammeRsvg) library(magrittr) library(rsvg) library(RColorBrewer) library(colorspace) library(gplots) ### #this function modifies a coefs_df from sem to plot the sem later coefsdf_to_grViz <- function(coefs.df, mode = c('single','with_CI','pseudoposterior')){ ##gr...
emp.data<- data.frame(driving_experience=c(5,2,12,9,15,6,25,16), insurance_prenium=c(64,87,50,71,44,56,42,60)) input <-emp.data[,c("driving_experience","insurance_prenium")] de<- c (emp.data$driving_experience) ip<-c(emp.data$insurance_prenium) model<-lm(ip ~de , data=input) model a <- coef(model...
/linearRegression.R
no_license
ulti72/ML-Wokshop
R
false
false
818
r
emp.data<- data.frame(driving_experience=c(5,2,12,9,15,6,25,16), insurance_prenium=c(64,87,50,71,44,56,42,60)) input <-emp.data[,c("driving_experience","insurance_prenium")] de<- c (emp.data$driving_experience) ip<-c(emp.data$insurance_prenium) model<-lm(ip ~de , data=input) model a <- coef(model...
# Summarize spatial multivariate mixed model output # New version created to deal with SARs # QDR/NASABIOXGEO/29 April 2019 # Modified 19 June: Get rid of the CV calculation (gives bad results) # Modified 14 June: include newer "null" and subset models # Modified 4 June: get RMSE for each iteration so we can put a cre...
/stats/sar/multivariate_processoutput_sar.r
no_license
qdread/nasabio
R
false
false
7,070
r
# Summarize spatial multivariate mixed model output # New version created to deal with SARs # QDR/NASABIOXGEO/29 April 2019 # Modified 19 June: Get rid of the CV calculation (gives bad results) # Modified 14 June: include newer "null" and subset models # Modified 4 June: get RMSE for each iteration so we can put a cre...
#' isomiRs #' #' @import BiocGenerics #' @import S4Vectors #' @import IRanges #' @import GenomicRanges #' @import SummarizedExperiment #' @import methods #' @import DESeq2 #' @importFrom limma voom #' @import GGally #' @import gtools #' @import Biobase #' @import assertive.sets #' @import cluster #' @importFrom Annotat...
/R/isomiRs-package.R
permissive
lpantano/isomiRs
R
false
false
1,770
r
#' isomiRs #' #' @import BiocGenerics #' @import S4Vectors #' @import IRanges #' @import GenomicRanges #' @import SummarizedExperiment #' @import methods #' @import DESeq2 #' @importFrom limma voom #' @import GGally #' @import gtools #' @import Biobase #' @import assertive.sets #' @import cluster #' @importFrom Annotat...
% Generated by roxygen2: do not edit by hand \name{BANOVA.ordMultinomial} \alias{BANOVA.ordMultinomial} \alias{predict.BANOVA.ordMultinomial} \alias{print.BANOVA.ordMultinomial} \alias{summary.BANOVA.ordMultinomial} \title{Estimation of BANOVA with a ordered Multinomial response variable} \description{ \code{BANOVA.ord...
/man/BANOVA.ordMultinomial.Rd
no_license
cran/BANOVA
R
false
true
4,009
rd
% Generated by roxygen2: do not edit by hand \name{BANOVA.ordMultinomial} \alias{BANOVA.ordMultinomial} \alias{predict.BANOVA.ordMultinomial} \alias{print.BANOVA.ordMultinomial} \alias{summary.BANOVA.ordMultinomial} \title{Estimation of BANOVA with a ordered Multinomial response variable} \description{ \code{BANOVA.ord...
category Database DBM を Ruby スクリプトから扱えるようにするライブラリです。 扱えるキーや値のサイズはリンクしているライブラリに依存します。 作成されるデータベースはアーキテクチャに依存するため、作成した環境と異 なる環境ではデータベースが読み込めない可能性があります。 @see [[lib:gdbm]], [[lib:sdbm]], [[man:dbm(3)]] = class DBM < Object include Enumerable NDBM ファイルをアクセスするクラス。 キー、データともに文字列でなければならないという制限と、データがファイルに 保存されるという点を除いては ...
/refm/api/src/dbm.rd
no_license
mame/doctree
R
false
false
9,930
rd
category Database DBM を Ruby スクリプトから扱えるようにするライブラリです。 扱えるキーや値のサイズはリンクしているライブラリに依存します。 作成されるデータベースはアーキテクチャに依存するため、作成した環境と異 なる環境ではデータベースが読み込めない可能性があります。 @see [[lib:gdbm]], [[lib:sdbm]], [[man:dbm(3)]] = class DBM < Object include Enumerable NDBM ファイルをアクセスするクラス。 キー、データともに文字列でなければならないという制限と、データがファイルに 保存されるという点を除いては ...
# Exercise-1: practice with basic syntax # Create a variable `hometown` that stores the city in which you were born hometown <- 'Dalian' # Assign your name to the variable `my.name` my.name <- 'Diana' # Assign your height to a variable `my.height` my.height <- 172 # Create a variable `puppies` equal to the numbe...
/exercise-1/exercise.R
permissive
dianaqu/m6-r-intro
R
false
false
795
r
# Exercise-1: practice with basic syntax # Create a variable `hometown` that stores the city in which you were born hometown <- 'Dalian' # Assign your name to the variable `my.name` my.name <- 'Diana' # Assign your height to a variable `my.height` my.height <- 172 # Create a variable `puppies` equal to the numbe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/thesis.R \name{thesis_epub} \alias{thesis_epub} \title{Creates an R Markdown epub Thesis document} \usage{ thesis_epub(...) } \value{ A ebook version of the thesis } \description{ This is a function called in output in the YAML of the driver ...
/man/thesis_epub.Rd
permissive
akozlu/thesisdowndss
R
false
true
449
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/thesis.R \name{thesis_epub} \alias{thesis_epub} \title{Creates an R Markdown epub Thesis document} \usage{ thesis_epub(...) } \value{ A ebook version of the thesis } \description{ This is a function called in output in the YAML of the driver ...
r2005.daisy<-daisy(r2005,stand=TRUE) print(r2005.daisy) r2005.diana<-diana(r2005,diss=FALSE,stand=TRUE) print(r2005.diana) r2005.diana.k2<-cutree(as.hclust(r2005.diana),k=2) print(r2005.diana.k2) r2005.diana.k3<-cutree(as.hclust(r2005.diana),k=3) print(r2005.diana.k3) r2005.diana.k4<-cutree(as.hclust(r2005.dian...
/R/r2005.r
no_license
kwlee58/Region_new
R
false
false
532
r
r2005.daisy<-daisy(r2005,stand=TRUE) print(r2005.daisy) r2005.diana<-diana(r2005,diss=FALSE,stand=TRUE) print(r2005.diana) r2005.diana.k2<-cutree(as.hclust(r2005.diana),k=2) print(r2005.diana.k2) r2005.diana.k3<-cutree(as.hclust(r2005.diana),k=3) print(r2005.diana.k3) r2005.diana.k4<-cutree(as.hclust(r2005.dian...
library(Publish) ### Name: summary.univariateTable ### Title: Preparing univariate tables for publication ### Aliases: summary.univariateTable ### ** Examples data(Diabetes) u <- univariateTable(gender~age+location+Q(BMI)+height+weight, data=Diabetes) summary(u) summary(u,n=NULL) summary(u,pvalue.di...
/data/genthat_extracted_code/Publish/examples/summary.univariateTable.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
659
r
library(Publish) ### Name: summary.univariateTable ### Title: Preparing univariate tables for publication ### Aliases: summary.univariateTable ### ** Examples data(Diabetes) u <- univariateTable(gender~age+location+Q(BMI)+height+weight, data=Diabetes) summary(u) summary(u,n=NULL) summary(u,pvalue.di...
print("*** Loading dynamic.R") source("config.R") data = read.csv("data/MURR-NAA.csv") library("dplyr") library("glue") library("prodlim") library("ggplot2") # Used by DynamicPlot ########################################################### #' An S4 class for dynamically maintaining the data available to the applicat...
/R/dynamic.R
no_license
arf-berkeley/web_geochemistry
R
false
false
24,919
r
print("*** Loading dynamic.R") source("config.R") data = read.csv("data/MURR-NAA.csv") library("dplyr") library("glue") library("prodlim") library("ggplot2") # Used by DynamicPlot ########################################################### #' An S4 class for dynamically maintaining the data available to the applicat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/shiny_functions.R \name{personalize_jumbotron} \alias{personalize_jumbotron} \title{personalize_jumbotron} \usage{ personalize_jumbotron( image_href, width_text, heigth_text, header_text, text, cited, href ) } \arguments{ \item{...
/man/personalize_jumbotron.Rd
no_license
1Edtrujillo1/udeploy
R
false
true
899
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/shiny_functions.R \name{personalize_jumbotron} \alias{personalize_jumbotron} \title{personalize_jumbotron} \usage{ personalize_jumbotron( image_href, width_text, heigth_text, header_text, text, cited, href ) } \arguments{ \item{...
cat("=========================================================================================== ANALYSIS ATHERO-EXPRESS METHYLATION STUDIES 450K 2 Version: v2.9 Last update: 2018-01-31 Written by: Sander W. van der Laan (s.w.vanderlaan-2@umcutrecht.nl); Marten A....
/_archived/20180131.aems450k2.analysis.ewas.smoking.R
permissive
swvanderlaan/2018_circgenomprecismed_30354327_siemelink_m_smoking_ewas
R
false
false
31,861
r
cat("=========================================================================================== ANALYSIS ATHERO-EXPRESS METHYLATION STUDIES 450K 2 Version: v2.9 Last update: 2018-01-31 Written by: Sander W. van der Laan (s.w.vanderlaan-2@umcutrecht.nl); Marten A....
###send error email when hist_num = hist_num_before ##library library(mailR) ##input mail setting sender <- "<kzfcv9@gmail.com>" username <- "kzfcv9" #---- mailpass <- "sebangou22" #----- recipient <- "<kojih9@gmail.com>" ## should be within Gmail ##set email body items errortime <- Sys.time() progress <- i...
/scraping/send_caution_email.R
no_license
kj00/wos_scraping
R
false
false
1,361
r
###send error email when hist_num = hist_num_before ##library library(mailR) ##input mail setting sender <- "<kzfcv9@gmail.com>" username <- "kzfcv9" #---- mailpass <- "sebangou22" #----- recipient <- "<kojih9@gmail.com>" ## should be within Gmail ##set email body items errortime <- Sys.time() progress <- i...
#function to convert Mixing ratio to relative humidity MIXHR<-function(Tc, PRES=F,M) { #function to convert Mixing ratio to relative humidity Mas=28.966 # masse molaire air sec (g/mol) Mh2o=18 # masse molaire H2O(g/mol) Rgz=8.314472 # %J/mol/K cste gaz parfait p_air=101325 # %en Pa Tc=Tc Tk=Tc+273.15 i...
/climfunctions.r
no_license
NicoINRA/FunctionsClim
R
false
false
2,513
r
#function to convert Mixing ratio to relative humidity MIXHR<-function(Tc, PRES=F,M) { #function to convert Mixing ratio to relative humidity Mas=28.966 # masse molaire air sec (g/mol) Mh2o=18 # masse molaire H2O(g/mol) Rgz=8.314472 # %J/mol/K cste gaz parfait p_air=101325 # %en Pa Tc=Tc Tk=Tc+273.15 i...
library(rdflib) library(magrittr) library(shiny) library(shinydashboard) # Define UI for ontology viewer application # Application title header <- dashboardHeader(title = "Ontology Query Service", titleWidth = 275) # sidebar with controls to provide tabs (possible tab for the future includes "ontology sel...
/app/ui.R
no_license
TimKettenacker/ontology-query-service
R
false
false
1,026
r
library(rdflib) library(magrittr) library(shiny) library(shinydashboard) # Define UI for ontology viewer application # Application title header <- dashboardHeader(title = "Ontology Query Service", titleWidth = 275) # sidebar with controls to provide tabs (possible tab for the future includes "ontology sel...
#****************************************************************************************************************************************************1.4. beta sidebarLayout( sidebarPanel( h4(tags$b("Step 1. Select the data source")), p("Mathematical-based, simulated-data-based, or user data-based"), #Select Src ...
/1_1MFScondist/ui_B.R
permissive
ricciardi/mephas_web
R
false
false
4,577
r
#****************************************************************************************************************************************************1.4. beta sidebarLayout( sidebarPanel( h4(tags$b("Step 1. Select the data source")), p("Mathematical-based, simulated-data-based, or user data-based"), #Select Src ...
setwd("C:\\Users\\sirui.zhou\\work\\Works-home\\Covid\\SomaLogic") setwd("C:\\Users\\Sirui\\Desktop\\WORKS\\OAS1.NM.revision\\McGill-Richards-C-19 - SomaScan Data") library(SomaDataIO) Norm <- read.adat("SS-200150_v4_ACDPlasma.hybNorm.medNormInt.plateScale.calibrate.anmlQC.qcCheck.medNormRefSMP.adat") #Unnorm <- ...
/all_protein_chr3_LMM.r
no_license
zhsiru/Proteomic_BQC
R
false
false
6,513
r
setwd("C:\\Users\\sirui.zhou\\work\\Works-home\\Covid\\SomaLogic") setwd("C:\\Users\\Sirui\\Desktop\\WORKS\\OAS1.NM.revision\\McGill-Richards-C-19 - SomaScan Data") library(SomaDataIO) Norm <- read.adat("SS-200150_v4_ACDPlasma.hybNorm.medNormInt.plateScale.calibrate.anmlQC.qcCheck.medNormRefSMP.adat") #Unnorm <- ...
# Working with data # using Walmart data library(ggplot2) path <- 'Desktop/R-Programming/Data Analysis/walmart_data.csv' walmart_data <- read.csv(path) # creating a plot function for Walmart data plot_store_dept <- function(store_nb, dept_nb){ #filter stores from table walmart_filter <- walmart_data[ wa...
/R-Studio Code/Functions/Functions-Working with Data.R
no_license
jkenney0501/R-Programming
R
false
false
1,681
r
# Working with data # using Walmart data library(ggplot2) path <- 'Desktop/R-Programming/Data Analysis/walmart_data.csv' walmart_data <- read.csv(path) # creating a plot function for Walmart data plot_store_dept <- function(store_nb, dept_nb){ #filter stores from table walmart_filter <- walmart_data[ wa...
library(sdwd) ### Name: coef.sdwd ### Title: compute coefficients for the sparse DWD ### Aliases: coef.sdwd ### Keywords: models regression ### ** Examples data(colon) fit = sdwd(colon$x, colon$y, lambda2=1) c1 = coef(fit, type="coef",s=c(0.1, 0.005)) c2 = coef(fit, type="nonzero")
/data/genthat_extracted_code/sdwd/examples/coef.sdwd.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
290
r
library(sdwd) ### Name: coef.sdwd ### Title: compute coefficients for the sparse DWD ### Aliases: coef.sdwd ### Keywords: models regression ### ** Examples data(colon) fit = sdwd(colon$x, colon$y, lambda2=1) c1 = coef(fit, type="coef",s=c(0.1, 0.005)) c2 = coef(fit, type="nonzero")
rttestISClass <- R6::R6Class( "rttestISClass", inherit = rttestISBase, private = list( .init = function() { est <- self$options$method ttestTable <- self$results$ttest method = 'Unknown' if (est == 'onestep') method = 'One-step' ...
/R/rttestis.b.R
no_license
jamovi/walrus
R
false
false
4,868
r
rttestISClass <- R6::R6Class( "rttestISClass", inherit = rttestISBase, private = list( .init = function() { est <- self$options$method ttestTable <- self$results$ttest method = 'Unknown' if (est == 'onestep') method = 'One-step' ...
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = 0, ra = numeric(0), relh = NaN, rs = numeric(0), temp = c(NaN, NA, NaN, NaN, 1.36988084313025e-192, 1.3202428078733e-192, 1.3202428078733e-192, 0)) result <- do.call(meteor:::ET0_PenmanMonteith,testlist) str(result)
/meteor/inst/testfiles/ET0_PenmanMonteith/libFuzzer_ET0_PenmanMonteith/ET0_PenmanMonteith_valgrind_files/1612736803-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
287
r
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = 0, ra = numeric(0), relh = NaN, rs = numeric(0), temp = c(NaN, NA, NaN, NaN, 1.36988084313025e-192, 1.3202428078733e-192, 1.3202428078733e-192, 0)) result <- do.call(meteor:::ET0_PenmanMonteith,testlist) str(result)
#server.R library(shiny) library(ggplot2) library(lubridate) #set working directory #setwd('C:/Users/jwong/Desktop/9- Developing Data Products/rsconnect/data') #KL<-read.csv("API_KualaLumpur.csv") #KL$Date <- as.Date(KL$Date, format = "%m/%d/%Y") server<- function(input, output) { output$...
/server.R
no_license
JessieWong/Course-Project-Shiny-Application-and-Reproducible-Pitch
R
false
false
681
r
#server.R library(shiny) library(ggplot2) library(lubridate) #set working directory #setwd('C:/Users/jwong/Desktop/9- Developing Data Products/rsconnect/data') #KL<-read.csv("API_KualaLumpur.csv") #KL$Date <- as.Date(KL$Date, format = "%m/%d/%Y") server<- function(input, output) { output$...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MDS_GO_results_functions.R \name{find_relation_to_ancestors} \alias{find_relation_to_ancestors} \title{Ancestor querying for GOs} \usage{ find_relation_to_ancestors(target_ancestors, GOs_to_check, ontology = "BP") } \arguments{ \item{target_a...
/man/find_relation_to_ancestors.Rd
permissive
Ylefol/TimeSeriesAnalysis
R
false
true
3,171
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MDS_GO_results_functions.R \name{find_relation_to_ancestors} \alias{find_relation_to_ancestors} \title{Ancestor querying for GOs} \usage{ find_relation_to_ancestors(target_ancestors, GOs_to_check, ontology = "BP") } \arguments{ \item{target_a...
# Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate context("Test DatasetPermission") model.instance <- DatasetPermission$new() test_that("name", { # tests for the property `name` (character) # the name of the NIH dataset # uncomment below to ...
/tests/testthat/test_dataset_permission.R
no_license
vjcitn/terraClientR
R
false
false
650
r
# Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate context("Test DatasetPermission") model.instance <- DatasetPermission$new() test_that("name", { # tests for the property `name` (character) # the name of the NIH dataset # uncomment below to ...
library(DiagrammeR) ### Name: recode_edge_attrs ### Title: Recode a set of edge attribute values ### Aliases: recode_edge_attrs ### ** Examples # Create a random graph using the # `add_gnm_graph()` function graph <- create_graph() %>% add_gnm_graph( n = 4, m = 6, set_seed = 23) %>% set_edge_attrs(...
/data/genthat_extracted_code/DiagrammeR/examples/recode_edge_attrs.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,000
r
library(DiagrammeR) ### Name: recode_edge_attrs ### Title: Recode a set of edge attribute values ### Aliases: recode_edge_attrs ### ** Examples # Create a random graph using the # `add_gnm_graph()` function graph <- create_graph() %>% add_gnm_graph( n = 4, m = 6, set_seed = 23) %>% set_edge_attrs(...
##' @title sda.enkf ##' @name sda.enkf ##' @author Michael Dietze and Ann Raiho \email{dietze@@bu.edu} ##' ##' @param settings PEcAn settings object ##' @param obs.mean list of observations of the means of state variable (time X nstate) ##' @param obs.cov list of observations of covariance matrices of state...
/modules/assim.sequential/R/sda.enkf.R
permissive
Amanskywalker/pecan
R
false
false
35,010
r
##' @title sda.enkf ##' @name sda.enkf ##' @author Michael Dietze and Ann Raiho \email{dietze@@bu.edu} ##' ##' @param settings PEcAn settings object ##' @param obs.mean list of observations of the means of state variable (time X nstate) ##' @param obs.cov list of observations of covariance matrices of state...
## Using Twitter's API to gather data #Libraries library(twitteR) library(tm) library(syuzhet) library(ggplot2) library(descr) library(magrittr) #read token from file token <- read.csv("~/token.csv",header = FALSE,stringsAsFactors = FALSE) consumer_key <- token$V1[1] consumer_secret <- token$V1[2] access_token <- to...
/code/Unused_Code/Twitter/1_Scraping_Twitter.R
no_license
uva-bi-sdad/ari_social_media
R
false
false
1,194
r
## Using Twitter's API to gather data #Libraries library(twitteR) library(tm) library(syuzhet) library(ggplot2) library(descr) library(magrittr) #read token from file token <- read.csv("~/token.csv",header = FALSE,stringsAsFactors = FALSE) consumer_key <- token$V1[1] consumer_secret <- token$V1[2] access_token <- to...
# Setup #### # My PC main = "/Users/Steven/Documents/Academics/3_Graduate School/2014-2015_NU/" # Aginity #main = "\\\\nas1/labuser169" course = "MSIA_400_Analytics for Competitive Advantage" datafolder = "Lab/10_06" setwd(file.path(main,course, datafolder)) height <- read.table("height.txt", header=T) # Mean ###...
/msia_analytics_competitive_advantage/10_06/lab_02.R
no_license
Ajay20202020/courses
R
false
false
3,233
r
# Setup #### # My PC main = "/Users/Steven/Documents/Academics/3_Graduate School/2014-2015_NU/" # Aginity #main = "\\\\nas1/labuser169" course = "MSIA_400_Analytics for Competitive Advantage" datafolder = "Lab/10_06" setwd(file.path(main,course, datafolder)) height <- read.table("height.txt", header=T) # Mean ###...
# test_zerovar.R library(lmerTest) data("sleepstudy", package="lme4") # Baseline fit: m0 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy, control=lmerControl(optimizer="bobyqa")) ## default optimizer does not converge proporly m0 (an0 <- anova(m0)) # Make a fit with a zero variance estimate: n <- ...
/tests/test_zerovar.R
no_license
runehaubo/lmerTestR
R
false
false
1,147
r
# test_zerovar.R library(lmerTest) data("sleepstudy", package="lme4") # Baseline fit: m0 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy, control=lmerControl(optimizer="bobyqa")) ## default optimizer does not converge proporly m0 (an0 <- anova(m0)) # Make a fit with a zero variance estimate: n <- ...
\name{test.gstatModel-methods} \docType{methods} \alias{test.gstatModel-method} \alias{test.gstatModel} \alias{test.gstatModel,SpatialPointsDataFrame,formula,SpatialPixelsDataFrame-method} \alias{test.gstatModel,geosamples,formula,SpatialPixelsDataFrame-method} \title{Methods to test predictability of a regression-krig...
/man/test.gstatModel.Rd
no_license
brendo1001/GSIF
R
false
false
2,871
rd
\name{test.gstatModel-methods} \docType{methods} \alias{test.gstatModel-method} \alias{test.gstatModel} \alias{test.gstatModel,SpatialPointsDataFrame,formula,SpatialPixelsDataFrame-method} \alias{test.gstatModel,geosamples,formula,SpatialPixelsDataFrame-method} \title{Methods to test predictability of a regression-krig...
library(aqp) library(rgdal) library(rgeos) ############################################### ## new version based on NSSL access database ## ############################################### ## warning... there are still some errors in these data: # 07CA109004 [fixed] x <- read.csv('MLRA_18_22-lab_data.csv', as.is=TRUE...
/misc/test_suite/nssl/notes.R
no_license
ncss-tech/aqp
R
false
false
5,613
r
library(aqp) library(rgdal) library(rgeos) ############################################### ## new version based on NSSL access database ## ############################################### ## warning... there are still some errors in these data: # 07CA109004 [fixed] x <- read.csv('MLRA_18_22-lab_data.csv', as.is=TRUE...
#Comparison between Deslocate and Real Control (Area-1) #Eduardo Q Marques 22-10-2020 library(ggridges) library(raster) library(rgdal) library(ggplot2) library(reshape2) library(dplyr) library(tidyr) library(viridis) library(ggpubr) library(GGally) library(rasterVis) area1 <-readOGR(dsn = "C:/Users/Eduardo Q Marques...
/Doutorado/Chapter-1/PhD Geographic scripts/HYPERION Comparison between Deslocate and Real Control (Area-1).R
no_license
biarebelatto/Science-Repository
R
false
false
3,592
r
#Comparison between Deslocate and Real Control (Area-1) #Eduardo Q Marques 22-10-2020 library(ggridges) library(raster) library(rgdal) library(ggplot2) library(reshape2) library(dplyr) library(tidyr) library(viridis) library(ggpubr) library(GGally) library(rasterVis) area1 <-readOGR(dsn = "C:/Users/Eduardo Q Marques...
### 19 January ### ### Data frames in R ### ## Data loading dat <- read.csv("http://math-info.hse.ru/f/2018-19/ling-data/Chi.kuk.2007.csv") dat2 <- read.csv(file.choose()) View(dat) ## General information about data frames str(dat) summary(dat) nrow(dat) ## Selection of columns and rows dat$age summary(dat$age) mea...
/seminars/2019-01-19/teo/r-dataframes.R
no_license
LingData2019/LingData
R
false
false
1,310
r
### 19 January ### ### Data frames in R ### ## Data loading dat <- read.csv("http://math-info.hse.ru/f/2018-19/ling-data/Chi.kuk.2007.csv") dat2 <- read.csv(file.choose()) View(dat) ## General information about data frames str(dat) summary(dat) nrow(dat) ## Selection of columns and rows dat$age summary(dat$age) mea...
## Load the data labels MyLabels <- read.table("C:\\Users\\rcorak\\Documents\\MyRStuff\\UCI HAR Dataset\\features.txt") ## Load the Training Data using the Data Labels as the column labels MyTrainingData <- read.table("C:\\Users\\rcorak\\Documents\\MyRStuff\\UCI HAR Dataset\\train\\X_train.txt", col.names=MyLabels[,c("...
/run_analysis.R
no_license
rcorak8021/tidydata
R
false
false
2,933
r
## Load the data labels MyLabels <- read.table("C:\\Users\\rcorak\\Documents\\MyRStuff\\UCI HAR Dataset\\features.txt") ## Load the Training Data using the Data Labels as the column labels MyTrainingData <- read.table("C:\\Users\\rcorak\\Documents\\MyRStuff\\UCI HAR Dataset\\train\\X_train.txt", col.names=MyLabels[,c("...
\name{claradat} \alias{claradat} \docType{data} \title{ Data: Tow Catches of Species in Queen Charlotte Sound } \description{ Tow catches of thirteen species of fish in Queen Charlotte Sound selected for demonstrating the function \code{clarify}, which clusters many species into a smaller number of gro...
/PBSdata/man/claradat.Rd
permissive
pbs-software/pbs-data
R
false
false
2,554
rd
\name{claradat} \alias{claradat} \docType{data} \title{ Data: Tow Catches of Species in Queen Charlotte Sound } \description{ Tow catches of thirteen species of fish in Queen Charlotte Sound selected for demonstrating the function \code{clarify}, which clusters many species into a smaller number of gro...
#' wavdrcast: Wavelet-based direct multistep forecast #' #' This package provides forecasts of time series using a #' direct multistep model where regressors can be composed by #' AR components, exogenous variables and #' wavelet-based signal estimation. #' #' \code{wavdrcast} is a package for forecasting #' time serie...
/R/wavdrcast.R
permissive
nelson16silva/wavdrcast
R
false
false
4,495
r
#' wavdrcast: Wavelet-based direct multistep forecast #' #' This package provides forecasts of time series using a #' direct multistep model where regressors can be composed by #' AR components, exogenous variables and #' wavelet-based signal estimation. #' #' \code{wavdrcast} is a package for forecasting #' time serie...
#!/usr/bin/env Rscript #========================= # call motifs from ATAC-seq peaks using HOMER #========================= library(optparse) library(data.table) options(scipen = 999) options(datatable.fread.datatable=FALSE) #================================= # function to create peak summit information #===========...
/Imp_Scripts/Motif_HOMER.R
no_license
ay-lab/ATACProc
R
false
false
5,414
r
#!/usr/bin/env Rscript #========================= # call motifs from ATAC-seq peaks using HOMER #========================= library(optparse) library(data.table) options(scipen = 999) options(datatable.fread.datatable=FALSE) #================================= # function to create peak summit information #===========...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RN_info.R \name{RN_info} \alias{RN_info} \title{Quick table of Radionuclide Data from the RadData package} \usage{ RN_info(RN_select) } \arguments{ \item{RN_select}{identify the radionuclide of interest in the format "Es-254m"} } \value{ a ta...
/man/RN_info.Rd
no_license
markhogue/radsafer
R
false
true
1,111
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RN_info.R \name{RN_info} \alias{RN_info} \title{Quick table of Radionuclide Data from the RadData package} \usage{ RN_info(RN_select) } \arguments{ \item{RN_select}{identify the radionuclide of interest in the format "Es-254m"} } \value{ a ta...
#' Brazilian Farmers #' #' From Valente (1995) \dQuote{In the mid-1960s, Rogers and others conducted #' an ambitious \sQuote{three country study} to determine influences on adoption #' of farm practices in Nigeria, India and Brazil. [...] Only in Brazil, and #' only for hybrid corn, did adoption of the innovation reach...
/R/data.r
permissive
USCCANA/netdiffuseR
R
false
false
40,555
r
#' Brazilian Farmers #' #' From Valente (1995) \dQuote{In the mid-1960s, Rogers and others conducted #' an ambitious \sQuote{three country study} to determine influences on adoption #' of farm practices in Nigeria, India and Brazil. [...] Only in Brazil, and #' only for hybrid corn, did adoption of the innovation reach...
library(InspectChangepoint) ### Name: plot.hdchangeseq ### Title: Plot function for 'hdchangeseq' class ### Aliases: plot.hdchangeseq ### Keywords: ~aplot ### ** Examples n <- 2000; p <- 200; ks <- 40; zs <- c(500,1000,1500); varthetas <- c(0.1,0.15,0.2); overlap <- 0.5 obj <- multi.change(n, p, ks, zs, varthetas, ...
/data/genthat_extracted_code/InspectChangepoint/examples/plot.hdchangeseq.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
356
r
library(InspectChangepoint) ### Name: plot.hdchangeseq ### Title: Plot function for 'hdchangeseq' class ### Aliases: plot.hdchangeseq ### Keywords: ~aplot ### ** Examples n <- 2000; p <- 200; ks <- 40; zs <- c(500,1000,1500); varthetas <- c(0.1,0.15,0.2); overlap <- 0.5 obj <- multi.change(n, p, ks, zs, varthetas, ...
nobs = list(300) g1 = list(c(.33, .33, 0), c(.33, -.33, 0)) h1 = list(c(0, 0, 0), c(.33, 0, 0), c(-.33, 0, 0)) sd_eps = list(c(1, 1, 0)) sd = list(1) b1 = list(c(0, 0, 0, 0)) b2 = list(c(0, 0, 0), c(.25, 0, 0)) rate = list(1/2, 1/4, 1/8, 1/16, 1/32) d = list(c(1, 1, 0)) data_param...
/R/contingent_complement_parameters.R
no_license
stijnmasschelein/complementarity-simulation
R
false
false
1,005
r
nobs = list(300) g1 = list(c(.33, .33, 0), c(.33, -.33, 0)) h1 = list(c(0, 0, 0), c(.33, 0, 0), c(-.33, 0, 0)) sd_eps = list(c(1, 1, 0)) sd = list(1) b1 = list(c(0, 0, 0, 0)) b2 = list(c(0, 0, 0), c(.25, 0, 0)) rate = list(1/2, 1/4, 1/8, 1/16, 1/32) d = list(c(1, 1, 0)) data_param...
load("/Users/SLancaster/Desktop/Projects/Fiber/Multiomics/RData/Normalized_Log_Arabinoxylan_cytokine_df.RData") load("/Users/SLancaster/Desktop/Projects/Fiber/Multiomics/RData/Normalized_Log_Arabinoxylan_pcl_df.RData") #With the Tatiana correlations we did not do the deltas but rather just did the log normalized #I wa...
/Microbiome_Cytokine_Correlations.R
no_license
linlin0026/fiber_-_10.1016-j.chom.2022.03.036
R
false
false
5,419
r
load("/Users/SLancaster/Desktop/Projects/Fiber/Multiomics/RData/Normalized_Log_Arabinoxylan_cytokine_df.RData") load("/Users/SLancaster/Desktop/Projects/Fiber/Multiomics/RData/Normalized_Log_Arabinoxylan_pcl_df.RData") #With the Tatiana correlations we did not do the deltas but rather just did the log normalized #I wa...
post.plt <- function(model.out, priors, years, nr=4, nc=2, wd=8, ht=11, post.labs=NULL, graphic='R',xl.type=1, multi=T,path=''){ if(graphic=='pdf')pdf(file.path(path,"post_single.pdf"), width = wd, height = ht, pointsize = 16) if(graphic=='R')windows(record=T,wd, ht) par(mfrow = c(nr, nc), mar = c(2, 3, 1, 1), omi ...
/lobster/src/_Rfunctions/post.plt.R
no_license
surfcao/ecomod
R
false
false
3,019
r
post.plt <- function(model.out, priors, years, nr=4, nc=2, wd=8, ht=11, post.labs=NULL, graphic='R',xl.type=1, multi=T,path=''){ if(graphic=='pdf')pdf(file.path(path,"post_single.pdf"), width = wd, height = ht, pointsize = 16) if(graphic=='R')windows(record=T,wd, ht) par(mfrow = c(nr, nc), mar = c(2, 3, 1, 1), omi ...
# ------------------------------------------------------------------------------ # Weighted gene correlation network analysis on P.rubens transcriptomics data # April 22, 2020 # Katelynn Warner, Ben Camber, & TS O'Leary # ------------------------------------------------------------------------------ # Load packages r...
/myscripts/wgcna_p_rubens.R
no_license
tsoleary/eco_genomics
R
false
false
16,159
r
# ------------------------------------------------------------------------------ # Weighted gene correlation network analysis on P.rubens transcriptomics data # April 22, 2020 # Katelynn Warner, Ben Camber, & TS O'Leary # ------------------------------------------------------------------------------ # Load packages r...
#' @title Central hypergeometric distribution mid-P function #' #' @description Calculates the mid-P function's value for the #' central hypergeometric SEUX model. #' #' @param U0 Integer, number of undetected extant species #' at the previous timestep. #' #' @param S0 Integer, number of detected extant species #' ...
/seux/R/central_hyper_midP.R
no_license
nadiahpk/seux
R
false
false
1,586
r
#' @title Central hypergeometric distribution mid-P function #' #' @description Calculates the mid-P function's value for the #' central hypergeometric SEUX model. #' #' @param U0 Integer, number of undetected extant species #' at the previous timestep. #' #' @param S0 Integer, number of detected extant species #' ...
## Set the working directory to where the Excel file is ## Session > Set Working Directory > Choose Directory > Select the directory where the Excel file is getwd() dir() ## Principal Component Analysis ## Reference: http://www.statmethods.net/advstats/factor.html input <- read.csv("University Ranking.csv",...
/2.2 RCode - PCA.R
no_license
SudhansuTaparia/RProjects
R
false
false
728
r
## Set the working directory to where the Excel file is ## Session > Set Working Directory > Choose Directory > Select the directory where the Excel file is getwd() dir() ## Principal Component Analysis ## Reference: http://www.statmethods.net/advstats/factor.html input <- read.csv("University Ranking.csv",...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/boxcox.R \name{boxcox} \alias{boxcox} \title{Box-Cox transformation for linear models} \usage{ boxcox(object, lambda = "estim", method = "ml", lambdarange = c(-2, 2), plotit = TRUE) } \arguments{ \item{object}{an object of type \c...
/man/boxcox.Rd
no_license
cran/trafo
R
false
true
2,279
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/boxcox.R \name{boxcox} \alias{boxcox} \title{Box-Cox transformation for linear models} \usage{ boxcox(object, lambda = "estim", method = "ml", lambdarange = c(-2, 2), plotit = TRUE) } \arguments{ \item{object}{an object of type \c...
setwd('~/Desktop/CSHL/') load('DNA_GEN.RData') load('AA_GEN.RData') mutations <- c('g291d', 'i156r') years_vec <- c(2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018) labels <- unlist(aa_gen[,4]) library(vwr) mut.291 <- c() for(i in 1:nrow(aa_gen)){ aa <- unname(unlist(aa_gen[i,5])) if(length(aa) < 560){mut.291...
/abnormal_mutations/mutation_eval.R
no_license
mwalte10/influenza
R
false
false
4,741
r
setwd('~/Desktop/CSHL/') load('DNA_GEN.RData') load('AA_GEN.RData') mutations <- c('g291d', 'i156r') years_vec <- c(2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018) labels <- unlist(aa_gen[,4]) library(vwr) mut.291 <- c() for(i in 1:nrow(aa_gen)){ aa <- unname(unlist(aa_gen[i,5])) if(length(aa) < 560){mut.291...
#!/usr/bin/env Rscript ####### # LOG # ####### log <- file(snakemake@log[[1]], open = "wt") sink(log, type = "message") sink(log, append = TRUE, type = "output") ############# # LIBRARIES # ############# library(data.table) ########### # GLOBALS # ########### abundance_file <- snakemake@input[["abundance"]] ####...
/scripts/sort_isoforms.R
no_license
sarahinwood/individual-sample-transcriptomes
R
false
false
1,107
r
#!/usr/bin/env Rscript ####### # LOG # ####### log <- file(snakemake@log[[1]], open = "wt") sink(log, type = "message") sink(log, append = TRUE, type = "output") ############# # LIBRARIES # ############# library(data.table) ########### # GLOBALS # ########### abundance_file <- snakemake@input[["abundance"]] ####...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dl_split.R \name{dl_split} \alias{dl_split} \title{Worst-Pair-Fitting Damerau Levenshtein Distance} \usage{ dl_split(a, b, penalty = 0.1) } \arguments{ \item{a}{\code{[character]} vector.} \item{b}{\code{[character]} vector.} \item{penalty}...
/man/dl_split.Rd
no_license
mrschuster/dlsplit
R
false
true
552
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dl_split.R \name{dl_split} \alias{dl_split} \title{Worst-Pair-Fitting Damerau Levenshtein Distance} \usage{ dl_split(a, b, penalty = 0.1) } \arguments{ \item{a}{\code{[character]} vector.} \item{b}{\code{[character]} vector.} \item{penalty}...
# MSD plates analysis # Helper functions # FC 2014_01_08 require(rGithubClient) git <- getRepo('fredcommo/proteinArrays') sourceRepoFile(git, "predict_protArrays_helpers.R") # compute Ratios adjustGAPDH <- function(Table){ gapdh <- Table[which(Table$target == "GAPDH"),] gapdh <- by(gapdh$value, gapdh$sample, mean...
/msd_helper_functions.R
no_license
fredcommo/msdRcode
R
false
false
2,246
r
# MSD plates analysis # Helper functions # FC 2014_01_08 require(rGithubClient) git <- getRepo('fredcommo/proteinArrays') sourceRepoFile(git, "predict_protArrays_helpers.R") # compute Ratios adjustGAPDH <- function(Table){ gapdh <- Table[which(Table$target == "GAPDH"),] gapdh <- by(gapdh$value, gapdh$sample, mean...
context("ml - evaluate") test_that("ml_evaluate() works for logistic regression", { test_requires_version("2.0.0", "multiclass logreg requires spark 2+") sc <- testthat_spark_connection() iris_tbl <- testthat_tbl("iris") model <- ml_logistic_regression(iris_tbl, Species ~ .) s <- ml_evaluate(model, iris_tbl)...
/tests/testthat/test-ml-evaluate.R
permissive
zslajchrt/sparklyr
R
false
false
3,868
r
context("ml - evaluate") test_that("ml_evaluate() works for logistic regression", { test_requires_version("2.0.0", "multiclass logreg requires spark 2+") sc <- testthat_spark_connection() iris_tbl <- testthat_tbl("iris") model <- ml_logistic_regression(iris_tbl, Species ~ .) s <- ml_evaluate(model, iris_tbl)...
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 PF_smooth <- function(n_fixed_terms_in_state_vec, X, fixed_terms, tstart, tstop, a_0, R, Q_0, Q, Q_tilde, risk_obj, Fmat, n_max, n_threads, fixed_params, N_fw_n_bw, N_smooth, N_smooth_final, co...
/R/RcppExports.R
no_license
boennecd/dynamichazard
R
false
false
10,637
r
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 PF_smooth <- function(n_fixed_terms_in_state_vec, X, fixed_terms, tstart, tstop, a_0, R, Q_0, Q, Q_tilde, risk_obj, Fmat, n_max, n_threads, fixed_params, N_fw_n_bw, N_smooth, N_smooth_final, co...
## cachematrix.R: Implements a matrix abstract data type which ## 1. is assumed to be invertible ## 2. computes its inverse when needed, and then caches it until ## the matrix changes ## To create the matrix use makeCacheMatrix() optionally passing the ## intial matrix. ## ## To get the inverse, use cacheSolve...
/cachematrix.R
no_license
Goatflakes/ProgrammingAssignment2
R
false
false
3,351
r
## cachematrix.R: Implements a matrix abstract data type which ## 1. is assumed to be invertible ## 2. computes its inverse when needed, and then caches it until ## the matrix changes ## To create the matrix use makeCacheMatrix() optionally passing the ## intial matrix. ## ## To get the inverse, use cacheSolve...
# Parameters: # d.train - training set # d.valid - validation set # baseline - character vector witha list of variable in the baseline model # variable - new variable to be assessed against the baseline model compare.models<-function(d.train, d.valid, baseline, variable, num_obs, filename){ m.vars1...
/clean_code/functions/functions_compare_models.R
no_license
nvkov/TimeMachine
R
false
false
1,844
r
# Parameters: # d.train - training set # d.valid - validation set # baseline - character vector witha list of variable in the baseline model # variable - new variable to be assessed against the baseline model compare.models<-function(d.train, d.valid, baseline, variable, num_obs, filename){ m.vars1...