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
##Trying to put an R script up onto github from Rstudio
/Rscript_test.R
no_license
PhDMattyB/CSEE2018Test
R
false
false
55
r
##Trying to put an R script up onto github from Rstudio
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/elasticache_service.R \name{elasticache} \alias{elasticache} \title{Amazon ElastiCache} \usage{ elasticache( config = list(), credentials = list(), endpoint = NULL, region = NULL ) } \arguments{ \item{config}{Optional configuration of...
/cran/paws.database/man/elasticache.Rd
permissive
paws-r/paws
R
false
true
13,389
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/elasticache_service.R \name{elasticache} \alias{elasticache} \title{Amazon ElastiCache} \usage{ elasticache( config = list(), credentials = list(), endpoint = NULL, region = NULL ) } \arguments{ \item{config}{Optional configuration of...
Install_Multiples_Packages <- function(packages) { pack <- packages[!(packages %in% installed.packages()[,'Package'])]; if (length(pack)) { install.packages(pack, repos = 'https://cran.rstudio.com/') } for (package_i in packages) { suppressPackageStartupMessages(library(package_i, chara...
/DESeq2.R
no_license
hanielcedraz/DiffExpressGenes
R
false
false
1,810
r
Install_Multiples_Packages <- function(packages) { pack <- packages[!(packages %in% installed.packages()[,'Package'])]; if (length(pack)) { install.packages(pack, repos = 'https://cran.rstudio.com/') } for (package_i in packages) { suppressPackageStartupMessages(library(package_i, chara...
tar_target(toy_scores_by_horizon_plot, { toy_scores |> filter(time <= 4) |> plot_toy_scores_by_horizon() })
/_targets_r/targets/toy_scores_by_horizon_plot.R
no_license
laasousa/log-or-not
R
false
false
118
r
tar_target(toy_scores_by_horizon_plot, { toy_scores |> filter(time <= 4) |> plot_toy_scores_by_horizon() })
#!/share/apps/R-3.2.2_gcc/bin/Rscript #library(chron) library(data.table) data_dir = "/data/hydro/users/Hossein/codling_moth_new/local/processed/section_46_Pest/" output_dir = "/data/hydro/users/Hossein/codling_moth_new/local/processed/section_46_Pest/" name_pref = "combined_CMPOP_4_pest_rcp" args = commandArgs(trail...
/codling_moth/code/drivers/pest_window_code/since_day_1/takes_long/d_ext_quan_LA_all.R
permissive
HNoorazar/Ag
R
false
false
3,506
r
#!/share/apps/R-3.2.2_gcc/bin/Rscript #library(chron) library(data.table) data_dir = "/data/hydro/users/Hossein/codling_moth_new/local/processed/section_46_Pest/" output_dir = "/data/hydro/users/Hossein/codling_moth_new/local/processed/section_46_Pest/" name_pref = "combined_CMPOP_4_pest_rcp" args = commandArgs(trail...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_document.R \name{stdpop101} \alias{stdpop101} \title{World standard population by 1 year age groups from 1 to 101. Sums to 100 000.} \format{ data.table with columns \itemize{ \item \code{world_std} weight that sums to 100000 (n...
/man/stdpop101.Rd
no_license
cran/popEpi
R
false
true
958
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_document.R \name{stdpop101} \alias{stdpop101} \title{World standard population by 1 year age groups from 1 to 101. Sums to 100 000.} \format{ data.table with columns \itemize{ \item \code{world_std} weight that sums to 100000 (n...
#' Bayes factors for informative hypotheses #' #' \code{bain} is an acronym for "Bayesian informative hypotheses evaluation". #' It uses the Bayes factor to evaluate hypotheses specified using equality and #' inequality constraints among (linear combinations of) parameters in a wide #' range of statistical models....
/R/bain_methods.R
no_license
cran/bain
R
false
false
30,935
r
#' Bayes factors for informative hypotheses #' #' \code{bain} is an acronym for "Bayesian informative hypotheses evaluation". #' It uses the Bayes factor to evaluate hypotheses specified using equality and #' inequality constraints among (linear combinations of) parameters in a wide #' range of statistical models....
predict.MVA.cmv <- predict.MVA.cv <- function(object,newdata,conf.level=0.95,type.DA=c("max","all"), crit.DA=c("plug-in","predictive","debiased"),...) { newdata <- as.matrix(as.data.frame(newdata)) if (ncol(newdata)==1) {newdata <- t(newdata)} if (object$type=="quant") { pred <- do.call("cbind",lapply(...
/R/predict.MVA.cv.R
no_license
cran/RVAideMemoire
R
false
false
3,043
r
predict.MVA.cmv <- predict.MVA.cv <- function(object,newdata,conf.level=0.95,type.DA=c("max","all"), crit.DA=c("plug-in","predictive","debiased"),...) { newdata <- as.matrix(as.data.frame(newdata)) if (ncol(newdata)==1) {newdata <- t(newdata)} if (object$type=="quant") { pred <- do.call("cbind",lapply(...
library(dplyr) word <- c("dream", "dream", "dream") chapter <- c(1, 2, 3) paragraph <- c(2, 8, 7) sentence <- c(3, 1, 2) myTable <- tibble(word = word, chapter = chapter, paragraph=paragraph, sentence = sentence) smallTable <- myTable %>% select(chapter, word...
/Session_2/05_select_example.R
no_license
jmh5ad/R_for_Digital_Humanities
R
false
false
339
r
library(dplyr) word <- c("dream", "dream", "dream") chapter <- c(1, 2, 3) paragraph <- c(2, 8, 7) sentence <- c(3, 1, 2) myTable <- tibble(word = word, chapter = chapter, paragraph=paragraph, sentence = sentence) smallTable <- myTable %>% select(chapter, word...
\name{n.risk} \alias{n.risk} \title{ Number of records in a risk set } \description{ Returns the number of records in the risk set at each time represented in survival records. } \usage{ n.risk(entry, exit, interval=1,...) } \arguments{ \item{entry}{ A data vector of class \code{"numeric"} or \co...
/man/n.risk.rd
no_license
alfcrisci/wild1
R
false
false
1,401
rd
\name{n.risk} \alias{n.risk} \title{ Number of records in a risk set } \description{ Returns the number of records in the risk set at each time represented in survival records. } \usage{ n.risk(entry, exit, interval=1,...) } \arguments{ \item{entry}{ A data vector of class \code{"numeric"} or \co...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/swf_operations.R \name{swf_record_activity_task_heartbeat} \alias{swf_record_activity_task_heartbeat} \title{Used by activity workers to report to the service that the ActivityTask represented by the specified taskToken is still making progre...
/cran/paws.application.integration/man/swf_record_activity_task_heartbeat.Rd
permissive
peoplecure/paws
R
false
true
3,415
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/swf_operations.R \name{swf_record_activity_task_heartbeat} \alias{swf_record_activity_task_heartbeat} \title{Used by activity workers to report to the service that the ActivityTask represented by the specified taskToken is still making progre...
# Test # generate matrix test <- matrix(data = c(4,2,7,6), nrow = 2, ncol = 2) # generate the makeCacheMatrix object with this matrix testCached <- makeCacheMatrix(test) # from now on calculate or retrieve calculated # inversion using the cacheSolve function testInv <- cacheSolve(testCached) testInv <- cacheSolve(test...
/test_2.R
no_license
Yana-leibniz/ProgrammingAssignment2
R
false
false
429
r
# Test # generate matrix test <- matrix(data = c(4,2,7,6), nrow = 2, ncol = 2) # generate the makeCacheMatrix object with this matrix testCached <- makeCacheMatrix(test) # from now on calculate or retrieve calculated # inversion using the cacheSolve function testInv <- cacheSolve(testCached) testInv <- cacheSolve(test...
###load libraries #Sys.setenv(R_LIBS_USER="/global/scratch/users/odedritov/R") #library(dplyr) library(lme4) library(nloptr) library(kyotil, lib.loc="/global/scratch/users/odedritov/R") library(doSNOW, lib.loc="/global/scratch/users/odedritov/R") ###connect to nodes ncoresPerNode <-as.numeric(Sys.getenv("SLURM_CPUS_...
/simulation_code_savio.R
no_license
odedritov/ia_ma_sim
R
false
false
8,462
r
###load libraries #Sys.setenv(R_LIBS_USER="/global/scratch/users/odedritov/R") #library(dplyr) library(lme4) library(nloptr) library(kyotil, lib.loc="/global/scratch/users/odedritov/R") library(doSNOW, lib.loc="/global/scratch/users/odedritov/R") ###connect to nodes ncoresPerNode <-as.numeric(Sys.getenv("SLURM_CPUS_...
# for testing customized Class for partial least square as one testbed for predictiveModeling setClass( Class = 'MyPLSModel', contains="PredictiveModel", representation = representation( model='list') ) # method is already implemented and utilized(wrapped up) in caret # This is for training setMethod( f = ...
/S4/MyPLSModel.R
no_license
insockjang/DrugResponse
R
false
false
1,363
r
# for testing customized Class for partial least square as one testbed for predictiveModeling setClass( Class = 'MyPLSModel', contains="PredictiveModel", representation = representation( model='list') ) # method is already implemented and utilized(wrapped up) in caret # This is for training setMethod( f = ...
rm(list=ls()) library(MASS) library(mlbench) library(caret) library(dplyr) library(ggplot2) #Model 1 data(Glass) set.seed(123) str(Glass) glass.lda<-lda(Type~., data=Glass) glass.lda divideData<- Glass$Type %>% createDataPartition(p=0.75, list = FALSE) train<-Glass[divideData,] test<-Glass[-divideData,...
/DanielRawQ6.R
no_license
DanielRaww/linear_discriminant-analysis
R
false
false
2,013
r
rm(list=ls()) library(MASS) library(mlbench) library(caret) library(dplyr) library(ggplot2) #Model 1 data(Glass) set.seed(123) str(Glass) glass.lda<-lda(Type~., data=Glass) glass.lda divideData<- Glass$Type %>% createDataPartition(p=0.75, list = FALSE) train<-Glass[divideData,] test<-Glass[-divideData,...
#Simulating animal movements and habitat use library (raster) library (dismo) tc <- raster(nrows=100, ncols=100, xmn=0, xmx=100, ymn=0,ymx=100) tc[] <- runif(10000, -80, 180) tc <- focal(tc, w=matrix(1, 5, 5), mean) tc <- focal(tc, w=matrix(1, 5, 5), mean) plot(tc) species <- setClass("species", slots=c(...
/simulate_animal_habitat.R
no_license
Yu-study/R_language_script
R
false
false
2,189
r
#Simulating animal movements and habitat use library (raster) library (dismo) tc <- raster(nrows=100, ncols=100, xmn=0, xmx=100, ymn=0,ymx=100) tc[] <- runif(10000, -80, 180) tc <- focal(tc, w=matrix(1, 5, 5), mean) tc <- focal(tc, w=matrix(1, 5, 5), mean) plot(tc) species <- setClass("species", slots=c(...
#install.packages('GGally') #install.packages('network') #install.packages('sna') library(GGally) library(network) library(sna) library(ggplot2) library(igraph) library(viridis) library(stringr) library(reshape2) setwd("~/Dropbox/CastoeLabFolder/projects/SnakePhysiolRemod/__3Species_Intestine_MS/data/ipa_results/_ne...
/RNAseq_Figs/0v24_CPA_GeneOverlapNetwork.R
no_license
blairperry/3snake-RegenerativeGrowth
R
false
false
6,411
r
#install.packages('GGally') #install.packages('network') #install.packages('sna') library(GGally) library(network) library(sna) library(ggplot2) library(igraph) library(viridis) library(stringr) library(reshape2) setwd("~/Dropbox/CastoeLabFolder/projects/SnakePhysiolRemod/__3Species_Intestine_MS/data/ipa_results/_ne...
library(scuba) ### Name: ppO2 ### Title: Oxygen Partial Pressures ### Aliases: ppO2 ### Keywords: utilities ### ** Examples data(pedro) plot(ppO2(pedro902), type="l")
/data/genthat_extracted_code/scuba/examples/ppO2.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
178
r
library(scuba) ### Name: ppO2 ### Title: Oxygen Partial Pressures ### Aliases: ppO2 ### Keywords: utilities ### ** Examples data(pedro) plot(ppO2(pedro902), type="l")
# Set the working directory setwd("/Users/mac/Desktop/Programming/COMP9596//DroneData") require(splines) #thx @Chase for the notice # Read the data data <- read.csv(file="firstRun.csv", header=TRUE, sep=",") # Convert date column to Date object data$Date <- as.POSIXct(data$Date) # Extract the data from column name t...
/VelocityTime.R
no_license
jaygurnani/DroneData
R
false
false
1,821
r
# Set the working directory setwd("/Users/mac/Desktop/Programming/COMP9596//DroneData") require(splines) #thx @Chase for the notice # Read the data data <- read.csv(file="firstRun.csv", header=TRUE, sep=",") # Convert date column to Date object data$Date <- as.POSIXct(data$Date) # Extract the data from column name t...
#' @title Get time series #' @md #' @description Get timeseries data from Water Data online #' @details This function can be used if you want to retrieve a specific #' timeseries that is not the default quality checked one. #' #' Common valid return fields are: #' #' * Timestamp #' * Value #' * Quality Code #' * Interp...
/R/getSeries.R
no_license
cran/bomWater
R
false
false
14,825
r
#' @title Get time series #' @md #' @description Get timeseries data from Water Data online #' @details This function can be used if you want to retrieve a specific #' timeseries that is not the default quality checked one. #' #' Common valid return fields are: #' #' * Timestamp #' * Value #' * Quality Code #' * Interp...
source('pttTestFunction.R') id = c(1:10) URL = paste0("https://www.ptt.cc/bbs/NTUcourse/index", id, ".html") filename = paste0(id, ".txt") pttTestFunction(URL[1], filename[1]) mapply(pttTestFunction, URL = URL, filename = filename)
/NTU jounal/hw5/main.R
no_license
veltar23/R
R
false
false
240
r
source('pttTestFunction.R') id = c(1:10) URL = paste0("https://www.ptt.cc/bbs/NTUcourse/index", id, ".html") filename = paste0(id, ".txt") pttTestFunction(URL[1], filename[1]) mapply(pttTestFunction, URL = URL, filename = filename)
library(plotrix) ### Name: intersectDiagram ### Title: Display set intersections ### Aliases: intersectDiagram ### Keywords: misc ### ** Examples # create a matrix where each row represents an element and # a 1 (or TRUE) in each column indicates that the element is a member # of that set. druguse<-matrix(c(samp...
/data/genthat_extracted_code/plotrix/examples/intersectDiagram.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
2,138
r
library(plotrix) ### Name: intersectDiagram ### Title: Display set intersections ### Aliases: intersectDiagram ### Keywords: misc ### ** Examples # create a matrix where each row represents an element and # a 1 (or TRUE) in each column indicates that the element is a member # of that set. druguse<-matrix(c(samp...
library(gridGraphics) boxplot1 <- function() { ## boxplot on a formula: boxplot(count ~ spray, data = InsectSprays, col = "lightgray") # *add* notches (somewhat funny here): boxplot(count ~ spray, data = InsectSprays, notch = TRUE, add = TRUE, col = "blue") } boxplot2 <- function() { ...
/gridGraphics/test-scripts/test-boxplot.R
permissive
solgenomics/R_libs
R
false
false
2,409
r
library(gridGraphics) boxplot1 <- function() { ## boxplot on a formula: boxplot(count ~ spray, data = InsectSprays, col = "lightgray") # *add* notches (somewhat funny here): boxplot(count ~ spray, data = InsectSprays, notch = TRUE, add = TRUE, col = "blue") } boxplot2 <- function() { ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Mussel_pop_post.R \name{Mussel_pop_post} \alias{Mussel_pop_post} \title{Postprocess the Mussel population bioenergetic model results} \usage{ Mussel_pop_post(userpath, output, times, Dates, N, CS) } \arguments{ \item{userpath}{the pa...
/man/Mussel_pop_post.Rd
no_license
cran/RAC
R
false
true
883
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Mussel_pop_post.R \name{Mussel_pop_post} \alias{Mussel_pop_post} \title{Postprocess the Mussel population bioenergetic model results} \usage{ Mussel_pop_post(userpath, output, times, Dates, N, CS) } \arguments{ \item{userpath}{the pa...
eratio <- function(wss) { # USE MINUS 1 FOR PCA # Creates the eigenvalue ratio estimator for the number of clusters n <- NROW(wss) dss <- -diff(wss) # Create differences in wss (eigenvalues) dss <- c(wss[1]/log(n),dss) # Assign a zero case erat <- dss[1:(n-1)]/dss[2:n] # Build the eigenvalue ratio statis...
/Eratio.R
no_license
SiddharthHareendran/K-means-Clustering
R
false
false
536
r
eratio <- function(wss) { # USE MINUS 1 FOR PCA # Creates the eigenvalue ratio estimator for the number of clusters n <- NROW(wss) dss <- -diff(wss) # Create differences in wss (eigenvalues) dss <- c(wss[1]/log(n),dss) # Assign a zero case erat <- dss[1:(n-1)]/dss[2:n] # Build the eigenvalue ratio statis...
setwd("C:/Users/Angelica/Documents/Universidad/Tercer semetre/Programacion III/Specdata") directorio= getwd() completos <- function(directorio,id=1:332){ Comp <-c() for(n in id){ lee <- read.csv(paste(formatC(n, width=3,flag= "0"),".csv",sep=""),header=TRUE) Comp<- c(Comp,sum...
/Completos.R
no_license
Yahumara/Programacion_Actuarial_III
R
false
false
426
r
setwd("C:/Users/Angelica/Documents/Universidad/Tercer semetre/Programacion III/Specdata") directorio= getwd() completos <- function(directorio,id=1:332){ Comp <-c() for(n in id){ lee <- read.csv(paste(formatC(n, width=3,flag= "0"),".csv",sep=""),header=TRUE) Comp<- c(Comp,sum...
#' Create a Google calendar event #' #' This function allows you to create a calendar event. #' #' #' @param id calendar id, obtained from [calendar_list()] #' @param title Title of the event. Optional. #' @param description description of the event. This should be a character vector. Optional. #' @param attendees char...
/R/create_event.R
permissive
JosiahParry/gcalendr
R
false
false
1,528
r
#' Create a Google calendar event #' #' This function allows you to create a calendar event. #' #' #' @param id calendar id, obtained from [calendar_list()] #' @param title Title of the event. Optional. #' @param description description of the event. This should be a character vector. Optional. #' @param attendees char...
library(dplR) ### Name: uuid.gen ### Title: UUID Generator ### Aliases: uuid.gen ### Keywords: utilities ### ** Examples ## Normal use ug <- uuid.gen() uuids <- character(100) for(i in 1:100){ uuids[i] <- ug() } length(unique(uuids)) == 100 # TRUE, UUIDs are unique with high probability ## Do NOT do the followin...
/data/genthat_extracted_code/dplR/examples/uuid.gen.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
729
r
library(dplR) ### Name: uuid.gen ### Title: UUID Generator ### Aliases: uuid.gen ### Keywords: utilities ### ** Examples ## Normal use ug <- uuid.gen() uuids <- character(100) for(i in 1:100){ uuids[i] <- ug() } length(unique(uuids)) == 100 # TRUE, UUIDs are unique with high probability ## Do NOT do the followin...
\name{computeacf} \alias{computeacf} \title{Computes The ACF and Integrated AC Time} \description{ Computes the ACF and integrated autocorrelation time of a time series. It also estimates the corresponding standard errors. } \usage{ computeacf(tseries, W.max, Lambda=100) } \arguments{ \item{tseries}{ the time...
/man/computeacf.Rd
no_license
argiarubeo/hadron
R
false
false
2,027
rd
\name{computeacf} \alias{computeacf} \title{Computes The ACF and Integrated AC Time} \description{ Computes the ACF and integrated autocorrelation time of a time series. It also estimates the corresponding standard errors. } \usage{ computeacf(tseries, W.max, Lambda=100) } \arguments{ \item{tseries}{ the time...
### Terrence D. Jorgensen & Yves Rosseel ### Last updated: 5 November 2018 ### Pooled likelihood ratio test for multiple imputations ### Borrowed source code from lavaan/R/lav_test_LRT.R ## ------------- ## Main function ## ------------- ##' Likelihood Ratio Test for Multiple Imputations ##' ##' Likelihood ratio tes...
/semTools/R/runMI-LRT.R
no_license
lnsongxf/semTools
R
false
false
22,396
r
### Terrence D. Jorgensen & Yves Rosseel ### Last updated: 5 November 2018 ### Pooled likelihood ratio test for multiple imputations ### Borrowed source code from lavaan/R/lav_test_LRT.R ## ------------- ## Main function ## ------------- ##' Likelihood Ratio Test for Multiple Imputations ##' ##' Likelihood ratio tes...
/* File: AEDataModel.r Contains: AppleEvent Data Model Interfaces. Version: Technology: System 7.5 Release: Universal Interfaces 3.0.1 Copyright: © 1996-1997 by Apple Computer, Inc., all rights reserved Bugs?: Please include the the file and version information (from above) with the proble...
/3.0.1/Universal/Interfaces/RIncludes/AEDataModel.r
no_license
elliotnunn/UniversalInterfaces
R
false
false
2,983
r
/* File: AEDataModel.r Contains: AppleEvent Data Model Interfaces. Version: Technology: System 7.5 Release: Universal Interfaces 3.0.1 Copyright: © 1996-1997 by Apple Computer, Inc., all rights reserved Bugs?: Please include the the file and version information (from above) with the proble...
#' @importFrom fs is_file #' @importFrom stringr str_split #' @importFrom readr read_tsv #' @importFrom jsonlite read_json #' @importFrom yaml read_yaml #' @importFrom hdf5r H5File parse_vec <- function(x, name, type) { assert_that( is.character(x), length(x) == 1, is.character(name), length(name) == ...
/R/parse_vec.R
no_license
5l1v3r1/dyncli
R
false
false
1,824
r
#' @importFrom fs is_file #' @importFrom stringr str_split #' @importFrom readr read_tsv #' @importFrom jsonlite read_json #' @importFrom yaml read_yaml #' @importFrom hdf5r H5File parse_vec <- function(x, name, type) { assert_that( is.character(x), length(x) == 1, is.character(name), length(name) == ...
multi_poly <- structure( '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{ "type": "MultiPolygon", "coordinates": [[[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]], [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]]]] }}]}', class = c(...
/tests/testthat/test-explode.R
permissive
ateucher/rmapshaper
R
false
false
2,936
r
multi_poly <- structure( '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{ "type": "MultiPolygon", "coordinates": [[[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]], [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]]]] }}]}', class = c(...
\name{Binomial regression} \alias{binom.reg} \title{ Binomial regression } \description{ Binomial regression. } \usage{ binom.reg(y, ni, x, full = FALSE, tol = 1e-07, maxiters = 100) } \arguments{ \item{y}{ The dependent variable; a numerical vector with integer values, 0, 1, 2,... The successes. } ...
/man/binom.reg.Rd
no_license
cran/Rfast2
R
false
false
1,907
rd
\name{Binomial regression} \alias{binom.reg} \title{ Binomial regression } \description{ Binomial regression. } \usage{ binom.reg(y, ni, x, full = FALSE, tol = 1e-07, maxiters = 100) } \arguments{ \item{y}{ The dependent variable; a numerical vector with integer values, 0, 1, 2,... The successes. } ...
#' Hello World #' #' Basic hello world function to be called from the demo app #' #' @export #' @param myname your name. Required. hello <- function(name = ""){ if(name == ""){ stop("Tell me your name!") } list( message = paste("hello", name, "!") ) } #' Average #' #' @param x vector #' @export average...
/R/hello.R
no_license
stla/ocpuHello
R
false
false
2,845
r
#' Hello World #' #' Basic hello world function to be called from the demo app #' #' @export #' @param myname your name. Required. hello <- function(name = ""){ if(name == ""){ stop("Tell me your name!") } list( message = paste("hello", name, "!") ) } #' Average #' #' @param x vector #' @export average...
#DF (sname=paste('student',1:30,sep='_')) (marks=trunc(runif(n=30,max=90,min=50))) runif(30) (gender=sample(c('M','F'),replace=T,size=30,prob=c(0.7,0.3))) ?runfi ?runif df1=data.frame(sname, marks, gender) head(df1) library(dplyr) df1 %>% group_by(gender) %>% summarize(mean(marks),n(),min(marks),max(marks)) df1[(order...
/recap.R
no_license
siddharthalakkaraju/analytics1
R
false
false
443
r
#DF (sname=paste('student',1:30,sep='_')) (marks=trunc(runif(n=30,max=90,min=50))) runif(30) (gender=sample(c('M','F'),replace=T,size=30,prob=c(0.7,0.3))) ?runfi ?runif df1=data.frame(sname, marks, gender) head(df1) library(dplyr) df1 %>% group_by(gender) %>% summarize(mean(marks),n(),min(marks),max(marks)) df1[(order...
TEST_HDFS <- Sys.getenv("DATADR_TEST_HDFS") if(TEST_HDFS == "") TEST_HDFS <- FALSE # set up data path <- file.path(tempdir(), "ldd_test") unlink(path, recursive = TRUE) conn <- localDiskConn(path, nBins = 3, reset = TRUE, autoYes = TRUE) for(i in 1:25) { kk <- paste(c("a", "b", "c"), i, sep="") data <- list( ...
/tests/testthat/test-quantile.R
permissive
hafen/datadr
R
false
false
4,574
r
TEST_HDFS <- Sys.getenv("DATADR_TEST_HDFS") if(TEST_HDFS == "") TEST_HDFS <- FALSE # set up data path <- file.path(tempdir(), "ldd_test") unlink(path, recursive = TRUE) conn <- localDiskConn(path, nBins = 3, reset = TRUE, autoYes = TRUE) for(i in 1:25) { kk <- paste(c("a", "b", "c"), i, sep="") data <- list( ...
library(testthat) library(RunSurv) test_check("RunSurv")
/tests/testthat.R
no_license
woznicak/RunSurv
R
false
false
58
r
library(testthat) library(RunSurv) test_check("RunSurv")
###### Define Function BuildModel ############################################### buildSimModel <- function (EScond = .2, ESmod = .2, ESint = .2, bpath = c(.4,.3), model = "growth") { modela1 <- pas...
/Function buildSimModel.R
no_license
PeterVerboon/Power-computations
R
false
false
1,670
r
###### Define Function BuildModel ############################################### buildSimModel <- function (EScond = .2, ESmod = .2, ESint = .2, bpath = c(.4,.3), model = "growth") { modela1 <- pas...
############################################################################### # Simulation file # CS model # Author: Filip Meysman ############################################################################### # Source file containing model function source("simple 1D model_v01.R") # Source file containi...
/Sediment model 2/Sims 05 carbon flux sensitivity test.R
no_license
JTQIN/PNAS2020
R
false
false
164,563
r
############################################################################### # Simulation file # CS model # Author: Filip Meysman ############################################################################### # Source file containing model function source("simple 1D model_v01.R") # Source file containi...
#' MATCH #' #' @return MATCH() #' @export #' MATCH <- function(){ set_class(glue("MATCH"), "neo") } #' Create a WHERE clause #' #' @inheritParams node #' @param rhs the content of the condition #' #' @return WHERE() #' @export #' WHERE <- function(lhs, rhs){ rhs <- rlang::enexprs(rhs) rhs <- translate_four_j(...
/R/cypher_clauses.R
permissive
neo4j-rstats/cyphersugar
R
false
false
1,684
r
#' MATCH #' #' @return MATCH() #' @export #' MATCH <- function(){ set_class(glue("MATCH"), "neo") } #' Create a WHERE clause #' #' @inheritParams node #' @param rhs the content of the condition #' #' @return WHERE() #' @export #' WHERE <- function(lhs, rhs){ rhs <- rlang::enexprs(rhs) rhs <- translate_four_j(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sparse_multiplication.R \name{compute_MXt} \alias{compute_MXt} \title{Compute M\%*\%t(scaled.X) using sparse multiplication} \usage{ compute_MXt(M, X) } \arguments{ \item{M}{a L by p matrix} \item{X}{is a scaled dense matrix or an unscaled s...
/man/compute_MXt.Rd
permissive
KaiqianZhang/susieR
R
false
true
432
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sparse_multiplication.R \name{compute_MXt} \alias{compute_MXt} \title{Compute M\%*\%t(scaled.X) using sparse multiplication} \usage{ compute_MXt(M, X) } \arguments{ \item{M}{a L by p matrix} \item{X}{is a scaled dense matrix or an unscaled s...
#This inputs the formatted data from the processing step. #We will use this information to call DRMs proc <- tbl_df(read.table("../processed/stanford_hivdb_long.txt", header = TRUE, stringsAsFactors = FALSE)) mut.raw <- tbl_df(read.csv('../dat/who-muts.csv', sep = ",", header = FALSE, str...
/code/call_mutations.r
permissive
federlab/HIV-MDR-evolution
R
false
false
4,746
r
#This inputs the formatted data from the processing step. #We will use this information to call DRMs proc <- tbl_df(read.table("../processed/stanford_hivdb_long.txt", header = TRUE, stringsAsFactors = FALSE)) mut.raw <- tbl_df(read.csv('../dat/who-muts.csv', sep = ",", header = FALSE, str...
#!/usr/bin/env Rscript # Install packages for PCA computation if (!require("pacman")) install.packages("pacman") pacman::p_load(data.table, rsvd) # Load normalized & GC-corrected data table raw<-read.table("/rhome/cvaldez/bigdata/REU/results/gc_correct/O_sativa_14mers_Norm_GC.txt") # Produce numerical table num<-ra...
/PCA_calc_14mer.v2.R
no_license
chrisrv33/REU
R
false
false
2,063
r
#!/usr/bin/env Rscript # Install packages for PCA computation if (!require("pacman")) install.packages("pacman") pacman::p_load(data.table, rsvd) # Load normalized & GC-corrected data table raw<-read.table("/rhome/cvaldez/bigdata/REU/results/gc_correct/O_sativa_14mers_Norm_GC.txt") # Produce numerical table num<-ra...
\docType{package} \name{Homework} \alias{Homework} \alias{Homework-package} \title{Homework} \description{ Homework }
/Homework2/man/Homework.Rd
no_license
aaronjfisher/Biostat778_HW2
R
false
false
121
rd
\docType{package} \name{Homework} \alias{Homework} \alias{Homework-package} \title{Homework} \description{ Homework }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/poolMcmcChains.R \name{poolMcmcChains} \alias{poolMcmcChains} \title{poolMcmcChains} \usage{ poolMcmcChains(postList, chainIndex = 1:length(postList), start = 1, thin = 1) } \arguments{ \item{postList}{list of posterior chains} \item{chain...
/man/poolMcmcChains.Rd
no_license
bonata/HMSC
R
false
true
545
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/poolMcmcChains.R \name{poolMcmcChains} \alias{poolMcmcChains} \title{poolMcmcChains} \usage{ poolMcmcChains(postList, chainIndex = 1:length(postList), start = 1, thin = 1) } \arguments{ \item{postList}{list of posterior chains} \item{chain...
\name{table.Distributions} \alias{table.Distributions} \title{Distributions Summary: Statistics and Stylized Facts} \usage{ table.Distributions(R, scale = NA, digits = 4) } \arguments{ \item{R}{an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns} \item{scale}{number of periods in a ye...
/man/table.Distributions.Rd
no_license
sanjivkv/PerformanceAnalytics
R
false
false
1,410
rd
\name{table.Distributions} \alias{table.Distributions} \title{Distributions Summary: Statistics and Stylized Facts} \usage{ table.Distributions(R, scale = NA, digits = 4) } \arguments{ \item{R}{an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns} \item{scale}{number of periods in a ye...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/opalr-package.R \docType{package} \name{opalr-package} \alias{opalr} \alias{opalr-package} \title{opalr: 'Opal' Data Repository Client and 'DataSHIELD' Utils} \description{ Data integration Web application for biobanks by 'OBiBa'. 'Opal' is ...
/man/opalr-package.Rd
no_license
paulusv/opalr
R
false
true
1,779
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/opalr-package.R \docType{package} \name{opalr-package} \alias{opalr} \alias{opalr-package} \title{opalr: 'Opal' Data Repository Client and 'DataSHIELD' Utils} \description{ Data integration Web application for biobanks by 'OBiBa'. 'Opal' is ...
test_that("add_area() works", { data(wind) p <- plot_ly(wind, r = ~r, theta = ~t) %>% add_area(color = ~nms) %>% layout( polar = list( radialaxis = list(ticksuffix = "%"), angularaxis = list(rotation = 90) ) ) expect_doppelganger_built(p, "add-area") })
/tests/testthat/test-plotly-area.R
permissive
Displayr/plotly
R
false
false
302
r
test_that("add_area() works", { data(wind) p <- plot_ly(wind, r = ~r, theta = ~t) %>% add_area(color = ~nms) %>% layout( polar = list( radialaxis = list(ticksuffix = "%"), angularaxis = list(rotation = 90) ) ) expect_doppelganger_built(p, "add-area") })
## Before run ## Use ## setwd("C:\\Class_Training\\Data Science\\4. Exploratory Data Analysis\\CourseProject2") ## to set the current working directory ## ## Assume ## (1) Folder "exdata_data_NEI_data" is the sub-folder in current working directory ## (2) File "summarySCC_PM25.rds" is inside the sub-folder "...
/plot2.R
no_license
georgeli88/ExData_Plotting2
R
false
false
1,336
r
## Before run ## Use ## setwd("C:\\Class_Training\\Data Science\\4. Exploratory Data Analysis\\CourseProject2") ## to set the current working directory ## ## Assume ## (1) Folder "exdata_data_NEI_data" is the sub-folder in current working directory ## (2) File "summarySCC_PM25.rds" is inside the sub-folder "...
library(reshape2) library(ggplot2) library(data.table) library(lubridate) library(stargazer) library(zipcode) library(plm) library(lme4) library(xlsx) library(MatchIt) library(lmtest) library(Matching) load('~/Downloads/matched_treat2.RData') event.date <- as.Date("2014-09-01", format = "%Y-%m-%d") # Placebo event ...
/CVS case/tob_cvs_matching.r
no_license
Superet/Tobacco
R
false
false
7,181
r
library(reshape2) library(ggplot2) library(data.table) library(lubridate) library(stargazer) library(zipcode) library(plm) library(lme4) library(xlsx) library(MatchIt) library(lmtest) library(Matching) load('~/Downloads/matched_treat2.RData') event.date <- as.Date("2014-09-01", format = "%Y-%m-%d") # Placebo event ...
library(shiny) library(feedzaiBrushableHistogram) ui <- fluidPage( titlePanel("reactR Input Example"), feedzaiBrushableHistogramInput("textInput"), textOutput("textOutput") ) server <- function(input, output, session) { output$textOutput <- renderText({ sprintf("You entered: %s", input$textInput) }) } ...
/app.R
no_license
augustoamerico/feedzaiBrushableHistogram_reactR_component
R
false
false
340
r
library(shiny) library(feedzaiBrushableHistogram) ui <- fluidPage( titlePanel("reactR Input Example"), feedzaiBrushableHistogramInput("textInput"), textOutput("textOutput") ) server <- function(input, output, session) { output$textOutput <- renderText({ sprintf("You entered: %s", input$textInput) }) } ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
/r/R/csv.R
permissive
zettaflowio/arrow
R
false
false
14,388
r
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
extractID = function(hvars, idloc, fname) { ID = hvars$ID iID = hvars$iID IDd = hvars$IDd # This part is specific to how data Pelotas cohort was stored. # It is legacy code from 2012, for later projects I tried to avoid # ending up with dataset specific solutions ID2 = ID iID2 = iID if (idloc ==...
/R/extractID.R
permissive
wadpac/GGIR
R
false
false
1,593
r
extractID = function(hvars, idloc, fname) { ID = hvars$ID iID = hvars$iID IDd = hvars$IDd # This part is specific to how data Pelotas cohort was stored. # It is legacy code from 2012, for later projects I tried to avoid # ending up with dataset specific solutions ID2 = ID iID2 = iID if (idloc ==...
# Additional analysis for paper IV: table censored at 30 months of age rather than 60 months chi_lg <- ror_lg_surv %>% filter(proc == 1, age >= 36) %>% count(group, cum_presc) %>% right_join( ror_lg_surv %>% filter(proc == 1, age >= 36) %>% count(group, cum_presc) %>% ...
/_scripts/paper_4/Suppl_table_paper4.R
permissive
eliaseythorsson/phd_thesis
R
false
false
8,566
r
# Additional analysis for paper IV: table censored at 30 months of age rather than 60 months chi_lg <- ror_lg_surv %>% filter(proc == 1, age >= 36) %>% count(group, cum_presc) %>% right_join( ror_lg_surv %>% filter(proc == 1, age >= 36) %>% count(group, cum_presc) %>% ...
#TCGA setwd("D://R_code/TCGA/") library("cgdsr") # Create CGDS object mycgds = CGDS("http://www.cbioportal.org/public-portal/") test(mycgds) # Get list of cancer studies at server getCancerStudies(mycgds) # Get available case lists (collection of samples) for a given cancer study mycancerstudy = getCancerStudies(my...
/R_scripts/TCGA.R
no_license
DawnEve/bioToolKit
R
false
false
771
r
#TCGA setwd("D://R_code/TCGA/") library("cgdsr") # Create CGDS object mycgds = CGDS("http://www.cbioportal.org/public-portal/") test(mycgds) # Get list of cancer studies at server getCancerStudies(mycgds) # Get available case lists (collection of samples) for a given cancer study mycancerstudy = getCancerStudies(my...
r.prof <- c(t(as.matrix(ProfessorSalary))) f1.prof <- c("Assistant Professor", "Associate Professor", "Full Professor") f2.prof <- c("Male", "Female") k1.prof <- length(f1.prof) k2.prof <- length(f2.prof) n <- 10 tm1.rank <- gl(k1.prof, 1, n*k1.prof*k2.prof, factor(f1.prof)) tm2.gender <- gl(k2.prof, n*k1.prof, n*k1...
/ProfessorSalaryAnova.R
no_license
tris-rivers/anova-1
R
false
false
465
r
r.prof <- c(t(as.matrix(ProfessorSalary))) f1.prof <- c("Assistant Professor", "Associate Professor", "Full Professor") f2.prof <- c("Male", "Female") k1.prof <- length(f1.prof) k2.prof <- length(f2.prof) n <- 10 tm1.rank <- gl(k1.prof, 1, n*k1.prof*k2.prof, factor(f1.prof)) tm2.gender <- gl(k2.prof, n*k1.prof, n*k1...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/case_anarbe.R \name{collectData_excel_anarbe} \alias{collectData_excel_anarbe} \title{Collect data from different excel files} \usage{ collectData_excel_anarbe(folderName, keyword = NULL, output = TRUE) } \arguments{ \item{folderName}{A strin...
/man/collectData_excel_anarbe.Rd
no_license
Yuanchao-Xu/hyfo
R
false
true
812
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/case_anarbe.R \name{collectData_excel_anarbe} \alias{collectData_excel_anarbe} \title{Collect data from different excel files} \usage{ collectData_excel_anarbe(folderName, keyword = NULL, output = TRUE) } \arguments{ \item{folderName}{A strin...
% Generated by roxygen2 (4.0.2): do not edit by hand \name{write.amiramesh} \alias{write.amiramesh} \title{Write a 3d data object to an amiramesh format file} \usage{ write.amiramesh(x, file, enc = c("binary", "raw", "text", "hxzip"), dtype = c("float", "byte", "short", "ushort", "int", "double"), endian = .Platfor...
/man/write.amiramesh.Rd
no_license
mnqslbs2/nat
R
false
false
1,352
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \name{write.amiramesh} \alias{write.amiramesh} \title{Write a 3d data object to an amiramesh format file} \usage{ write.amiramesh(x, file, enc = c("binary", "raw", "text", "hxzip"), dtype = c("float", "byte", "short", "ushort", "int", "double"), endian = .Platfor...
#!/usr/bin/env Rscript args <- commandArgs(trailingOnly = TRUE) a = read.table(args[1], header=T); t(a[which(a != 0)])
/rapl/libmsr-seg-fault/parse_rapl.sh
no_license
tpatki/patki-power
R
false
false
119
sh
#!/usr/bin/env Rscript args <- commandArgs(trailingOnly = TRUE) a = read.table(args[1], header=T); t(a[which(a != 0)])
#----------------------------Data Setup------------------------------------ #Set working directory to the source location library(dplyr) library(lmtest) #for likelihood ratio test library(lme4) #for linear mixed effects model library(lmerTest) #for pvalue for mixed effects models(lme4) library(broom) # for augment ...
/AEDA_2021_Final/DrakeE_GLMM_GolfBats.R
permissive
aeda2021/drake_evan
R
false
false
38,732
r
#----------------------------Data Setup------------------------------------ #Set working directory to the source location library(dplyr) library(lmtest) #for likelihood ratio test library(lme4) #for linear mixed effects model library(lmerTest) #for pvalue for mixed effects models(lme4) library(broom) # for augment ...
library(ggplot2) ggplot(mtcars, aes(mpg, wt)) + geom_point() + ptrr:::theme_ipr()
/prep/theme_test.R
permissive
petrbouchal/ptrr
R
false
false
87
r
library(ggplot2) ggplot(mtcars, aes(mpg, wt)) + geom_point() + ptrr:::theme_ipr()
install.packages("lattice") library(lattice) dotplot(caloC$`Weight`, main="Dot Plot of weight ",col="dodgerblue4") dotplot(caloC$`CC`, main="Dot Plot of calories consumed", col="dodgerblue4") boxplot(caloC$`Weight`,col="dodgerblue4") boxplot(caloC$`CC`,col="dodgerblue4") #Regression equation #Syntax model<-lm(y...
/Simple linear regression.R
no_license
Amit1608/Datascience-Rcodes
R
false
false
607
r
install.packages("lattice") library(lattice) dotplot(caloC$`Weight`, main="Dot Plot of weight ",col="dodgerblue4") dotplot(caloC$`CC`, main="Dot Plot of calories consumed", col="dodgerblue4") boxplot(caloC$`Weight`,col="dodgerblue4") boxplot(caloC$`CC`,col="dodgerblue4") #Regression equation #Syntax model<-lm(y...
openRprof <- function(){Rprof(memory.profiling=TRUE)} closeRprof <- function(){ Rprof(NULL) summaryRprof("Rprof.out", memory="both") }
/R/profiler.R
no_license
adalardo/facilitation
R
false
false
136
r
openRprof <- function(){Rprof(memory.profiling=TRUE)} closeRprof <- function(){ Rprof(NULL) summaryRprof("Rprof.out", memory="both") }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FeaturesEstimationFunctions.R \name{lillie.testGals} \alias{lillie.testGals} \title{lillie.testGals} \usage{ lillie.testGals(group) } \arguments{ \item{group}{Data frame with the galaxies of the cluster.} } \value{ Vector with the properties ...
/man/lillie.testGals.Rd
no_license
Martindelosrios/MeSsI
R
false
true
495
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FeaturesEstimationFunctions.R \name{lillie.testGals} \alias{lillie.testGals} \title{lillie.testGals} \usage{ lillie.testGals(group) } \arguments{ \item{group}{Data frame with the galaxies of the cluster.} } \value{ Vector with the properties ...
# plot 4 # ensure day and month names are written in English Sys.setlocale(locale='C') # read data nrows <- 24*60*2 # 2 days in minutes skiprows <- 66636 # row where 1/2/2007 00:00:00 appears cols <- read.csv('../household_power_consumption.txt',sep=';',nrows=1); # to get col names d <- read.csv('../household_power_c...
/plot4.R
no_license
jabadia/ExData_Plotting1
R
false
false
1,286
r
# plot 4 # ensure day and month names are written in English Sys.setlocale(locale='C') # read data nrows <- 24*60*2 # 2 days in minutes skiprows <- 66636 # row where 1/2/2007 00:00:00 appears cols <- read.csv('../household_power_consumption.txt',sep=';',nrows=1); # to get col names d <- read.csv('../household_power_c...
#' Mosaic Info #' #' The function is equivalent to \code{\link{tile_read}}. It makes an \code{\link[=SpectralInfo-class]{SpectralInfo}} object using the .dmt file. It does not load the measured spectra, and it was written for mosaic images only. See the page of \code{\link[=SpectralInfo-class]{SpectralInfo}} class for...
/fuzzedpackages/uFTIR/R/mosaic_info.R
no_license
akhikolla/testpackages
R
false
false
2,864
r
#' Mosaic Info #' #' The function is equivalent to \code{\link{tile_read}}. It makes an \code{\link[=SpectralInfo-class]{SpectralInfo}} object using the .dmt file. It does not load the measured spectra, and it was written for mosaic images only. See the page of \code{\link[=SpectralInfo-class]{SpectralInfo}} class for...
#-------------------------------------------------------------------------# # Time Series Decomposition Using Spring System Applied on Phase Spaces # # # # Copyright (c) 2016-2019 Felipe S. L. G. Duarte, Ricardo A. Rios, # # Eduardo R. Hru...
/evaluate_ssa.r
no_license
felipelageduarte/Spring
R
false
false
4,334
r
#-------------------------------------------------------------------------# # Time Series Decomposition Using Spring System Applied on Phase Spaces # # # # Copyright (c) 2016-2019 Felipe S. L. G. Duarte, Ricardo A. Rios, # # Eduardo R. Hru...
#!/usr/bin/env Rscript args = commandArgs(trailingOnly=TRUE) # Should we run with MPI? run_mpi <- 0 # Where to save the data? path <- "~/scratch/MCratio/condition2" # Where to save the data? n_samples <- 10000 # get the number of cores cores <- 10 #condition to run condition <- 2 library(mnormt) # data generati...
/MCratioAnalysis/Testing effects against each other/Generate_within_subject_data_files_condition2.R
no_license
PatrickLaflamme/RatioCorrectionMonteCarlo
R
false
false
3,169
r
#!/usr/bin/env Rscript args = commandArgs(trailingOnly=TRUE) # Should we run with MPI? run_mpi <- 0 # Where to save the data? path <- "~/scratch/MCratio/condition2" # Where to save the data? n_samples <- 10000 # get the number of cores cores <- 10 #condition to run condition <- 2 library(mnormt) # data generati...
library(tidyverse) library(readxl) library(stringr) library(lubridate) source("R/rockfish-funcs-feather.R") #### Call genos from the microhaplot feather files #### # this next step uses a little data frame that has the names and GTSeq run numbers # I got that file like this: # dsb:rds_files dianabaetscher$ pwd # /...
/Rmd_new_baseline/01-compile-and-tidy-new-baseline.R
no_license
dbaetscher/rockfish-species-id
R
false
false
9,030
r
library(tidyverse) library(readxl) library(stringr) library(lubridate) source("R/rockfish-funcs-feather.R") #### Call genos from the microhaplot feather files #### # this next step uses a little data frame that has the names and GTSeq run numbers # I got that file like this: # dsb:rds_files dianabaetscher$ pwd # /...
################################# #CANCER VARIANT EXPLORER V1.1 #Graphical user interface script #Andreas Mock #University of Cambridge ################################# shinyUI(fluidPage( titlePanel("CVE - Cancer Variant Explorer v1.1"), ######################### ####Layout of sidebar#### ###################...
/inst/Shiny/CVE/ui.R
no_license
andreasmock/CVE
R
false
false
6,039
r
################################# #CANCER VARIANT EXPLORER V1.1 #Graphical user interface script #Andreas Mock #University of Cambridge ################################# shinyUI(fluidPage( titlePanel("CVE - Cancer Variant Explorer v1.1"), ######################### ####Layout of sidebar#### ###################...
context("Google places") test_that("search string or location specified", { expect_error(google_places(), "One of 'search_string' or 'location' must be specified") }) test_that("location is a numeric vector",{ expect_error(google_places(location = c("Melbourne, Australia")), "loc...
/tests/testthat/test-google_places.R
no_license
fdzul/googleway
R
false
false
4,874
r
context("Google places") test_that("search string or location specified", { expect_error(google_places(), "One of 'search_string' or 'location' must be specified") }) test_that("location is a numeric vector",{ expect_error(google_places(location = c("Melbourne, Australia")), "loc...
% Generated by roxygen2 (4.0.1): do not edit by hand \name{mix} \alias{mix} \title{Mix Two Colours together} \usage{ mix(col1, col2, p = 0.5) } \arguments{ \item{col1}{Vector of colours} \item{col2}{Vector of colours} \item{p}{AMount of colour vector 2 to take} } \description{ Mix two colours together } \author{ Rich...
/man/mix.Rd
no_license
opetchey/Revolve
R
false
false
333
rd
% Generated by roxygen2 (4.0.1): do not edit by hand \name{mix} \alias{mix} \title{Mix Two Colours together} \usage{ mix(col1, col2, p = 0.5) } \arguments{ \item{col1}{Vector of colours} \item{col2}{Vector of colours} \item{p}{AMount of colour vector 2 to take} } \description{ Mix two colours together } \author{ Rich...
\name{carw} \alias{carw} \alias{carw.data} \docType{data} \title{ The Carolina Wren data used by Royle et al. (2012) } \description{ These data come from the North American Breeding Bird Survey. They include presence-only and presence-absence data for all 25 square-kilometer covering the contiguous United State...
/man/carw.Rd
no_license
rbchan/maxlike
R
false
false
1,875
rd
\name{carw} \alias{carw} \alias{carw.data} \docType{data} \title{ The Carolina Wren data used by Royle et al. (2012) } \description{ These data come from the North American Breeding Bird Survey. They include presence-only and presence-absence data for all 25 square-kilometer covering the contiguous United State...
#' Select show module UI #' #' @param id A character vector of length 1. #' @param df A data frame with columns: publish_date, concept, value and var. #' @param a_menu A named character vector, area menu. #' #' @return A module UI. #' #' @examples #' \dontrun{ #' selectShowUI("world_region", world$region_df, world$regi...
/R/selectShow.R
permissive
yangboyubyron/covid-3
R
false
false
3,436
r
#' Select show module UI #' #' @param id A character vector of length 1. #' @param df A data frame with columns: publish_date, concept, value and var. #' @param a_menu A named character vector, area menu. #' #' @return A module UI. #' #' @examples #' \dontrun{ #' selectShowUI("world_region", world$region_df, world$regi...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 11674 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 11242 c c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 11242 c c Input Parameter (command line, ...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Seidl/ASP_Program_Inclusion/T-edau-2/T-edau-2.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
2,370
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 11674 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 11242 c c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 11242 c c Input Parameter (command line, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ttest_class.R \docType{methods} \name{plot,ttest_class,missing-method} \alias{plot,ttest_class,missing-method} \title{plot} \usage{ \S4method{plot}{ttest_class,missing}(x) } \arguments{ \item{x}{ttest_class object.} } \description{ \code{plot...
/man/plot-ttest_class-missing-method.Rd
no_license
udaydatar7/bayes4psy
R
false
true
631
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ttest_class.R \docType{methods} \name{plot,ttest_class,missing-method} \alias{plot,ttest_class,missing-method} \title{plot} \usage{ \S4method{plot}{ttest_class,missing}(x) } \arguments{ \item{x}{ttest_class object.} } \description{ \code{plot...
#'Perform compound mapping for integrative analysis methods #'@description Perform compound mapping #'@param mSetObj Input name of the created mSet Object #'@param cmpdIDs Input the list of compound IDs #'@param org Input the organism code #'@param idType Input the ID type #'@author Jeff Xia \email{jeff.xia@mcgill.ca}...
/MetaboAnalyst/src/main/webapp/resources/rscripts/metaboanalystr/enrich_integ.R
no_license
Sam-Stuart/Wegan
R
false
false
19,637
r
#'Perform compound mapping for integrative analysis methods #'@description Perform compound mapping #'@param mSetObj Input name of the created mSet Object #'@param cmpdIDs Input the list of compound IDs #'@param org Input the organism code #'@param idType Input the ID type #'@author Jeff Xia \email{jeff.xia@mcgill.ca}...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Server.R \name{pearsonCorrToJSON} \alias{pearsonCorrToJSON} \title{convert perason correlation coeffcients between PCs and sgnatures into a JSON object} \usage{ pearsonCorrToJSON(pc, sigs) } \arguments{ \item{pc}{the pearson correlation coeff...
/man/pearsonCorrToJSON.Rd
permissive
johnnyUCSF/VISION
R
false
true
539
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Server.R \name{pearsonCorrToJSON} \alias{pearsonCorrToJSON} \title{convert perason correlation coeffcients between PCs and sgnatures into a JSON object} \usage{ pearsonCorrToJSON(pc, sigs) } \arguments{ \item{pc}{the pearson correlation coeff...
# Nutrient contents ------------------------------------------------------------------------------- # Load & preprocess data -------------------------------------------------------------------------- rm(list = ls()) data(nutrients, package = "robCompositions") nutrients <- as.data.frame(nutrients) # change rownames...
/Simulations & application/Nutrients.R
no_license
SebastiaanHoppner/CRM
R
false
false
6,678
r
# Nutrient contents ------------------------------------------------------------------------------- # Load & preprocess data -------------------------------------------------------------------------- rm(list = ls()) data(nutrients, package = "robCompositions") nutrients <- as.data.frame(nutrients) # change rownames...
dataset <- read.table("./data/household_power_consumption.txt", sep = ";", header = TRUE, na.strings = "NA") d<- dataset d$Global_active_power <- as.numeric(as.character(d$Global_active_power)) d$Global_reactive_power <- as.numeric(as.character(d$Global_reactive_power)) d$Sub_metering_1 <- as.numeric(as.character(d$Sub...
/plot4.R
no_license
Abdulakhad/ExdataCoursera
R
false
false
1,709
r
dataset <- read.table("./data/household_power_consumption.txt", sep = ";", header = TRUE, na.strings = "NA") d<- dataset d$Global_active_power <- as.numeric(as.character(d$Global_active_power)) d$Global_reactive_power <- as.numeric(as.character(d$Global_reactive_power)) d$Sub_metering_1 <- as.numeric(as.character(d$Sub...
# ---------------------------------------------------------------------------- # PROJECT # Name: * # Professor: * # Author: Heather Low # ---------------------------------------------------------------------------- # CODE # Name: 2- # Date: # Purpose: Subset data and make employee shift_info list. # Input: "Co_checks_...
/2-clean.R
no_license
hl-py/restaurantData
R
false
false
6,570
r
# ---------------------------------------------------------------------------- # PROJECT # Name: * # Professor: * # Author: Heather Low # ---------------------------------------------------------------------------- # CODE # Name: 2- # Date: # Purpose: Subset data and make employee shift_info list. # Input: "Co_checks_...
# See README.md for instructions on running the code and output from it # makeCacheMatrix is a function that returns a list of functions # Its puspose is to store a martix and a cached value of the inverse of the # matrix. Contains the following functions: # * setMatrix set the value of a matrix # * getMatrix ...
/assessment2.R
no_license
KavithaManoharan/R-programming-Assessment2
R
false
false
2,285
r
# See README.md for instructions on running the code and output from it # makeCacheMatrix is a function that returns a list of functions # Its puspose is to store a martix and a cached value of the inverse of the # matrix. Contains the following functions: # * setMatrix set the value of a matrix # * getMatrix ...
## Analise de Correlacao ## Dados do exemplo dados <- read.csv2("salario_experiencia.csv") dados <- dados[order(dados$Experiencia),] plot(Salario ~ Experiencia, data=dados, pch=19, col="blue") modelo <- lm(Salario ~ Experiencia, data=dados) abline(modelo, lty=2, col="red", lwd=2) summary(modelo) y <- dados$S...
/02 - Regressão Linear/Aula 04-C.R
permissive
Matheus-Cougias/R_Modelos_Lineares
R
false
false
423
r
## Analise de Correlacao ## Dados do exemplo dados <- read.csv2("salario_experiencia.csv") dados <- dados[order(dados$Experiencia),] plot(Salario ~ Experiencia, data=dados, pch=19, col="blue") modelo <- lm(Salario ~ Experiencia, data=dados) abline(modelo, lty=2, col="red", lwd=2) summary(modelo) y <- dados$S...
library(R.utils) ### Name: capitalize ### Title: Capitalizes/decapitalizes each character string in a vector ### Aliases: capitalize.default capitalize decapitalize ### decapitalize.default ### Keywords: programming ### ** Examples words <- strsplit("Hello wOrld", " ")[[1]]; cat(paste(toupper(words), collapse=" ...
/data/genthat_extracted_code/R.utils/examples/capitalize.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
839
r
library(R.utils) ### Name: capitalize ### Title: Capitalizes/decapitalizes each character string in a vector ### Aliases: capitalize.default capitalize decapitalize ### decapitalize.default ### Keywords: programming ### ** Examples words <- strsplit("Hello wOrld", " ")[[1]]; cat(paste(toupper(words), collapse=" ...
#plotting of busco #s for paper #by Cassie Ettinger library(tidyverse) library(ggplot2) library(vroom) busco.stats <- vroom("busco_wide.csv") busco.stats.v2 <- busco.stats %>% filter(!genome == "gwss") busco.stats.v2 <- busco.stats.v2 %>% mutate(per_complete = (complete / total) * 100, per_single = (s...
/scripts_R/busco_comparison_plots.R
no_license
stajichlab/GWSS_Genome
R
false
false
1,914
r
#plotting of busco #s for paper #by Cassie Ettinger library(tidyverse) library(ggplot2) library(vroom) busco.stats <- vroom("busco_wide.csv") busco.stats.v2 <- busco.stats %>% filter(!genome == "gwss") busco.stats.v2 <- busco.stats.v2 %>% mutate(per_complete = (complete / total) * 100, per_single = (s...
"fun.fmkl.L40"<-function(k,L3){ j<-0:k result<-integrate(function(x,k,L3) ((x^L3-1)/L3-log(1-x))^k,0,1, abs.tol=1e-100,k=k,L3=L3,stop.on.error=FALSE) if(result$message!="OK"){return(NA)} else return(result$value)}
/R/fun.fmkl.L40.R
no_license
cran/GLDEX
R
false
false
232
r
"fun.fmkl.L40"<-function(k,L3){ j<-0:k result<-integrate(function(x,k,L3) ((x^L3-1)/L3-log(1-x))^k,0,1, abs.tol=1e-100,k=k,L3=L3,stop.on.error=FALSE) if(result$message!="OK"){return(NA)} else return(result$value)}
#' Constructs a \code{HS} object from given input #' #' Creates a \code{HS} from input where \code{grid} is a polygon grid #' representing the spatial units of runoff, and /code{runoff} is a data.frame #' containing column 'Date', and where column names match the grid IDs. #' #' @param zones An \code{sf POLYGON} obj...
/R/create_HSgrid.R
permissive
tanxuezhi/hydrostreamer
R
false
false
3,628
r
#' Constructs a \code{HS} object from given input #' #' Creates a \code{HS} from input where \code{grid} is a polygon grid #' representing the spatial units of runoff, and /code{runoff} is a data.frame #' containing column 'Date', and where column names match the grid IDs. #' #' @param zones An \code{sf POLYGON} obj...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
/R/pkg/tests/fulltests/test_mllib_fpm.R
permissive
Avi108/spark
R
false
false
3,645
r
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
## Overall, this function allows for solving and caching the inverse of a matrix makeCacheMatrix <- function(x = matrix()) { ## This function creates a list of 4 functions that allows ## for caching of a desired solution (in this case the inverse of a matrix ## , but mean/sum/etc is also possible). The function...
/cachematrix.R
no_license
RVL1980/ProgrammingAssignment2
R
false
false
1,821
r
## Overall, this function allows for solving and caching the inverse of a matrix makeCacheMatrix <- function(x = matrix()) { ## This function creates a list of 4 functions that allows ## for caching of a desired solution (in this case the inverse of a matrix ## , but mean/sum/etc is also possible). The function...
## some plots to show the relationship between peaks and depth ## Zijun Zhang ## 5.16.2018 library(LSD) library(ggplot2) library(Darts) heat_plot = function(x, y, xlab='', ylab='', xlim=c(0,1), ylim=c(0,1)) { library(MASS) DF <- data.frame(x,y) dens <- kde2d(x,y) gr <- data.frame(with(dens, expand.grid(x,y)), a...
/peak_power_analysis/power_analysis.R
permissive
zj-zhang/CLAM_m6A_plots
R
false
false
2,245
r
## some plots to show the relationship between peaks and depth ## Zijun Zhang ## 5.16.2018 library(LSD) library(ggplot2) library(Darts) heat_plot = function(x, y, xlab='', ylab='', xlim=c(0,1), ylim=c(0,1)) { library(MASS) DF <- data.frame(x,y) dens <- kde2d(x,y) gr <- data.frame(with(dens, expand.grid(x,y)), a...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810539829628e+146, 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), .Dim = c(10L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling...
/CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615778963-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
348
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810539829628e+146, 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), .Dim = c(10L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling...
library(TraMineR) ### Name: seqpm ### Title: Find substring patterns in sequences ### Aliases: seqpm ### Keywords: State sequences ### ** Examples data(actcal) actcal.seq <- seqdef(actcal,13:24) ## search for pattern "DAAD" ## (no work-full time work-full time work-no work) ## results are stored in the 'daad' obje...
/data/genthat_extracted_code/TraMineR/examples/seqpm.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
518
r
library(TraMineR) ### Name: seqpm ### Title: Find substring patterns in sequences ### Aliases: seqpm ### Keywords: State sequences ### ** Examples data(actcal) actcal.seq <- seqdef(actcal,13:24) ## search for pattern "DAAD" ## (no work-full time work-full time work-no work) ## results are stored in the 'daad' obje...
library(stargazer) library(dotwhisker) library(broom) library(dplyr) library(gridExtra) library(grid)
/tempCodeRunnerFile.R
no_license
HSJung93/-Python-R-CongressFTA
R
false
false
101
r
library(stargazer) library(dotwhisker) library(broom) library(dplyr) library(gridExtra) library(grid)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nint.R \name{nint_tanTransform} \alias{nint_tanTransform} \title{Tangent Transform} \usage{ nint_tanTransform(center, scale, dIdcs = NULL) } \arguments{ \item{center, scale}{see \code{g(x)}.} \item{dIdcs}{an integer vector of indices, the di...
/man/nint_tanTransform.Rd
no_license
arappold/docopulae
R
false
true
1,531
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nint.R \name{nint_tanTransform} \alias{nint_tanTransform} \title{Tangent Transform} \usage{ nint_tanTransform(center, scale, dIdcs = NULL) } \arguments{ \item{center, scale}{see \code{g(x)}.} \item{dIdcs}{an integer vector of indices, the di...
library(shiny) shinyServer( function(input,output){ output$oid1<-renderPrint({input$id1}) output$oid2<-renderPrint({input$id2}) output$odate<-renderPrint({input$date}) } )
/shinyProject/server.R
no_license
vikitripathi/shinyApps
R
false
false
189
r
library(shiny) shinyServer( function(input,output){ output$oid1<-renderPrint({input$id1}) output$oid2<-renderPrint({input$id2}) output$odate<-renderPrint({input$date}) } )
#' Converts an R mmclr model output to the format of R's hlme class #' #' @param model contains model parameter estimates and maximised likelihood, AIC, BIC values #' @return A format to feed into the LCTMtoolkit() R function #' @examples #' \dontrun{mmlcr_to_lctm(model)} #' @export mmlcr_to_lctm <- function(model) {...
/R/mmlcr_to_lctm.R
no_license
hlennon/LCTMtools
R
false
false
1,055
r
#' Converts an R mmclr model output to the format of R's hlme class #' #' @param model contains model parameter estimates and maximised likelihood, AIC, BIC values #' @return A format to feed into the LCTMtoolkit() R function #' @examples #' \dontrun{mmlcr_to_lctm(model)} #' @export mmlcr_to_lctm <- function(model) {...
############################################################### # cNMTF # 2. Factorisation functions # 2.4 Functions to find optimal penalization parameters # # Corresponding author: # Luis Leal, Imperial College London, email: lgl15@imperial.ac.uk ############################################################### #~~~~...
/raw/fact_param.R
no_license
lgl15/cnmtf
R
false
false
27,049
r
############################################################### # cNMTF # 2. Factorisation functions # 2.4 Functions to find optimal penalization parameters # # Corresponding author: # Luis Leal, Imperial College London, email: lgl15@imperial.ac.uk ############################################################### #~~~~...
library(rgdal) library(raster) library(viridis) #nicht daily sondern stündlich!! MSGpredpath <- paste0("/media/memory01/data/IDESSA/Results/Predictions/") outpath <- "/media/memory01/data/IDESSA/Results/Figures/timeseries/" dir.create(outpath) saturationpoint <- 10 base <- readOGR("/media/memory01/data/IDESSA/auxilia...
/IDESSA/develop_SA_retrieval/Figures/animation.R
no_license
environmentalinformatics-marburg/magic
R
false
false
1,600
r
library(rgdal) library(raster) library(viridis) #nicht daily sondern stündlich!! MSGpredpath <- paste0("/media/memory01/data/IDESSA/Results/Predictions/") outpath <- "/media/memory01/data/IDESSA/Results/Figures/timeseries/" dir.create(outpath) saturationpoint <- 10 base <- readOGR("/media/memory01/data/IDESSA/auxilia...
#' @title Zero-Inflated distribution model (i.e., with an atom at zero) #' #' @description Density, distribution function, quantile function and random generation #' for the zero-inflated (i.e., mixed) distribution model. This model is composed by two parts, #' 1) the discrete part, which regards an atom at zero, and...
/R/dpqzi.R
no_license
itsoukal/bBextremes
R
false
false
2,642
r
#' @title Zero-Inflated distribution model (i.e., with an atom at zero) #' #' @description Density, distribution function, quantile function and random generation #' for the zero-inflated (i.e., mixed) distribution model. This model is composed by two parts, #' 1) the discrete part, which regards an atom at zero, and...