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
\name{biSBM-package} \alias{biSBM-package} \alias{biSBM} \docType{package} \title{ \packageTitle{biSBM} } \description{ \packageDescription{biSBM} } \details{ The DESCRIPTION file: \packageDESCRIPTION{biSBM} \packageIndices{biSBM} ~~ An overview of how to use the package, including the most important functions ~~ } \a...
/biSBM/man/biSBM-package.Rd
no_license
amalag-19/bipartite_C
R
false
false
775
rd
\name{biSBM-package} \alias{biSBM-package} \alias{biSBM} \docType{package} \title{ \packageTitle{biSBM} } \description{ \packageDescription{biSBM} } \details{ The DESCRIPTION file: \packageDESCRIPTION{biSBM} \packageIndices{biSBM} ~~ An overview of how to use the package, including the most important functions ~~ } \a...
require(xgboost) context("basic functions") data(agaricus.train, package='xgboost') data(agaricus.test, package='xgboost') train <- agaricus.train test <- agaricus.test set.seed(1994) test_that("train and predict binary classification", { nrounds = 2 expect_output( bst <- xgboost(data = train$data, label = t...
/R-package/tests/testthat/test_basic.R
permissive
zoucuomiao/xgboost
R
false
false
7,316
r
require(xgboost) context("basic functions") data(agaricus.train, package='xgboost') data(agaricus.test, package='xgboost') train <- agaricus.train test <- agaricus.test set.seed(1994) test_that("train and predict binary classification", { nrounds = 2 expect_output( bst <- xgboost(data = train$data, label = t...
#Load packages library(tidyverse) library(extrafont) library(ggtext) library(Cairo) #Get the data tuesdata <- tidytuesdayR::tt_load(2021, week = 8) freed_slaves_wide <- tuesdata$freed_slaves #Long format data used to make the plot later freed_slaves_wide %>% mutate(Slave = case_when(Year == 1800 ~ Slave + 1, ...
/2021/W08_Dubois_Challenge/W08_Dubois_Challenge.R
no_license
dimbage/R_Tidytuesday
R
false
false
4,196
r
#Load packages library(tidyverse) library(extrafont) library(ggtext) library(Cairo) #Get the data tuesdata <- tidytuesdayR::tt_load(2021, week = 8) freed_slaves_wide <- tuesdata$freed_slaves #Long format data used to make the plot later freed_slaves_wide %>% mutate(Slave = case_when(Year == 1800 ~ Slave + 1, ...
% FILE rqapp/man/rqa.Rd \name{rqa} \alias{rqa} \title{ Recurrence Quantification Analysis } \description{ This function performs recurrence quantification anlaysis and its bivariate extension, cross recurrence quantification analysis. } \usage{ rqa(ts1, ts2, embed, delay, normalize, rescale, mindiagline...
/man/rqa.Rd
no_license
aaronlikens/rqapp
R
false
false
4,889
rd
% FILE rqapp/man/rqa.Rd \name{rqa} \alias{rqa} \title{ Recurrence Quantification Analysis } \description{ This function performs recurrence quantification anlaysis and its bivariate extension, cross recurrence quantification analysis. } \usage{ rqa(ts1, ts2, embed, delay, normalize, rescale, mindiagline...
rm( list=ls() ) library(lme4) #1.1-21 library(boot) #1.3-22 library(ggplot2) #3.2.1 library(LaplacesDemon) #16.1.1 library(plyr) #1.8.4 library(devtools) #2.2.1 library(piecewiseSEM) #2.1.0 setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) ##################### ### DATA INIT ### ##################### ...
/Exp2/glmR/mixedModelSummary.R
no_license
Nian-Jingqing/ior
R
false
false
2,316
r
rm( list=ls() ) library(lme4) #1.1-21 library(boot) #1.3-22 library(ggplot2) #3.2.1 library(LaplacesDemon) #16.1.1 library(plyr) #1.8.4 library(devtools) #2.2.1 library(piecewiseSEM) #2.1.0 setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) ##################### ### DATA INIT ### ##################### ...
% Generated by roxygen2 (4.0.2): do not edit by hand \name{startprofiles} \alias{startprofiles} \title{Initialize profile list object} \usage{ startprofiles(logfile, frac = FALSE, sets = FALSE, progbar = FALSE, ion_mode = "positive", until = FALSE) } \arguments{ \item{logfile}{logfile object of an enviMass project.} ...
/man/startprofiles.Rd
no_license
dutchjes/enviMass
R
false
false
986
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \name{startprofiles} \alias{startprofiles} \title{Initialize profile list object} \usage{ startprofiles(logfile, frac = FALSE, sets = FALSE, progbar = FALSE, ion_mode = "positive", until = FALSE) } \arguments{ \item{logfile}{logfile object of an enviMass project.} ...
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704...
/myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615766957-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
1,802
r
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704...
#' @title Compute vector of loglikelihood for fitted mash object on new data. #' #' @param g A mash object. #' #' @param data A set of data on which to compute the loglikelihood. #' #' @param algorithm.version Indicate R or Rcpp version #' #' @return The vector of log-likelihoods for each data point computed using g. #...
/R/likelihoods_origdata.R
permissive
surbut/mashr
R
false
false
4,222
r
#' @title Compute vector of loglikelihood for fitted mash object on new data. #' #' @param g A mash object. #' #' @param data A set of data on which to compute the loglikelihood. #' #' @param algorithm.version Indicate R or Rcpp version #' #' @return The vector of log-likelihoods for each data point computed using g. #...
# Turn off double evaluation to make things faster AUTO_DETECT_NEWVAR <- FALSE match_call <- function(correct_call = NULL) { e <- get("e", parent.frame()) # Trivial case if(is.null(correct_call)) return(TRUE) # Get full correct call full_correct_call <- expand_call(correct_call) # Expand user's ...
/Unit 2 - Data Sources & Manipulation/Manipulating_Data_with_dplyr/customTests.R
no_license
covenwu/RinEduApp
R
false
false
4,728
r
# Turn off double evaluation to make things faster AUTO_DETECT_NEWVAR <- FALSE match_call <- function(correct_call = NULL) { e <- get("e", parent.frame()) # Trivial case if(is.null(correct_call)) return(TRUE) # Get full correct call full_correct_call <- expand_call(correct_call) # Expand user's ...
# IODS final project # Agata Dominowska # 12.12.2017 # This file contains the R code for IODS 2017: final project # The package used in this project comes from FactoMineR. # The goal of the project is to perform Multiple Correspondence Analysis on the pre-processed data set. # Accessing the necessary libraries. libra...
/IODS-final-data-wrangling.R
no_license
aadomino/IODS-final
R
false
false
2,577
r
# IODS final project # Agata Dominowska # 12.12.2017 # This file contains the R code for IODS 2017: final project # The package used in this project comes from FactoMineR. # The goal of the project is to perform Multiple Correspondence Analysis on the pre-processed data set. # Accessing the necessary libraries. libra...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ClusterAgnesSpearman.R \name{ClusterAgnesSpearman} \alias{ClusterAgnesSpearman} \title{Cluster Agnes /Spearman} \usage{ ClusterAgnesSpearman(expressionData) } \value{ [[data.frame]] } \description{ Cluster Agnes /Spearman }
/man/ClusterAgnesSpearman.Rd
no_license
roderickslieker/CONQUER
R
false
true
302
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ClusterAgnesSpearman.R \name{ClusterAgnesSpearman} \alias{ClusterAgnesSpearman} \title{Cluster Agnes /Spearman} \usage{ ClusterAgnesSpearman(expressionData) } \value{ [[data.frame]] } \description{ Cluster Agnes /Spearman }
makeCacheMatrix <- function(x = matrix()) { #Processes matrix object and #sets list of functions to be passed to "cacheSolve" function m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setInverse <- function(solve) m <<- solve getInverse <- function...
/cachematrix.R
no_license
reche025/ProgrammingAssignment2
R
false
false
733
r
makeCacheMatrix <- function(x = matrix()) { #Processes matrix object and #sets list of functions to be passed to "cacheSolve" function m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setInverse <- function(solve) m <<- solve getInverse <- function...
#"Дискретные предикторы в линейных моделях" #' ## Глистогонные и рост коз #' #' Как связан прирост массы коз с начальным весом животного и интенсивностью профилактики паразитарных заболеваний? #' #' #' - `Treatment` - обработка от глистов (стандартная, интенсивная) #' - `Weightgain` - привес, кг #' - `Initial.wt` - н...
/5.1_categorical-no_interactions_code.R
no_license
varmara/glmintro
R
false
false
8,072
r
#"Дискретные предикторы в линейных моделях" #' ## Глистогонные и рост коз #' #' Как связан прирост массы коз с начальным весом животного и интенсивностью профилактики паразитарных заболеваний? #' #' #' - `Treatment` - обработка от глистов (стандартная, интенсивная) #' - `Weightgain` - привес, кг #' - `Initial.wt` - н...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/files.R \name{GetDataDir} \alias{GetDataDir} \title{Find the local directory containing ISD-lite records} \usage{ GetDataDir() } \value{ string - path of directory containing local ISD data. } \description{ There is no useable web ver...
/man/GetDataDir.Rd
permissive
oldweather/ISDlite
R
false
false
512
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/files.R \name{GetDataDir} \alias{GetDataDir} \title{Find the local directory containing ISD-lite records} \usage{ GetDataDir() } \value{ string - path of directory containing local ISD data. } \description{ There is no useable web ver...
#Dear Student, # #Welcome to the dataset for the homework exercise. # #Instructions for this dataset: # You have only been supplied vectors. You will need # to create the matrices yourself. # Matrices: # - FreeThrows # - FreeThrowAttempts # #Sincerely, #Kirill Eremenko #www.superdatascience.com #Copyrig...
/R Stuff/Section4-Homework-Data.R
no_license
brett-davi5/R-Studio-and-GGPlotMap
R
false
false
3,169
r
#Dear Student, # #Welcome to the dataset for the homework exercise. # #Instructions for this dataset: # You have only been supplied vectors. You will need # to create the matrices yourself. # Matrices: # - FreeThrows # - FreeThrowAttempts # #Sincerely, #Kirill Eremenko #www.superdatascience.com #Copyrig...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/editfile.R \name{editfile} \alias{editfile} \title{Read edits edits from free-form textfile} \usage{ editfile(file, type = c("all", "num", "cat", "mix"), ...) } \arguments{ \item{file}{name of text file to read in} \item{type}{type o...
/pkg/man/editfile.Rd
no_license
jenifferYingyiWu/editrules
R
false
false
1,220
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/editfile.R \name{editfile} \alias{editfile} \title{Read edits edits from free-form textfile} \usage{ editfile(file, type = c("all", "num", "cat", "mix"), ...) } \arguments{ \item{file}{name of text file to read in} \item{type}{type o...
fab_norm <- function(p) { x <- c(1, 1, 2, 3, 5, 8) (sum(abs(x)^p))^(1/p) } # fab_norm(c(1, 2)) # gives wrong result # possible workaround # c(fab_norm(1), fab_norm(2)) # map_dbl(c(1,2), fab_norm)
/ch02-debug-profile/debug2.R
no_license
ucdavis-sta141c-2021-winter/sta141c-lectures
R
false
false
204
r
fab_norm <- function(p) { x <- c(1, 1, 2, 3, 5, 8) (sum(abs(x)^p))^(1/p) } # fab_norm(c(1, 2)) # gives wrong result # possible workaround # c(fab_norm(1), fab_norm(2)) # map_dbl(c(1,2), fab_norm)
singlepaths <- function(model, colors = NULL, equal.ranges = FALSE, subs = NULL){ coefs <- model$coefs covar <- colnames(model$X) acoefs <- model$acoefs norm <- rowSums(abs(coefs%*%acoefs)) norm <- norm/max(norm) m <- model$m n.theta <- model$n.theta labels <- model$labels c...
/BTLLasso/R/singlepaths.R
no_license
ingted/R-Examples
R
false
false
1,508
r
singlepaths <- function(model, colors = NULL, equal.ranges = FALSE, subs = NULL){ coefs <- model$coefs covar <- colnames(model$X) acoefs <- model$acoefs norm <- rowSums(abs(coefs%*%acoefs)) norm <- norm/max(norm) m <- model$m n.theta <- model$n.theta labels <- model$labels c...
#' Get pages by tags #' #' @noRd get_tags <- function(pages){ get_pages_by_groups(pages, gby = 'tags') } #' Get pages by categoris #' #' @noRd get_categories <- function(pages){ get_pages_by_groups(pages, gby = 'categories') } #' Get pages by group #' #' @noRd get_pages_by_groups <- function(pages, gby = 'tags'...
/R/bloghelpers.R
no_license
fusuma/slidify
R
false
false
741
r
#' Get pages by tags #' #' @noRd get_tags <- function(pages){ get_pages_by_groups(pages, gby = 'tags') } #' Get pages by categoris #' #' @noRd get_categories <- function(pages){ get_pages_by_groups(pages, gby = 'categories') } #' Get pages by group #' #' @noRd get_pages_by_groups <- function(pages, gby = 'tags'...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/modules-sc-utils.R \name{load_scseq_qs} \alias{load_scseq_qs} \title{Load SingleCellExperiment from qs file} \usage{ load_scseq_qs( dataset_dir, meta = NULL, groups = NULL, with_logs = FALSE, with_counts = FALSE ) } \arguments{ \ite...
/man/load_scseq_qs.Rd
permissive
saisaitian/dseqr
R
false
true
520
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/modules-sc-utils.R \name{load_scseq_qs} \alias{load_scseq_qs} \title{Load SingleCellExperiment from qs file} \usage{ load_scseq_qs( dataset_dir, meta = NULL, groups = NULL, with_logs = FALSE, with_counts = FALSE ) } \arguments{ \ite...
# Import # dat_long <- readxl::read_excel("personal_tt.xlsx") clean_data <- function(dat) { dat_long <- dat %>% mutate_all(~ as.character(.)) %>% select(-starts_with("WEEK")) %>% pivot_longer( col = 3:ncol(.), names_to = "date_ins", values_to = "value" ) %>% mutate(date_ins ...
/o_functions/tidy_data.R
no_license
c1au6i0/time_racoon
R
false
false
1,123
r
# Import # dat_long <- readxl::read_excel("personal_tt.xlsx") clean_data <- function(dat) { dat_long <- dat %>% mutate_all(~ as.character(.)) %>% select(-starts_with("WEEK")) %>% pivot_longer( col = 3:ncol(.), names_to = "date_ins", values_to = "value" ) %>% mutate(date_ins ...
library(tidyverse) #script to call in cQ slopes for full record, baseflow only, individual stormflow events, and bulk stormflow events. #all were created in Code/cQ_Slope_Calculations.R all_full <- read_rds("Data/cQ_slopes/fullRecord.rds") all_baseflow <- read_rds("Data/cQ_slopes/baseflow.rds") all_individual_events ...
/Data/cQ_slopes/call_cQslope_datasets.R
no_license
LinneaRock/MendotaWatershed_SalinityRegimes
R
false
false
433
r
library(tidyverse) #script to call in cQ slopes for full record, baseflow only, individual stormflow events, and bulk stormflow events. #all were created in Code/cQ_Slope_Calculations.R all_full <- read_rds("Data/cQ_slopes/fullRecord.rds") all_baseflow <- read_rds("Data/cQ_slopes/baseflow.rds") all_individual_events ...
#' @title Write Sequoia Output to File #' #' @description The various list elements returned by \code{sequoia} are each #' written to text files in the specified folder, or to separate sheets in a #' single excel file (requires library \pkg{openxlsx}). #' #' @details The text files can be used as input for the stan...
/R/WriteToFiles.R
no_license
JiscaH/sequoia
R
false
false
14,176
r
#' @title Write Sequoia Output to File #' #' @description The various list elements returned by \code{sequoia} are each #' written to text files in the specified folder, or to separate sheets in a #' single excel file (requires library \pkg{openxlsx}). #' #' @details The text files can be used as input for the stan...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/motif_plot.R \name{ggmotif_scale} \alias{ggmotif_scale} \title{ggmotif_scale} \usage{ ggmotif_scale() } \description{ removes ugly legends and applies fixed coloring scheme to letters } \examples{ ggplot() + ggmotif("ACG") + ggmotif_scale() }...
/man/ggmotif_scale.Rd
no_license
guoyanb/ggmotif
R
false
true
322
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/motif_plot.R \name{ggmotif_scale} \alias{ggmotif_scale} \title{ggmotif_scale} \usage{ ggmotif_scale() } \description{ removes ugly legends and applies fixed coloring scheme to letters } \examples{ ggplot() + ggmotif("ACG") + ggmotif_scale() }...
library(openxlsx) library(magrittr) library(data.table) # import the data (put correct path of data) customer_invoices <- read.csv('customer_invoices_2 (1).csv',sep = ",", header= TRUE, stringsAsFactors = FALSE) # change into datatable setDT(customer_invoices) #convert dates format from char to dates cus...
/Code.R
no_license
javeriaomar/Fast-and-efficient-data-manipulation-example-using-data.table-logic
R
false
false
5,522
r
library(openxlsx) library(magrittr) library(data.table) # import the data (put correct path of data) customer_invoices <- read.csv('customer_invoices_2 (1).csv',sep = ",", header= TRUE, stringsAsFactors = FALSE) # change into datatable setDT(customer_invoices) #convert dates format from char to dates cus...
## Permutation test to assess for enrichment of GPCRs in genes with monoallelic expression # setwd("~/Desktop/Permutation_testing/Allelic_expression/") # Please set appropriate working directory aexp = read.table('../data/allelicexp_genes.txt',header=T) background<-as.vector(unlist(aexp$Ensemble_ID)) #Genes with mon...
/scripts/allelicexp.R
no_license
AlexanderHauser/GPCR-Pharmacogenomics
R
false
false
1,410
r
## Permutation test to assess for enrichment of GPCRs in genes with monoallelic expression # setwd("~/Desktop/Permutation_testing/Allelic_expression/") # Please set appropriate working directory aexp = read.table('../data/allelicexp_genes.txt',header=T) background<-as.vector(unlist(aexp$Ensemble_ID)) #Genes with mon...
library(data.table) library(dplyr) library(ggplot2) a <- fread("../data/ukb_sqc_v2.txt", he=FALSE) b <- fread("../data/ukb878_imp_chr10_v2_s487406.sample", he=FALSE, skip=2) a <- subset(a, V66 == 1) index <- a$V26 > (a$V27 * 0.5 + 45) table(index) p1 <- ggplot(a, aes(V27, V26)) + geom_point(aes(colour=index)) + geo...
/scripts/ancestry.r
no_license
explodecomputer/add-chip-design
R
false
false
625
r
library(data.table) library(dplyr) library(ggplot2) a <- fread("../data/ukb_sqc_v2.txt", he=FALSE) b <- fread("../data/ukb878_imp_chr10_v2_s487406.sample", he=FALSE, skip=2) a <- subset(a, V66 == 1) index <- a$V26 > (a$V27 * 0.5 + 45) table(index) p1 <- ggplot(a, aes(V27, V26)) + geom_point(aes(colour=index)) + geo...
library(OPDOE) ### Name: heights ### Title: male / female heights data ### Aliases: heights ### Keywords: datasets ### ** Examples data(heights) attach(heights) tt <- triangular.test.norm(x=female[1:3], y=male[1:3], mu1=170,mu2=176,mu0=164, alpha=0.05, beta=0.2,sigma=7) # Test is yet unfinished, add the remai...
/data/genthat_extracted_code/OPDOE/examples/heights.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
403
r
library(OPDOE) ### Name: heights ### Title: male / female heights data ### Aliases: heights ### Keywords: datasets ### ** Examples data(heights) attach(heights) tt <- triangular.test.norm(x=female[1:3], y=male[1:3], mu1=170,mu2=176,mu0=164, alpha=0.05, beta=0.2,sigma=7) # Test is yet unfinished, add the remai...
library(doParallel) library(foreach) # Calculate the number of cores getDoParWorkers() detectCores() cl=makeCluster(5) registerDoParallel(cl) ...
/parametric_models/n2500/delta_0.25/dr_wrongPS.R
no_license
lw499/Stochastic_treatment_paper
R
false
false
6,994
r
library(doParallel) library(foreach) # Calculate the number of cores getDoParWorkers() detectCores() cl=makeCluster(5) registerDoParallel(cl) ...
setwd('C:\\Users\\Andy\\Documents\\GitHub\\ExData_Plotting1')
/wd.R
no_license
jagzuk/ExData_Plotting1
R
false
false
61
r
setwd('C:\\Users\\Andy\\Documents\\GitHub\\ExData_Plotting1')
# test make_filename test_that("make_filename generates file name", { expect_equal(make_filename(1992), "accident_1992.csv.bz2") }) # test fars_read_years test_that("fars_read_years return NULL if the file is missing", { expect_equal(fars_read_years(2014), list(NULL)) })
/tests/testthat/test_far.R
no_license
addyag93/farsReport
R
false
false
280
r
# test make_filename test_that("make_filename generates file name", { expect_equal(make_filename(1992), "accident_1992.csv.bz2") }) # test fars_read_years test_that("fars_read_years return NULL if the file is missing", { expect_equal(fars_read_years(2014), list(NULL)) })
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/slim_lang.R \name{positionsOfMutationsOfType} \alias{positionsOfMutationsOfType} \alias{Genome$positionsOfMutationsOfType} \alias{.G$positionsOfMutationsOfType} \title{SLiM method positionsOfMutationsOfType} \usage{ positionsOfMutationsOfType...
/man/positionsOfMutationsOfType.Rd
permissive
rdinnager/slimr
R
false
true
2,584
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/slim_lang.R \name{positionsOfMutationsOfType} \alias{positionsOfMutationsOfType} \alias{Genome$positionsOfMutationsOfType} \alias{.G$positionsOfMutationsOfType} \title{SLiM method positionsOfMutationsOfType} \usage{ positionsOfMutationsOfType...
best <- function(state, outcome) { data_set <- read.csv("outcome-of-care-measures.csv", colClasses = "character", na.strings="Not Available") good_data = c("heart attack","heart failure","pneumonia") if (!outcome %in% good_data) { stop("diseas...
/best.R
no_license
canichet/ProgrammingAssignment2
R
false
false
854
r
best <- function(state, outcome) { data_set <- read.csv("outcome-of-care-measures.csv", colClasses = "character", na.strings="Not Available") good_data = c("heart attack","heart failure","pneumonia") if (!outcome %in% good_data) { stop("diseas...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/analysis.r \name{methylaction} \alias{methylaction} \title{Detect differentially methylated regions (DMRs) from windowed read counts from MBD-isolated genome sequencing (MiGS/MBD-seq) and similar techniques} \usage{ methylaction(samp,...
/man/methylaction.Rd
permissive
jeffbhasin/methylaction
R
false
false
2,435
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/analysis.r \name{methylaction} \alias{methylaction} \title{Detect differentially methylated regions (DMRs) from windowed read counts from MBD-isolated genome sequencing (MiGS/MBD-seq) and similar techniques} \usage{ methylaction(samp,...
#logical #TRUE T #FALSE F 2<5 10>100 4==5 #== #!= #< #<= #>= #! #| #& # isTRUE(x) result <- 4<5 result typeof(result) result2 <- !(5>1) result2 result | result2 result & result2 isTRUE(result)
/logicalVarAndOperators.R
no_license
shubhamgse/Learning-R
R
false
false
200
r
#logical #TRUE T #FALSE F 2<5 10>100 4==5 #== #!= #< #<= #>= #! #| #& # isTRUE(x) result <- 4<5 result typeof(result) result2 <- !(5>1) result2 result | result2 result & result2 isTRUE(result)
plink.score <- function(coefs, score.options="", q.score.range=NULL, q.score.range.data=NULL, q.score.range.options="", p.vals=T, noscale=F, ...)...
/Rplink/R/plink.score.R
no_license
unfated/cross-population-PRS
R
false
false
4,621
r
plink.score <- function(coefs, score.options="", q.score.range=NULL, q.score.range.data=NULL, q.score.range.options="", p.vals=T, noscale=F, ...)...
# Title : TODO # Objective : TODO # Created by: fdrennan # Created on: 5/14/20 # library(biggr) # library(ipify) # # sgd <- security_group_data() # # ips <- sgd %>% # filter(group_name == 'Router', from_port == 22) # # current_ip <- # ips %>% # filter(str_detect(ip_ranges, my_ip)) # # if(nrow(current_ip) == ...
/biggr/scratch.R
no_license
cjayrans/ndexr-platform
R
false
false
2,478
r
# Title : TODO # Objective : TODO # Created by: fdrennan # Created on: 5/14/20 # library(biggr) # library(ipify) # # sgd <- security_group_data() # # ips <- sgd %>% # filter(group_name == 'Router', from_port == 22) # # current_ip <- # ips %>% # filter(str_detect(ip_ranges, my_ip)) # # if(nrow(current_ip) == ...
library(cobs) ### Name: globtemp ### Title: Annual Average Global Surface Temperature ### Aliases: globtemp ### Keywords: datasets ### ** Examples data(globtemp) plot(globtemp, main = "Annual Global Temperature Deviations") str(globtemp) ## forget about time-series, just use numeric vectors: year <- as.vector(time(...
/data/genthat_extracted_code/cobs/examples/globtemp.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,621
r
library(cobs) ### Name: globtemp ### Title: Annual Average Global Surface Temperature ### Aliases: globtemp ### Keywords: datasets ### ** Examples data(globtemp) plot(globtemp, main = "Annual Global Temperature Deviations") str(globtemp) ## forget about time-series, just use numeric vectors: year <- as.vector(time(...
\name{MaternCorr} \alias{Matern} \alias{MaternCorr} \alias{MaternCorr.default} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Matern correlation function and Matern formula term. } \description{ The Matérn correlation function describes realizations of Gaussian spatial processes with d...
/CRAN/contrib/spaMM/man/Matern.corr.Rd
no_license
PRL-PRG/dyntrace-instrumented-packages
R
false
false
3,290
rd
\name{MaternCorr} \alias{Matern} \alias{MaternCorr} \alias{MaternCorr.default} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Matern correlation function and Matern formula term. } \description{ The Matérn correlation function describes realizations of Gaussian spatial processes with d...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/dendextend_options.R \name{assign_dendextend_options} \alias{assign_dendextend_options} \title{Populates dendextend functions into dendextend_options} \usage{ assign_dendextend_options() } \description{ Populates dendextend functions ...
/man/assign_dendextend_options.Rd
no_license
timelyportfolio/dendextend
R
false
false
347
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/dendextend_options.R \name{assign_dendextend_options} \alias{assign_dendextend_options} \title{Populates dendextend functions into dendextend_options} \usage{ assign_dendextend_options() } \description{ Populates dendextend functions ...
require ("sqldf") # I have a french computer so I'm setting the system local to english # in order to display day names in english Sys.setlocale("LC_TIME","English" ) # Reading data file hpc = "./household_power_consumption.txt" # the SQL statement for selecting these two dates only Sql <- "SELECT * from file WHERE...
/Plot3.R
no_license
ranachamsi/ExData_Plotting1
R
false
false
1,030
r
require ("sqldf") # I have a french computer so I'm setting the system local to english # in order to display day names in english Sys.setlocale("LC_TIME","English" ) # Reading data file hpc = "./household_power_consumption.txt" # the SQL statement for selecting these two dates only Sql <- "SELECT * from file WHERE...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/predict_vennLasso.R \name{predict.cv.vennLasso} \alias{predict.cv.vennLasso} \title{Prediction for Cross Validation Hierarchical Lasso Object} \usage{ \method{predict}{cv.vennLasso}(object, newx, group.mat, s = c("lambda.min"), use.refit = FA...
/fuzzedpackages/vennLasso/man/predict.cv.vennLasso.Rd
no_license
akhikolla/testpackages
R
false
true
1,548
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/predict_vennLasso.R \name{predict.cv.vennLasso} \alias{predict.cv.vennLasso} \title{Prediction for Cross Validation Hierarchical Lasso Object} \usage{ \method{predict}{cv.vennLasso}(object, newx, group.mat, s = c("lambda.min"), use.refit = FA...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/predictor.R \name{predict.Predictor} \alias{predict.Predictor} \title{S3 method that wraps Predictor Class} \usage{ \method{predict}{Predictor}( object, newdata, serializer = csv_serializer, deserializer = csv_deserializer, ... ) } ...
/man/predict.Predictor.Rd
permissive
OwenGarrity/sagemaker-r-sdk
R
false
true
878
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/predictor.R \name{predict.Predictor} \alias{predict.Predictor} \title{S3 method that wraps Predictor Class} \usage{ \method{predict}{Predictor}( object, newdata, serializer = csv_serializer, deserializer = csv_deserializer, ... ) } ...
source("dataHelper.R") NEI <- LoadData("summarySCC_PM25") SCC <- LoadData("Source_Classification_Code") png(filename = "plot1.png", width = 480, height = 480, units = "px") yearlyEmissions <- NEI %>% select(Emissions, year) %>% group_by(year) %>% summarise(total = sum(Emissions)) plot(yearlyEmission...
/plot1.R
permissive
vnaidu/ExData_Plotting2
R
false
false
471
r
source("dataHelper.R") NEI <- LoadData("summarySCC_PM25") SCC <- LoadData("Source_Classification_Code") png(filename = "plot1.png", width = 480, height = 480, units = "px") yearlyEmissions <- NEI %>% select(Emissions, year) %>% group_by(year) %>% summarise(total = sum(Emissions)) plot(yearlyEmission...
# Alienability enhancements # # This file is an AUTOTYP aggregation # # For questions, open an issue # # Copyright 2022 Taras Zakharko (CC BY 4.0). # ███████╗███████╗████████╗██╗ ██╗██████╗ # ██╔════╝██╔════╝╚══██╔══╝██║ ██║██╔══██╗ # ███████╗█████╗ ██║ ██║ ██║██████╔╝ # ╚════██║██╔══╝ ██║ ██║ ...
/aggregation-scripts/enhancements/Clusivity.R
permissive
autotyp/autotyp-data
R
false
false
2,741
r
# Alienability enhancements # # This file is an AUTOTYP aggregation # # For questions, open an issue # # Copyright 2022 Taras Zakharko (CC BY 4.0). # ███████╗███████╗████████╗██╗ ██╗██████╗ # ██╔════╝██╔════╝╚══██╔══╝██║ ██║██╔══██╗ # ███████╗█████╗ ██║ ██║ ██║██████╔╝ # ╚════██║██╔══╝ ██║ ██║ ...
##Load relevant libraries library(ggplot2) ##Read in data bat_data <- read.csv("./Data/2020-01_Swanson-et-al_Bats-Forest-Str_Wing-Loading-Aspect-Ratio.csv") ##Create aspect ratio vs. loading plot ggplot(bat_data, aes(x = AspectRatio, y = Wingloading, label = Species)) + geom_point() + labs(x = "Aspect Ratio", y =...
/wingloading_aspect.R
no_license
thatsciencegal/flying_under_lidar
R
false
false
513
r
##Load relevant libraries library(ggplot2) ##Read in data bat_data <- read.csv("./Data/2020-01_Swanson-et-al_Bats-Forest-Str_Wing-Loading-Aspect-Ratio.csv") ##Create aspect ratio vs. loading plot ggplot(bat_data, aes(x = AspectRatio, y = Wingloading, label = Species)) + geom_point() + labs(x = "Aspect Ratio", y =...
# Functions for the spaghetti tutorial # Created by Kaija Gahm # 31 January 2020 # You are given a box of pasta and an empty pot box <- data.frame(ingredient = as.character("pasta"), cooked = 0) pot <- data.frame(ingredient = as.character("air"), cooked = 0) # Fill the pot fill <- function(df){ df %>% mutate(ingred...
/spaghetti_functions.R
no_license
kaijagahm/tutorials
R
false
false
1,629
r
# Functions for the spaghetti tutorial # Created by Kaija Gahm # 31 January 2020 # You are given a box of pasta and an empty pot box <- data.frame(ingredient = as.character("pasta"), cooked = 0) pot <- data.frame(ingredient = as.character("air"), cooked = 0) # Fill the pot fill <- function(df){ df %>% mutate(ingred...
library(DES) ### Name: newsim,schedevnt,getnextevnt,mainloop,newqueue,appendfcfs,delfcfs,cancelevnt,exparrivals ### Title: Discrete-event simulation routines. ### Aliases: newsim cancelevnt schedevnt getnextevnt mainloop newqueue ### appendfcfs delfcfs exparrivals ### ** Examples # from MachRep.R in examples/ #...
/data/genthat_extracted_code/DES/examples/newsim.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
618
r
library(DES) ### Name: newsim,schedevnt,getnextevnt,mainloop,newqueue,appendfcfs,delfcfs,cancelevnt,exparrivals ### Title: Discrete-event simulation routines. ### Aliases: newsim cancelevnt schedevnt getnextevnt mainloop newqueue ### appendfcfs delfcfs exparrivals ### ** Examples # from MachRep.R in examples/ #...
library(dplyr) # Read Training Data x_train <- read.table("./UCI HAR Dataset/train/X_train.txt") y_train <- read.table("./UCI HAR Dataset/train/Y_train.txt") subject_train <- read.table("./UCI HAR Dataset/train/subject_train.txt") # Read Test Data x_test <- read.table("./UCI HAR Dataset/test/X_test.txt") y_test <- re...
/run_analysis.R
no_license
smeah25/Getting-and-Cleaning-Data_Assignment
R
false
false
2,010
r
library(dplyr) # Read Training Data x_train <- read.table("./UCI HAR Dataset/train/X_train.txt") y_train <- read.table("./UCI HAR Dataset/train/Y_train.txt") subject_train <- read.table("./UCI HAR Dataset/train/subject_train.txt") # Read Test Data x_test <- read.table("./UCI HAR Dataset/test/X_test.txt") y_test <- re...
rm(list=ls()) library(nnrr) legeskjema <- read.table('P:/MinData/nnrr/DataDump_1b%3aRegistreringsskjema+poliklinikk_2017-09-27.csv', sep=';', header=T, fileEncoding = 'UTF-8-BOM', stringsAsFactors = F) pasientsvar_pre <- read.table('P:/MinData/nnrr/DataDump_1a%3aSpørreskjema+før+behandling_2017...
/doc/feilsok.R
no_license
Rapporteket/nnrr
R
false
false
4,769
r
rm(list=ls()) library(nnrr) legeskjema <- read.table('P:/MinData/nnrr/DataDump_1b%3aRegistreringsskjema+poliklinikk_2017-09-27.csv', sep=';', header=T, fileEncoding = 'UTF-8-BOM', stringsAsFactors = F) pasientsvar_pre <- read.table('P:/MinData/nnrr/DataDump_1a%3aSpørreskjema+før+behandling_2017...
library(shinydashboard) #setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) source("GenerateRGraphs.R") library(shiny) dashboardPage( dashboardHeader(title = "Contagion Analysis"), dashboardSidebar(sidebarMenu( menuItem( "Graph Analysis", tabName = "graph", icon = icon("signal") ...
/ui.R
no_license
Allisterh/NetworkAnalysis
R
false
false
3,669
r
library(shinydashboard) #setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) source("GenerateRGraphs.R") library(shiny) dashboardPage( dashboardHeader(title = "Contagion Analysis"), dashboardSidebar(sidebarMenu( menuItem( "Graph Analysis", tabName = "graph", icon = icon("signal") ...
library(eclust) library(magrittr) parametersDf <- expand.grid(rho = c(0.90), p = c(500), # SNR = c(0.2,1,2), SNR = 1, n = c(100), # this is the total train + test sample size # nA...
/data-raw/simulated-data-processing.R
no_license
sahirbhatnagar/eclust
R
false
false
7,384
r
library(eclust) library(magrittr) parametersDf <- expand.grid(rho = c(0.90), p = c(500), # SNR = c(0.2,1,2), SNR = 1, n = c(100), # this is the total train + test sample size # nA...
source("../../bin/elasticNetPred.R") library(pheatmap) require(parallel) source("../../bin/cBioPortalData.R") library(synapseClient) synapseLogin() tcga.list<<-c("allTcga",tcga.cancer.types) ccle.list<<-c("allCcle","BREAST","HAEMATOPOIETIC_AND_LYMPHOID_TISSUE","LUNG","SKIN","CENTRAL_NERVOUS_SYSTEM","LARGE_INTESTINE","O...
/analysis/2016-08-23/applyModelsToPnfCellsFromTCGA.R
no_license
sgosline/RASPathwaySig
R
false
false
5,881
r
source("../../bin/elasticNetPred.R") library(pheatmap) require(parallel) source("../../bin/cBioPortalData.R") library(synapseClient) synapseLogin() tcga.list<<-c("allTcga",tcga.cancer.types) ccle.list<<-c("allCcle","BREAST","HAEMATOPOIETIC_AND_LYMPHOID_TISSUE","LUNG","SKIN","CENTRAL_NERVOUS_SYSTEM","LARGE_INTESTINE","O...
library(tidyverse) library(gridExtra) library(stringr) pre <- "/Users/weilu/Research/server/project/freeEnergy_2xov/2xov_go_model_folding_temperature/simulation/" target <- str_c(pre, "data") data <- read_csv(target) ggplot(data)+ aes(x=step, qw) + geom_point(aes(color = run))+ geom_smooth()+ theme_bw() + the...
/R/qw_run.R
permissive
luwei0917/awsemmd_script
R
false
false
5,049
r
library(tidyverse) library(gridExtra) library(stringr) pre <- "/Users/weilu/Research/server/project/freeEnergy_2xov/2xov_go_model_folding_temperature/simulation/" target <- str_c(pre, "data") data <- read_csv(target) ggplot(data)+ aes(x=step, qw) + geom_point(aes(color = run))+ geom_smooth()+ theme_bw() + the...
#' Simulate a mutation dataset with survival annotation #' #' To simulate a dataset we need a real pathway. #' #' @param pathway a Pathway #' @param impacted_genes the genes of a module with the aberrant signal chain #' @param patients_fractions the fraction of patients with n mutated genes #' @param ann survival annot...
/R/mutation-cnv_dataset_generation.R
no_license
cavei/houseOfClipUtility
R
false
false
5,317
r
#' Simulate a mutation dataset with survival annotation #' #' To simulate a dataset we need a real pathway. #' #' @param pathway a Pathway #' @param impacted_genes the genes of a module with the aberrant signal chain #' @param patients_fractions the fraction of patients with n mutated genes #' @param ann survival annot...
testlist <- list(A = structure(c(2.17107980817984e+205, 9.53818252179844e+295 ), .Dim = 1:2), B = structure(c(2.19477802977892e+294, 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, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(multivariance:::match_rows,testlist) str(resu...
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613125220-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
323
r
testlist <- list(A = structure(c(2.17107980817984e+205, 9.53818252179844e+295 ), .Dim = 1:2), B = structure(c(2.19477802977892e+294, 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, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(multivariance:::match_rows,testlist) str(resu...
require(shinyBS) # HTML <- function(s1, s2=NULL) # { # # browser() # out1 <- as.character( s1 ) # out2 <- s2 # out <- shiny::HTML(out1, out2) # return(out) # } getquarters <- function() { # browser() curdir <- paste0( DATADIR, 'quarters') flist <- list.files( curdir, all.files = TRUE, ...
/sharedscripts/uihelpers.R
no_license
jonathanglevine/openfdashinyapps
R
false
false
9,542
r
require(shinyBS) # HTML <- function(s1, s2=NULL) # { # # browser() # out1 <- as.character( s1 ) # out2 <- s2 # out <- shiny::HTML(out1, out2) # return(out) # } getquarters <- function() { # browser() curdir <- paste0( DATADIR, 'quarters') flist <- list.files( curdir, all.files = TRUE, ...
library(tidyverse) n <- 100000 #df <- data.frame(1:n, runif(n, 0, 6)) df <- data.frame(1:n, rnorm(n, 0, 1)) names(df) <- c('x', 'y') ggplot(data=df, aes(x=x,y=y)) + geom_point() hist(df$y) mean(df$y) # Compactly Display the Structure of an Arbitrary R Object str(df) # Write an Object to a File or Recreate it dput(d...
/stats.R
no_license
lmartinho/r-playground
R
false
false
437
r
library(tidyverse) n <- 100000 #df <- data.frame(1:n, runif(n, 0, 6)) df <- data.frame(1:n, rnorm(n, 0, 1)) names(df) <- c('x', 'y') ggplot(data=df, aes(x=x,y=y)) + geom_point() hist(df$y) mean(df$y) # Compactly Display the Structure of an Arbitrary R Object str(df) # Write an Object to a File or Recreate it dput(d...
#' Get database connection #' #' #' @return #' A DBI dataconnect object #' @export #' @import here #' @import RPostgres #' #' @examples #' conn <- rdb_connect() #' rdb_connect <- function() { # configdir <- Sys.getenv("RDCONFIG") cnfg <- yaml::yaml.load_file(here("rconfig.yml")) conSuper <- dbConnect( RP...
/R/rbd_connect.R
permissive
joeheywood/resdata
R
false
false
603
r
#' Get database connection #' #' #' @return #' A DBI dataconnect object #' @export #' @import here #' @import RPostgres #' #' @examples #' conn <- rdb_connect() #' rdb_connect <- function() { # configdir <- Sys.getenv("RDCONFIG") cnfg <- yaml::yaml.load_file(here("rconfig.yml")) conSuper <- dbConnect( RP...
testlist <- list(iK = 200411660L) result <- do.call(eDMA:::PowerSet,testlist) str(result)
/eDMA/inst/testfiles/PowerSet/AFL_PowerSet/PowerSet_valgrind_files/1609869723-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
89
r
testlist <- list(iK = 200411660L) result <- do.call(eDMA:::PowerSet,testlist) str(result)
RadarIDM <- function(Eixo) { dados <- IDM %>% mutate(Variável = fct_recode(Variável, "Equilíbrio Orçamentário" = "Equilíbrio Orçamentário do Município", "Saúde Bucal" = "Cobertura ESF Saúde Bucal", "Morte causas...
/Functions/RadarIDM.R
no_license
supervedovatto/AnexoA
R
false
false
3,386
r
RadarIDM <- function(Eixo) { dados <- IDM %>% mutate(Variável = fct_recode(Variável, "Equilíbrio Orçamentário" = "Equilíbrio Orçamentário do Município", "Saúde Bucal" = "Cobertura ESF Saúde Bucal", "Morte causas...
plot_end_activities <- function(x, ...) { mapping <- attr(x, "mapping") level <- attr(x, "level") absolute <- NULL if(level == "log") { stop("Plot not available for this level of analysis") } else if(level == "case") { stop("Plot not available for this level of analysis") } else if(level =...
/R/plot.end_activity.R
no_license
cran/edeaR
R
false
false
1,693
r
plot_end_activities <- function(x, ...) { mapping <- attr(x, "mapping") level <- attr(x, "level") absolute <- NULL if(level == "log") { stop("Plot not available for this level of analysis") } else if(level == "case") { stop("Plot not available for this level of analysis") } else if(level =...
testlist <- list(Rs = numeric(0), atmp = c(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, 0, 0, 0, 0, 0), relh = -1.72131968218895e+83, temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809718668e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.800335188...
/meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615844947-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
736
r
testlist <- list(Rs = numeric(0), atmp = c(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, 0, 0, 0, 0, 0), relh = -1.72131968218895e+83, temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809718668e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.800335188...
source("data-raw/generation-helpers.R") set.seed(42L) # generate indices for subsignals ind_tbl <- gen_sim_ind(nrow = 100L, ncol = 42L, max_subsig = 3L) # generate signals - needed mainly for testing purposes # (e.g. for mbte_extract_subsignals()) sig_tbl <- gen_sim_sig_default(ind_tbl) # save internal s...
/data-raw/gen_sample_datasets.R
no_license
mkerschbaumer/mbte
R
false
false
1,028
r
source("data-raw/generation-helpers.R") set.seed(42L) # generate indices for subsignals ind_tbl <- gen_sim_ind(nrow = 100L, ncol = 42L, max_subsig = 3L) # generate signals - needed mainly for testing purposes # (e.g. for mbte_extract_subsignals()) sig_tbl <- gen_sim_sig_default(ind_tbl) # save internal s...
# TODO: move this to data_raw & use usethis::use_data #' tidy dataframe of the USArrests data #' #' @import dplyr #' @export tidyUSArrests = function() { USArrests %>% mutate(sample = rownames(USArrests)) %>% tidyr::pivot_longer(-sample, names_to = "feature", values_to = "value") } #' tidy dataframe of ...
/R/testData.R
permissive
terminological/tidy-info-stats
R
false
false
3,838
r
# TODO: move this to data_raw & use usethis::use_data #' tidy dataframe of the USArrests data #' #' @import dplyr #' @export tidyUSArrests = function() { USArrests %>% mutate(sample = rownames(USArrests)) %>% tidyr::pivot_longer(-sample, names_to = "feature", values_to = "value") } #' tidy dataframe of ...
# Description: #' Apply Wilcoxon rank-sum test for the differential abundance analysis of microbiome count data # Parameters: #' @param count.matrix A sample-by-taxon original count matrix. All the entry should be nonnegative counts #' @param phenotype The phenotype indicator vector for all samples in \code{count.mat...
/GymFunctions/WilcoxonRankSum.R
no_license
shuangj00/MicrobiomeGym
R
false
false
1,180
r
# Description: #' Apply Wilcoxon rank-sum test for the differential abundance analysis of microbiome count data # Parameters: #' @param count.matrix A sample-by-taxon original count matrix. All the entry should be nonnegative counts #' @param phenotype The phenotype indicator vector for all samples in \code{count.mat...
library(tidyverse) library(httr) library(xml2) library(rvest) source("src.R") path <- "chat/messages.html" df_messages <- fn_scraper_telegram(path)
/script.R
no_license
rodrigoqaz/telegram_scraper
R
false
false
150
r
library(tidyverse) library(httr) library(xml2) library(rvest) source("src.R") path <- "chat/messages.html" df_messages <- fn_scraper_telegram(path)
if (!require("TFX")) { install.packages("TFX") library(TFX) } getwd() setwd("./data/") data = data.frame(QueryTrueFX()) for(i in c(1:((60*24)*30))) { Sys.sleep(60) data = rbind(data, data.frame(QueryTrueFX())) data = subset(data, data$Symbol == "EUR/USD") write.csv(data, 'data.csv') }
/tfx.query.r
permissive
MindMimicLabs/data-forex
R
false
false
306
r
if (!require("TFX")) { install.packages("TFX") library(TFX) } getwd() setwd("./data/") data = data.frame(QueryTrueFX()) for(i in c(1:((60*24)*30))) { Sys.sleep(60) data = rbind(data, data.frame(QueryTrueFX())) data = subset(data, data$Symbol == "EUR/USD") write.csv(data, 'data.csv') }
cutoff = function(x, L){ return(cor(x[1:(length(x) - L)], x[(L+1):length(x)])) }
/Batch Par. Codes/cutoff.R
no_license
aj-williamz/Atlas-Database-Project
R
false
false
84
r
cutoff = function(x, L){ return(cor(x[1:(length(x) - L)], x[(L+1):length(x)])) }
suppressPackageStartupMessages(library(Hmisc)) suppressPackageStartupMessages(library(lattice)) suppressPackageStartupMessages(require(grid)) library(Hmisc)#,warn.conflicts = FALSE,verbose = FALSE, quietly=TRUE) library(lattice) calculateIC <- function(metrics) { ic <- numeric() if (length(metrics) < 10) { ...
/r_scripts/utils.R
no_license
edigley/communal-cloud
R
false
false
5,176
r
suppressPackageStartupMessages(library(Hmisc)) suppressPackageStartupMessages(library(lattice)) suppressPackageStartupMessages(require(grid)) library(Hmisc)#,warn.conflicts = FALSE,verbose = FALSE, quietly=TRUE) library(lattice) calculateIC <- function(metrics) { ic <- numeric() if (length(metrics) < 10) { ...
## this function fills holes (0s) less than 7-hours within each storms The data provided is the # binary rain occurance data. The resulting data from this function represent the storm occurance # data; this includes occurences of rain-dry-rain. The temporal length of the break (dry period), # is defined within this ...
/functions/StormChunk_7hr.R
no_license
tuleypa/Storm-Identification
R
false
false
2,591
r
## this function fills holes (0s) less than 7-hours within each storms The data provided is the # binary rain occurance data. The resulting data from this function represent the storm occurance # data; this includes occurences of rain-dry-rain. The temporal length of the break (dry period), # is defined within this ...
# convert PDFs to editable data using ABBY require(abbyyR) setapp(c("Tunisia Firms", "m+w3xiZFDw0D/4BMQSORs0E6")) getAppInfo() processImage(file_path = 'C:\\Users\\bobku\\Box Sync\\Dissertation\\Quantitative\\archieve classement\\Classement 2008.pdf', imageSource = 'scanner',description = 'Classement20...
/pdf_convert.R
no_license
saudiwin/tunisia_firms
R
false
false
1,148
r
# convert PDFs to editable data using ABBY require(abbyyR) setapp(c("Tunisia Firms", "m+w3xiZFDw0D/4BMQSORs0E6")) getAppInfo() processImage(file_path = 'C:\\Users\\bobku\\Box Sync\\Dissertation\\Quantitative\\archieve classement\\Classement 2008.pdf', imageSource = 'scanner',description = 'Classement20...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/02_hydroMet_compact.R \docType{class} \name{hydroMet_compact-class} \alias{hydroMet_compact-class} \alias{hydroMet_compact} \title{\code{hydroMet} subclass for compact data} \value{ A hydroMet_compact class object. } \description{ This subcla...
/man/hydroMet_compact-class.Rd
no_license
cran/hydroToolkit
R
false
true
895
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/02_hydroMet_compact.R \docType{class} \name{hydroMet_compact-class} \alias{hydroMet_compact-class} \alias{hydroMet_compact} \title{\code{hydroMet} subclass for compact data} \value{ A hydroMet_compact class object. } \description{ This subcla...
/Ejemplo01.R
no_license
azchr4ds/Clase4R4DS
R
false
false
5,245
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/main_indicators.R \name{get_informal} \alias{get_informal} \title{Calcula el número de trabajadores informaels} \usage{ get_informal(data) } \arguments{ \item{data}{\code{dataframe} de la ENE} } \value{ número de trabajadores informales } \de...
/man/get_informal.Rd
no_license
Klauslehmann/ene
R
false
true
381
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/main_indicators.R \name{get_informal} \alias{get_informal} \title{Calcula el número de trabajadores informaels} \usage{ get_informal(data) } \arguments{ \item{data}{\code{dataframe} de la ENE} } \value{ número de trabajadores informales } \de...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/make_ma_df.R \name{make_ma_df} \alias{make_ma_df} \title{Preprocessing for meta-analysis} \usage{ make_ma_df(outcomes_df = outcomes_df, rob = rob, study_df = study_df, ...) } \arguments{ \item{outcomes_df}{Filtered outcome_df with selection o...
/man/make_ma_df.Rd
permissive
nkamboj06/cnap-review
R
false
true
486
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/make_ma_df.R \name{make_ma_df} \alias{make_ma_df} \title{Preprocessing for meta-analysis} \usage{ make_ma_df(outcomes_df = outcomes_df, rob = rob, study_df = study_df, ...) } \arguments{ \item{outcomes_df}{Filtered outcome_df with selection o...
/군집화, 회귀분석 코드/군집화와 분류 코드/12-4.R
no_license
frics/R_project
R
false
false
927
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datasets.R \docType{data} \name{palettes} \alias{palettes} \title{Palette repair data} \format{A data frame with 20 observations on the following 3 variables. \itemize{ \item{palettes}{ number of palettes repaired} \item{employee}{ a factor w...
/man/palettes.Rd
no_license
cran/fastR
R
false
true
1,304
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datasets.R \docType{data} \name{palettes} \alias{palettes} \title{Palette repair data} \format{A data frame with 20 observations on the following 3 variables. \itemize{ \item{palettes}{ number of palettes repaired} \item{employee}{ a factor w...
source("/data2/3to5/I35/scripts/analysisfunctions.R") library(ncdf4) library(maps) library(mapdata) library(maptools) library(fields) library(sp) library(raster) library(rasterVis) library(ggplot2) library(modi) #weighted.var <- function(x, w, na.rm = FALSE) { # if (na.rm) { # w <- w[i <- !is.na(x)] # x <- x[i]...
/Sanderson/Sanderson_BMA_posteriorcalcs_domainMV_tmaxfull.R
no_license
amwootte/analysisscripts
R
false
false
15,736
r
source("/data2/3to5/I35/scripts/analysisfunctions.R") library(ncdf4) library(maps) library(mapdata) library(maptools) library(fields) library(sp) library(raster) library(rasterVis) library(ggplot2) library(modi) #weighted.var <- function(x, w, na.rm = FALSE) { # if (na.rm) { # w <- w[i <- !is.na(x)] # x <- x[i]...
#' Calculates the repayment for a loan #' #' Based on period interest rate, number of periods, and loan amount, this function calculates #' the repayment of the loan such that it would be paid off fully at the end of the loan. #' This function is designed to be equivalent to the Excel function PMT. #' It calcula...
/optiRum/R/PMT.R
no_license
ingted/R-Examples
R
false
false
1,150
r
#' Calculates the repayment for a loan #' #' Based on period interest rate, number of periods, and loan amount, this function calculates #' the repayment of the loan such that it would be paid off fully at the end of the loan. #' This function is designed to be equivalent to the Excel function PMT. #' It calcula...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/funs-ggplot.R \name{ebl} \alias{ebl} \title{ebl} \usage{ ebl() } \description{ See \code{ggplot2::\link[ggplot2:element_blank]{element_blank}} for details. } \keyword{internal}
/man/ebl.Rd
permissive
mkearney/lop
R
false
true
255
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/funs-ggplot.R \name{ebl} \alias{ebl} \title{ebl} \usage{ ebl() } \description{ See \code{ggplot2::\link[ggplot2:element_blank]{element_blank}} for details. } \keyword{internal}
## taxonomic disparity for big tree library(ape) if(!exists('summary.by.elements')) { source('https://raw.githubusercontent.com/andrew-hipp/morton/master/R/label.elements.R') source('https://raw.githubusercontent.com/andrew-hipp/morton/master/R/summary.by.elements.R') source('https://raw.githubusercontent.co...
/ANALYSES/2019-06_globalOaks-gitUpdate/SCRIPTS/00-8.taxonomicDisparityIndex.R
no_license
kieranalthaus/global-oaks-2019
R
false
false
1,919
r
## taxonomic disparity for big tree library(ape) if(!exists('summary.by.elements')) { source('https://raw.githubusercontent.com/andrew-hipp/morton/master/R/label.elements.R') source('https://raw.githubusercontent.com/andrew-hipp/morton/master/R/summary.by.elements.R') source('https://raw.githubusercontent.co...
print("hello") y=5 z=7 print(y+z)
/test.R
no_license
abdoraven/Temporary_add_to_version_control
R
false
false
34
r
print("hello") y=5 z=7 print(y+z)
complexity =c(4,14,26) library(splines) Q1_fun_01 <- function(x) { y = 0.3*cos(3*pi*x) - 0.4* cos(4*pi*x) - 10/(x**2 + 1) return(y) } Q1_fun_02<- function(x){ y = 0.4*log(x**4+log(x-0.7)+exp(3*x)) return(y) } generate_y <-function(x, func,sig){ if(func == 1){ y = Q1_fun_01(x) + rnorm(1, 0, sig) ...
/Assignment_1/question1.R
no_license
rajanskumarsoni/Concepts-in-Statistical-Learning-Theory
R
false
false
5,768
r
complexity =c(4,14,26) library(splines) Q1_fun_01 <- function(x) { y = 0.3*cos(3*pi*x) - 0.4* cos(4*pi*x) - 10/(x**2 + 1) return(y) } Q1_fun_02<- function(x){ y = 0.4*log(x**4+log(x-0.7)+exp(3*x)) return(y) } generate_y <-function(x, func,sig){ if(func == 1){ y = Q1_fun_01(x) + rnorm(1, 0, sig) ...
#' @title Information Matrix-Based Information Criterion #' #' @description Calculates Information Matrix-Based Information Criterion (IBIC) for "lm" and "glm" objects. #' #' @param model a "lm" or "glm" object #' #' @details #' IBIC (Bollen et al., 2012) is calculated as #' #' \deqn{-2LL(theta) + klog(n/(2pi)...
/R/IBIC.R
no_license
cran/ICglm
R
false
false
1,420
r
#' @title Information Matrix-Based Information Criterion #' #' @description Calculates Information Matrix-Based Information Criterion (IBIC) for "lm" and "glm" objects. #' #' @param model a "lm" or "glm" object #' #' @details #' IBIC (Bollen et al., 2012) is calculated as #' #' \deqn{-2LL(theta) + klog(n/(2pi)...
# # Copyright 2007-2018 The OpenMx Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
/SilveR/R-3.5.1/library/OpenMx/models/passing/RAM-FIML-defvars.R
permissive
kevinmiles/SilveR
R
false
false
1,623
r
# # Copyright 2007-2018 The OpenMx Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
#' Plot faceted violin plots for scenarios, showing performance metrics #' #' @param ps A plot setup object as output by [setup_mse_plot_objects()] #' @param quants Quantile values as limits to remove tail data from plot #' #' @return A [ggplot2::ggplot()] object #' @export #' @importFrom forcats fct_relevel #' @import...
/R/plot_violins.R
no_license
aaronmberger-nwfsc/pacifichakemse-1
R
false
false
2,043
r
#' Plot faceted violin plots for scenarios, showing performance metrics #' #' @param ps A plot setup object as output by [setup_mse_plot_objects()] #' @param quants Quantile values as limits to remove tail data from plot #' #' @return A [ggplot2::ggplot()] object #' @export #' @importFrom forcats fct_relevel #' @import...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_summary.R \name{plot_complete_pairs} \alias{plot_complete_pairs} \title{Plot a heat map of frequency of "complete" (both non-NA) pairs of variables} \usage{ plot_complete_pairs(dat, subject = FALSE, width = 700, height = 700, thresh = ...
/man/plot_complete_pairs.Rd
permissive
hafen/hbgd
R
false
true
1,147
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_summary.R \name{plot_complete_pairs} \alias{plot_complete_pairs} \title{Plot a heat map of frequency of "complete" (both non-NA) pairs of variables} \usage{ plot_complete_pairs(dat, subject = FALSE, width = 700, height = 700, thresh = ...
# R code to replicate Figures S1 and S2 in Hsiang, Burke, and Miguel 2013 # First replace the following directory with the directory where you unzipped setwd("/Documents/Dropbox/Marshall-Sol/drafts/Science_review_v4/replication/") # get median effect size data=read.csv("data/standardized_effects.csv") eff=as.numeri...
/code/Make_Fig_S1_S2.R
no_license
emilylaiken/climatereplicationcode
R
false
false
3,554
r
# R code to replicate Figures S1 and S2 in Hsiang, Burke, and Miguel 2013 # First replace the following directory with the directory where you unzipped setwd("/Documents/Dropbox/Marshall-Sol/drafts/Science_review_v4/replication/") # get median effect size data=read.csv("data/standardized_effects.csv") eff=as.numeri...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/no2.R \docType{data} \name{no2} \alias{no2} \title{Tibble con i dati di no2 per 19 stazioni della regione UMBRIA} \format{ Un tibble con 8 colonne e 13889 osservazioni } \usage{ no2 } \description{ Tibble con i dati di no2 per 19 stazioni del...
/man/no2.Rd
permissive
progettopulvirus/umbria
R
false
true
359
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/no2.R \docType{data} \name{no2} \alias{no2} \title{Tibble con i dati di no2 per 19 stazioni della regione UMBRIA} \format{ Un tibble con 8 colonne e 13889 osservazioni } \usage{ no2 } \description{ Tibble con i dati di no2 per 19 stazioni del...
# Install necessary packages #cleanup before start rm(list=ls(all=T)) packages <- list('data.table', 'MASS') #Add all your packages here. Don't change the rest of the file, or file name #Example: packages <- list('data.table','rpart','rgdal') InstallAll <- function(packageName){ if(!(packageName %in% in...
/Central Limit Theorem+Regression/R/installPackages.R
no_license
iankurgarg/Foundations-of-Data-Science
R
false
false
431
r
# Install necessary packages #cleanup before start rm(list=ls(all=T)) packages <- list('data.table', 'MASS') #Add all your packages here. Don't change the rest of the file, or file name #Example: packages <- list('data.table','rpart','rgdal') InstallAll <- function(packageName){ if(!(packageName %in% in...
\name{predict.sprinter} \alias{predict.sprinter} \title{Predict method for objects of class \code{sprinter}} \description{ Evaluates the linear predictor from a Cox proportional Hazards model fitted by \code{\link{sprinter}}. } \usage{ \method{predict}{sprinter}(object, newdata=NULL,\ldots) } \arguments{ \i...
/man/predict.sprinter.Rd
no_license
cran/sprinter
R
false
false
2,108
rd
\name{predict.sprinter} \alias{predict.sprinter} \title{Predict method for objects of class \code{sprinter}} \description{ Evaluates the linear predictor from a Cox proportional Hazards model fitted by \code{\link{sprinter}}. } \usage{ \method{predict}{sprinter}(object, newdata=NULL,\ldots) } \arguments{ \i...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/HobbyShop.R \name{HobbyShop} \alias{HobbyShop} \title{HobbyShop} \usage{ HobbyShop(id = NULL, priceRange = NULL, paymentAccepted = NULL, openingHours = NULL, currenciesAccepted = NULL, branchOf = NULL, telephone = NULL, specialOpeningHour...
/man/HobbyShop.Rd
no_license
cboettig/schemar
R
false
true
9,739
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/HobbyShop.R \name{HobbyShop} \alias{HobbyShop} \title{HobbyShop} \usage{ HobbyShop(id = NULL, priceRange = NULL, paymentAccepted = NULL, openingHours = NULL, currenciesAccepted = NULL, branchOf = NULL, telephone = NULL, specialOpeningHour...
########## #UI ########## output$selectorTaxlevelOrd <- renderUI({ radioButtons("taxlevel_ord", "Choose taxonomic level:", as.list(colnames(taxonomy()))) }) output$selectorTaxgroupsOrd <- renderUI({ checkboxGroupInput("taxgroups_ord", "Choose taxonomic group:", taxgroups_ord()$taxvec) }) output$selectorColor <- ...
/panels/panel_server_ordinationCompareTaxgroups.R
no_license
EEgge/ShinyProtists
R
false
false
3,659
r
########## #UI ########## output$selectorTaxlevelOrd <- renderUI({ radioButtons("taxlevel_ord", "Choose taxonomic level:", as.list(colnames(taxonomy()))) }) output$selectorTaxgroupsOrd <- renderUI({ checkboxGroupInput("taxgroups_ord", "Choose taxonomic group:", taxgroups_ord()$taxvec) }) output$selectorColor <- ...
test_that("format.timespan properly indicates entirely abscent timespans", { expect_silent(tmspn <- as.timespan("")) expect_silent(fmt <- crayon::strip_style(format(tmspn))) expect_equal(fmt, "NA") })
/tests/testthat/test_timespan_format.R
permissive
dgkf/parttime
R
false
false
207
r
test_that("format.timespan properly indicates entirely abscent timespans", { expect_silent(tmspn <- as.timespan("")) expect_silent(fmt <- crayon::strip_style(format(tmspn))) expect_equal(fmt, "NA") })
library("MCMCpack") design <- read.csv("D:/univ/2014-2015/thesis/KERMIT/results february/design_results_febr_counts.csv") counts <- design$LMG7866 evenness <- design$evenness cellcount <- log10(design$cellcount) treatment posterior <- MCMCpoisson(counts ~ evenness + cellcount, b0 = -30, thin = 5) plot(posterior) m1 ...
/Labwork/Statistical Analysis/results february/statistics/poissonMCMC.R
no_license
watsang/masterthesis-2014-2015
R
false
false
4,006
r
library("MCMCpack") design <- read.csv("D:/univ/2014-2015/thesis/KERMIT/results february/design_results_febr_counts.csv") counts <- design$LMG7866 evenness <- design$evenness cellcount <- log10(design$cellcount) treatment posterior <- MCMCpoisson(counts ~ evenness + cellcount, b0 = -30, thin = 5) plot(posterior) m1 ...
#' Length of Left Middle Finger and Height for an Unequal-Probability Sample of Size 200 #' #' Length of left middle finger and height for an unequal-probability sample #' of criminals of size 200 from the anthrop dataset. The probability of selection, #' psi[i], was proportional to 24 for y < 65, 12 for y = 65, 2 f...
/SDaA/R/anthuneq.R
no_license
ingted/R-Examples
R
false
false
844
r
#' Length of Left Middle Finger and Height for an Unequal-Probability Sample of Size 200 #' #' Length of left middle finger and height for an unequal-probability sample #' of criminals of size 200 from the anthrop dataset. The probability of selection, #' psi[i], was proportional to 24 for y < 65, 12 for y = 65, 2 f...
## R Programming Assignment 2 ## ## The makeCacheMatrix function creates a special "matrix" object that ## can cache its inverse. makeCacheMatrix <- function(x = matrix()) { ## makeVector <- function(x = numeric()) m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() ...
/cachematrix.R
no_license
tcpsoft/ProgrammingAssignment2
R
false
false
1,035
r
## R Programming Assignment 2 ## ## The makeCacheMatrix function creates a special "matrix" object that ## can cache its inverse. makeCacheMatrix <- function(x = matrix()) { ## makeVector <- function(x = numeric()) m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() ...
#Top Ten Words in an Episode of Star Trek: The Next Generation, Curated Stopwords Removed #Call libraries used in the script #Set the working directory setwd("~/Text-Analysis/") options(mc.cores = 1) #Call libraries used in the script library(tm) #Creat a corpus -- this creates a corpus of the entire STNG series #corp...
/RScripts/topTenPlainText.R
no_license
fiore969/Text-Analysis
R
false
false
1,796
r
#Top Ten Words in an Episode of Star Trek: The Next Generation, Curated Stopwords Removed #Call libraries used in the script #Set the working directory setwd("~/Text-Analysis/") options(mc.cores = 1) #Call libraries used in the script library(tm) #Creat a corpus -- this creates a corpus of the entire STNG series #corp...
# Copyright 2019 Robert Carnell # Internal function to take means across time # # dat = a data.frame with columns pre_post, trt, and val at least # pre_post_name = The value of pre_post to use to subset the data # trt_name = The value of trt to use to subset the data # # return the mean vector .mean_across_time <- fu...
/R/test_level_shift.R
permissive
bertcarnell/impact
R
false
false
8,921
r
# Copyright 2019 Robert Carnell # Internal function to take means across time # # dat = a data.frame with columns pre_post, trt, and val at least # pre_post_name = The value of pre_post to use to subset the data # trt_name = The value of trt to use to subset the data # # return the mean vector .mean_across_time <- fu...