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
context("parametricRmst") test_that("error_thrown_if_armAsFactor_TRUE",{ sD <- createSurvivalDataObject() fit <- fitModels(sD, armAsFactor=TRUE, endPoint="relapse") expect_error(calcModelRmst(fit, model="weibull", times=50)) }) test_that("error_thrown_if_fit_contains_covariates",{ sD <- createSurvivalDa...
/tests/testthat/test-rmst.R
no_license
scientific-computing-solutions/sibyl
R
false
false
2,244
r
context("parametricRmst") test_that("error_thrown_if_armAsFactor_TRUE",{ sD <- createSurvivalDataObject() fit <- fitModels(sD, armAsFactor=TRUE, endPoint="relapse") expect_error(calcModelRmst(fit, model="weibull", times=50)) }) test_that("error_thrown_if_fit_contains_covariates",{ sD <- createSurvivalDa...
source('~/code/util/mtx.r') run_scanpy = function(data, n_pcs=0, method='dmap', dpt=FALSE, root_cell=NULL, n_neighbors=10, paga=FALSE, clusters=NULL, cleanup=TRUE, out=NULL, sparse=TRUE, resolution=1){ # ----------------------------------------- # Run scanpy on [cells x feats] data matrix # --------------...
/single_cell/scanpy.r
no_license
cssmillie/code
R
false
false
3,363
r
source('~/code/util/mtx.r') run_scanpy = function(data, n_pcs=0, method='dmap', dpt=FALSE, root_cell=NULL, n_neighbors=10, paga=FALSE, clusters=NULL, cleanup=TRUE, out=NULL, sparse=TRUE, resolution=1){ # ----------------------------------------- # Run scanpy on [cells x feats] data matrix # --------------...
#' Generate the base plot of inflation curves for all tire sizes #' #' @param base_inflation the inflation data to use. #' #' @param plot_theme the ggplot theme to use. #' #' @return ggplot object #' #' @include plot_helpers.R #' @include generate-inflation-curve-data.R #' @include theme_dg_pale.R #' #' @import ggplot2...
/R/generate_base_plot.R
permissive
dgabbe/btpress
R
false
false
2,098
r
#' Generate the base plot of inflation curves for all tire sizes #' #' @param base_inflation the inflation data to use. #' #' @param plot_theme the ggplot theme to use. #' #' @return ggplot object #' #' @include plot_helpers.R #' @include generate-inflation-curve-data.R #' @include theme_dg_pale.R #' #' @import ggplot2...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/ikk1.R \name{generateIKK1} \alias{IKK1} \alias{generateIKK1} \alias{ikk1} \title{IKK1 test function generator.} \usage{ generateIKK1(in.dim = 2L, out.dim = 3L) } \arguments{ \item{in.dim}{[\code{integer(1)}] \cr Size of parameter spac...
/man/generateIKK1.Rd
no_license
danielhorn/moobench
R
false
false
520
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/ikk1.R \name{generateIKK1} \alias{IKK1} \alias{generateIKK1} \alias{ikk1} \title{IKK1 test function generator.} \usage{ generateIKK1(in.dim = 2L, out.dim = 3L) } \arguments{ \item{in.dim}{[\code{integer(1)}] \cr Size of parameter spac...
\name{centralValue} \alias{centralValue} \title{ Obtain statistic of centrality } \description{ This function obtains a statistic of centrality of a variable given a sample of its values. } \usage{ centralValue(x, ws = NULL) } \arguments{ \item{x}{ A vector of values (the sample). } \item{ws}{ A vector of cas...
/man/centralValue.Rd
no_license
gmaubach/DMwR2
R
false
false
1,318
rd
\name{centralValue} \alias{centralValue} \title{ Obtain statistic of centrality } \description{ This function obtains a statistic of centrality of a variable given a sample of its values. } \usage{ centralValue(x, ws = NULL) } \arguments{ \item{x}{ A vector of values (the sample). } \item{ws}{ A vector of cas...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Styles.R \name{getVisualStyleJSON} \alias{getVisualStyleJSON} \title{Get Visual Style JSON} \usage{ getVisualStyleJSON(styleName, css = FALSE, base.url = .defaultBaseUrl) } \arguments{ \item{styleName}{name of style} \item{css}{TRUE to creat...
/man/getVisualStyleJSON.Rd
permissive
cytoscape/RCy3
R
false
true
798
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Styles.R \name{getVisualStyleJSON} \alias{getVisualStyleJSON} \title{Get Visual Style JSON} \usage{ getVisualStyleJSON(styleName, css = FALSE, base.url = .defaultBaseUrl) } \arguments{ \item{styleName}{name of style} \item{css}{TRUE to creat...
# --- write the perceptual mapping func --- pmap <- function(inp.mat, # input matrix with R rows and C colms k=1) # scaling factor { # inp.mat = perception matrix with row and column headers # brands or units of analysis in rows and attributes in columns par(pty="m") ...
/general R funcs.R
no_license
sudhir-voleti/code-chunks
R
false
false
1,701
r
# --- write the perceptual mapping func --- pmap <- function(inp.mat, # input matrix with R rows and C colms k=1) # scaling factor { # inp.mat = perception matrix with row and column headers # brands or units of analysis in rows and attributes in columns par(pty="m") ...
#### helper functions #### #install.packages("RTextTools") #install.packages("topicmodels") # Load libraries require(RTextTools) library(topicmodels) library(rhdf5) # Manually adjusted probabilities for all terms adjust_prob <- function(lyr, label) { new_lyr <- lyr[-237,] df <- cbind(label, new_lyr) ...
/lib/helper.r
no_license
TZstatsADS/Fall2016-proj4-TianShengTS
R
false
false
1,820
r
#### helper functions #### #install.packages("RTextTools") #install.packages("topicmodels") # Load libraries require(RTextTools) library(topicmodels) library(rhdf5) # Manually adjusted probabilities for all terms adjust_prob <- function(lyr, label) { new_lyr <- lyr[-237,] df <- cbind(label, new_lyr) ...
#------------------------------------------------------------------------------- # Cylindrical Bessel Derivatives for J #------------------------------------------------------------------------------- reff.cjn<-function(x,n){ return(besselJ(x,n)) }
/R/reff.cjn.r
no_license
aneves76/rvswf
R
false
false
252
r
#------------------------------------------------------------------------------- # Cylindrical Bessel Derivatives for J #------------------------------------------------------------------------------- reff.cjn<-function(x,n){ return(besselJ(x,n)) }
/LSED_Lab_10.R
no_license
Samox1/R_LAB_LSED_MSR_TEXT
R
false
false
2,574
r
#' Create AGS from a mutation matrix #' #' Imports a TAB-delimited file with mutations. #' This function creates a new list of AGSs from a table listing point (or otherwise qualitatively defined) mutations. Such a matrix M typically has size Ngenes x Nsamples, so that the current function returns a list of \code{length...
/R/mutations2ags.r
no_license
ashwini06/NEArender
R
false
false
3,249
r
#' Create AGS from a mutation matrix #' #' Imports a TAB-delimited file with mutations. #' This function creates a new list of AGSs from a table listing point (or otherwise qualitatively defined) mutations. Such a matrix M typically has size Ngenes x Nsamples, so that the current function returns a list of \code{length...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stat-fit-broom.R \name{stat_fit_tidy} \alias{stat_fit_tidy} \title{Return one row data frame with fitted parameter estimates.} \usage{ stat_fit_tidy(mapping = NULL, data = NULL, geom = "null", method = "lm", method.args = list(formul...
/man/stat_fit_tidy.Rd
no_license
kassambara/ggpmisc
R
false
true
2,539
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stat-fit-broom.R \name{stat_fit_tidy} \alias{stat_fit_tidy} \title{Return one row data frame with fitted parameter estimates.} \usage{ stat_fit_tidy(mapping = NULL, data = NULL, geom = "null", method = "lm", method.args = list(formul...
# Single Decoction UI singleDecoctionUI <- function(){ tabPanel("Single Decoction", sidebarLayout( sidebarPanel(width = 4, h3("Inputs:"), fluidRow(width = 4, colu...
/App/Mash/SingleDecoction/SingleDecoctionUI.R
no_license
BenjaminBearce/BK_Brew
R
false
false
3,518
r
# Single Decoction UI singleDecoctionUI <- function(){ tabPanel("Single Decoction", sidebarLayout( sidebarPanel(width = 4, h3("Inputs:"), fluidRow(width = 4, colu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CDFFunctions.R \name{plotCDF} \alias{plotCDF} \title{Title} \usage{ plotCDF(..., realData = NULL, plotPars = NULL, linesPars = NULL) } \arguments{ \item{...}{Parameters for \code{plotCDFValues}} \item{realData}{A data frame or with 2 colums:...
/man/plotCDF.Rd
no_license
Cmell/diffR
R
false
true
732
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CDFFunctions.R \name{plotCDF} \alias{plotCDF} \title{Title} \usage{ plotCDF(..., realData = NULL, plotPars = NULL, linesPars = NULL) } \arguments{ \item{...}{Parameters for \code{plotCDFValues}} \item{realData}{A data frame or with 2 colums:...
#' First variant of M-GRAF model #' #' \code{MGRAF1} returns the estimated common structure Z and subject-specific #' low rank components \eqn{Q_i} and \eqn{\Lambda_i} for multiple undirected #' graphs. #' #' The subject-specific deviation \eqn{D_i} is decomposed into \deqn{D_i = Q_i #' * \Lambda_i * Q_i^{\top},} where...
/R/MGRAF1.R
no_license
cran/CISE
R
false
false
11,798
r
#' First variant of M-GRAF model #' #' \code{MGRAF1} returns the estimated common structure Z and subject-specific #' low rank components \eqn{Q_i} and \eqn{\Lambda_i} for multiple undirected #' graphs. #' #' The subject-specific deviation \eqn{D_i} is decomposed into \deqn{D_i = Q_i #' * \Lambda_i * Q_i^{\top},} where...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/predict.R \name{predict.ranger} \alias{predict.ranger} \title{Ranger prediction} \usage{ \method{predict}{ranger}(object, data = NULL, predict.all = FALSE, num.trees = object$num.trees, type = "response", se.method = "infjack", quantiles ...
/rangerts/man/predict.ranger.Rd
no_license
BenjaminGoehry/BlocRF
R
false
true
4,389
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/predict.R \name{predict.ranger} \alias{predict.ranger} \title{Ranger prediction} \usage{ \method{predict}{ranger}(object, data = NULL, predict.all = FALSE, num.trees = object$num.trees, type = "response", se.method = "infjack", quantiles ...
\name{GRCdata-package} \alias{GRCdata-package} \alias{GRCdata} \docType{package} \title{ Parameter inference and optimal designs for grouped and/or right-censored count data } \description{ This package consists of two main functions: The first function uses a given grouped and/or right-censored grouping scheme and emp...
/man/GRCdata-package.Rd
no_license
cran/GRCdata
R
false
false
2,448
rd
\name{GRCdata-package} \alias{GRCdata-package} \alias{GRCdata} \docType{package} \title{ Parameter inference and optimal designs for grouped and/or right-censored count data } \description{ This package consists of two main functions: The first function uses a given grouped and/or right-censored grouping scheme and emp...
################################ nc_na ################################ ## substitute NA for NC # we asked poeople to mark non-recorded variables with "NC", but this was a mistake. nc_na <- function(x) { if (is.character(x[1])) { x[x == "NC" | x == "nc"] <- NA } return(x) } ################################...
/helper/preprocessing_helper.R
permissive
jkosie/mb1-analysis-public
R
false
false
8,671
r
################################ nc_na ################################ ## substitute NA for NC # we asked poeople to mark non-recorded variables with "NC", but this was a mistake. nc_na <- function(x) { if (is.character(x[1])) { x[x == "NC" | x == "nc"] <- NA } return(x) } ################################...
# Module UI #' @title mod_my_first_module_ui and mod_my_first_module_server #' @description A shiny Module. #' #' @param id shiny id #' @param input internal #' @param output internal #' @param session internal #' #' @rdname mod_my_first_module #' #' @keywords internal #' @export #' @importFrom shiny NS tagList ...
/examples/10-golemexample-master/R/mod_my_first_module.R
permissive
Zen-Reportz/ZenPublish
R
false
false
1,723
r
# Module UI #' @title mod_my_first_module_ui and mod_my_first_module_server #' @description A shiny Module. #' #' @param id shiny id #' @param input internal #' @param output internal #' @param session internal #' #' @rdname mod_my_first_module #' #' @keywords internal #' @export #' @importFrom shiny NS tagList ...
testlist <- list(x = c(1409286143L, 805306146L, -2130706433L, -1L, -160L, 439353343L, 570490879L, -1L, -1L, 450244607L, -14548779L, 16711973L, 30464L, -268435712L, -1L, -15007745L, -13631744L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,...
/diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609963211-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
558
r
testlist <- list(x = c(1409286143L, 805306146L, -2130706433L, -1L, -160L, 439353343L, 570490879L, -1L, -1L, 450244607L, -14548779L, 16711973L, 30464L, -268435712L, -1L, -15007745L, -13631744L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,...
testlist <- list(type = 0L, z = 4.46235150667355e-319) result <- do.call(esreg::G1_fun,testlist) str(result)
/esreg/inst/testfiles/G1_fun/libFuzzer_G1_fun/G1_fun_valgrind_files/1609892916-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
108
r
testlist <- list(type = 0L, z = 4.46235150667355e-319) result <- do.call(esreg::G1_fun,testlist) str(result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rm.R \name{step_rm} \alias{step_rm} \title{General Variable Filter} \usage{ step_rm( recipe, ..., role = NA, trained = FALSE, removals = NULL, skip = FALSE, id = rand_id("rm") ) } \arguments{ \item{recipe}{A recipe object. The s...
/man/step_rm.Rd
permissive
DavisVaughan/recipes
R
false
true
3,016
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rm.R \name{step_rm} \alias{step_rm} \title{General Variable Filter} \usage{ step_rm( recipe, ..., role = NA, trained = FALSE, removals = NULL, skip = FALSE, id = rand_id("rm") ) } \arguments{ \item{recipe}{A recipe object. The s...
### ========================================================================= ### FilterRules objects ### ------------------------------------------------------------------------- setClassUnion("expression_OR_function", c("expression", "function")) setClass("FilterRules", representation(active = "logical"), ...
/R/FilterRules-class.R
no_license
EugOT/S4Vectors
R
false
false
13,761
r
### ========================================================================= ### FilterRules objects ### ------------------------------------------------------------------------- setClassUnion("expression_OR_function", c("expression", "function")) setClass("FilterRules", representation(active = "logical"), ...
main_cols=c("USER_ID","YOB","Gender","Income","HouseholdStatus","EducationLevel","Party") TrainImp = read.csv("pollTrain_imputed.csv") table(TrainImp$YOB) otrain1 = read.csv("train2016.csv") nrow(otrain1) trlab = subset(otrain1$Party,!otrain1$YOB %in% c("2011","2013","2039","1880","1881","1896")) length(trlab) Tr...
/Analytics_Edge/Kaggle_Competition/part_impute.R.r
no_license
lastworden/Statistics
R
false
false
6,750
r
main_cols=c("USER_ID","YOB","Gender","Income","HouseholdStatus","EducationLevel","Party") TrainImp = read.csv("pollTrain_imputed.csv") table(TrainImp$YOB) otrain1 = read.csv("train2016.csv") nrow(otrain1) trlab = subset(otrain1$Party,!otrain1$YOB %in% c("2011","2013","2039","1880","1881","1896")) length(trlab) Tr...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FitAcfCoef.R \name{FitAcfCoef} \alias{FitAcfCoef} \title{Fits an AR1 AutoCorrelation Function Using the Cardano Formula} \usage{ FitAcfCoef(a, b) } \arguments{ \item{a}{Coefficient a : first estimate of the autocorrelation at lag 1.} \item{b...
/man/FitAcfCoef.Rd
no_license
rpkgs/s2dverification
R
false
true
1,391
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FitAcfCoef.R \name{FitAcfCoef} \alias{FitAcfCoef} \title{Fits an AR1 AutoCorrelation Function Using the Cardano Formula} \usage{ FitAcfCoef(a, b) } \arguments{ \item{a}{Coefficient a : first estimate of the autocorrelation at lag 1.} \item{b...
args<-commandArgs(TRUE) file<- args[1] bins<-as.data.frame(read.table(file,header=TRUE)) colnames(bins) input<-args[2] input_bins<-as.data.frame(read.table(input,header=TRUE)) colnames(input_bins) # SL1_213_input-3 BIN SL1_418_input-7 BIN SL1_485_input-12 BIN T5_input-7 BIN T6_input-2 ...
/viz/get_lineplots_bin_TcellK36me3.R
no_license
kgaonkar6/chipseq-analysis
R
false
false
1,654
r
args<-commandArgs(TRUE) file<- args[1] bins<-as.data.frame(read.table(file,header=TRUE)) colnames(bins) input<-args[2] input_bins<-as.data.frame(read.table(input,header=TRUE)) colnames(input_bins) # SL1_213_input-3 BIN SL1_418_input-7 BIN SL1_485_input-12 BIN T5_input-7 BIN T6_input-2 ...
## plot3.R # a vector of classes for the columns mycols <- c(rep("factor", 2), rep("numeric", 7)) # reading the *.txt file from working directory hhpc <- read.csv("data/household_power_consumption.txt", head=T, sep=";", na.strings = "?", colClasses = mycols) # two variable for date limits, min and max, in the specifi...
/plot3.R
no_license
alexcipro/ExData_Plotting1
R
false
false
1,501
r
## plot3.R # a vector of classes for the columns mycols <- c(rep("factor", 2), rep("numeric", 7)) # reading the *.txt file from working directory hhpc <- read.csv("data/household_power_consumption.txt", head=T, sep=";", na.strings = "?", colClasses = mycols) # two variable for date limits, min and max, in the specifi...
#email lindsay olson w/ questions: olsonlindsaya@gmail.com clusteringData$cluster2 <- as.factor(clusteringData$cluster2) plotNames = names(clusteringData) name = c("1", "2") for(i in 1:14){ mypath <- file.path("/Users/lolson/Documents/001_JDP/001_BDIL/006_Projects/14_ParentalStress/kmeansClustering/2Cluster",pa...
/automatePlotting.R
no_license
olsonlindsaya/automated-reg-models
R
false
false
1,598
r
#email lindsay olson w/ questions: olsonlindsaya@gmail.com clusteringData$cluster2 <- as.factor(clusteringData$cluster2) plotNames = names(clusteringData) name = c("1", "2") for(i in 1:14){ mypath <- file.path("/Users/lolson/Documents/001_JDP/001_BDIL/006_Projects/14_ParentalStress/kmeansClustering/2Cluster",pa...
# Filename: mission_launch_multi.R # A script to upload new missions to iButton Thermochron temperature # dataloggers. See the comments below for the additional external software # needed to make this run. This version will loop continuously and upload the # same mission to multiple iButtons so that they all start a...
/mission_launch_multi.R
no_license
mltConsEcol/ibuttons
R
false
false
10,855
r
# Filename: mission_launch_multi.R # A script to upload new missions to iButton Thermochron temperature # dataloggers. See the comments below for the additional external software # needed to make this run. This version will loop continuously and upload the # same mission to multiple iButtons so that they all start a...
### NFL Big Data Bowl 2020-21 # Robert Bernhardt, Andrew Rogan, Daniel Weiss # November 2020 ## User-Defined Functions for Data Visualization # Plot Play-Specific Data ## Data Visualization Preparation Source Function # Required Inputs: TrackingPlayData , input_game , input_play # Outputs: Offense , Defense ...
/Analysis/Functions/visualization_functions.r
no_license
rbernhardt12/Big-Data-Bowl-20-Public
R
false
false
60,379
r
### NFL Big Data Bowl 2020-21 # Robert Bernhardt, Andrew Rogan, Daniel Weiss # November 2020 ## User-Defined Functions for Data Visualization # Plot Play-Specific Data ## Data Visualization Preparation Source Function # Required Inputs: TrackingPlayData , input_game , input_play # Outputs: Offense , Defense ...
summdata <- "ec/newecdata.rds" ecdata <- readRDS(data) png("ec/plot1.png", width = 480, height = 480) hist(ecdata$Global_active_power, main = "Global Active Power", xlab = "Global Active Power (kilowatts)", ylab = "Frequency", col = "red") dev.off()
/plot1.R
no_license
rajathithan/ExData_Plotting1
R
false
false
249
r
summdata <- "ec/newecdata.rds" ecdata <- readRDS(data) png("ec/plot1.png", width = 480, height = 480) hist(ecdata$Global_active_power, main = "Global Active Power", xlab = "Global Active Power (kilowatts)", ylab = "Frequency", col = "red") dev.off()
library(glmnet) mydata = read.table("./TrainingSet/LassoBIC/liver.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.03,family="gaussian",standardize=FALSE) sink('./Model/EN/Lasso/liver/liver_014.txt',append=TRUE) ...
/Model/EN/Lasso/liver/liver_014.R
no_license
leon1003/QSMART
R
false
false
349
r
library(glmnet) mydata = read.table("./TrainingSet/LassoBIC/liver.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.03,family="gaussian",standardize=FALSE) sink('./Model/EN/Lasso/liver/liver_014.txt',append=TRUE) ...
# internal constant phen_names <- c('fam', 'id', 'pheno') #' Read *.phen files #' #' This function reads a standard *.phen file into a tibble. #' It uses readr::read_table2 to do it efficiently. #' GCTA and EMMAX use this format. #' #' @param file Input file (whatever is accepted by readr::read_table2). #' If file as ...
/fuzzedpackages/genio/R/read_phen.R
no_license
akhikolla/testpackages
R
false
false
1,622
r
# internal constant phen_names <- c('fam', 'id', 'pheno') #' Read *.phen files #' #' This function reads a standard *.phen file into a tibble. #' It uses readr::read_table2 to do it efficiently. #' GCTA and EMMAX use this format. #' #' @param file Input file (whatever is accepted by readr::read_table2). #' If file as ...
########################################################################################## # filename: PhDThesis_get-first-sentence-from-title-text.R # Modified from: D:\Now\library_genetics_epidemiology\Chang_PhD_thesis\scripts\PhDThesis99_rename_files_for_thesis.R # program author: Chang # purpose: Get first sentence...
/scripts_master/PhDThesis_get-first-sentence-from-title-text.R
no_license
luenhchang/PhD_reporting-with-SAS-tables
R
false
false
3,930
r
########################################################################################## # filename: PhDThesis_get-first-sentence-from-title-text.R # Modified from: D:\Now\library_genetics_epidemiology\Chang_PhD_thesis\scripts\PhDThesis99_rename_files_for_thesis.R # program author: Chang # purpose: Get first sentence...
imi.t.test.more <- function(data.miss,data.imp0,max.M=500,epsilon,method='mvn', x, y = NULL, alternative='two.sided',mu,paired = FALSE, var.equal = FALSE, conf.level = 0.95,conv.plot=TRUE,successive.valid=3, print.progress=TRUE){ # dis.measure= "p.v...
/R/imi.t.test.more.R
no_license
vahidnassiri/imi
R
false
false
3,561
r
imi.t.test.more <- function(data.miss,data.imp0,max.M=500,epsilon,method='mvn', x, y = NULL, alternative='two.sided',mu,paired = FALSE, var.equal = FALSE, conf.level = 0.95,conv.plot=TRUE,successive.valid=3, print.progress=TRUE){ # dis.measure= "p.v...
# myfile.R #* @get /mean normalMean <- function(samples=10){ data <- rnorm(samples) mean(data) } #* @get /sum addTwo <- function(a, b){ as.numeric(a) + as.numeric(b) }
/myfile.R
no_license
miguel-conde/plumber
R
false
false
176
r
# myfile.R #* @get /mean normalMean <- function(samples=10){ data <- rnorm(samples) mean(data) } #* @get /sum addTwo <- function(a, b){ as.numeric(a) + as.numeric(b) }
abrirArquivo <- function(fn = NULL){ if(is.null(fn)){ setStatusbar('Escolha o arquivo...') fn <- openFileDialog() } if((length(fn) > 0) && file.exists(fn)){ setStatusbar('Carregando carteira...') n <- gtkNotebookGetNPages(nb) for(i in 1:n){ gtkNotebookRemovePage(nb, 0) } if(...
/src/function.R
no_license
juscelino-jr/CandleStudy
R
false
false
10,975
r
abrirArquivo <- function(fn = NULL){ if(is.null(fn)){ setStatusbar('Escolha o arquivo...') fn <- openFileDialog() } if((length(fn) > 0) && file.exists(fn)){ setStatusbar('Carregando carteira...') n <- gtkNotebookGetNPages(nb) for(i in 1:n){ gtkNotebookRemovePage(nb, 0) } if(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/replace.R \name{str_replace_na} \alias{str_replace_na} \title{Turn NA into "NA"} \usage{ str_replace_na(string, replacement = "NA") } \arguments{ \item{string}{Input vector. Either a character vector, or something coercible to one.} \item{re...
/man/str_replace_na.Rd
permissive
tidyverse/stringr
R
false
true
434
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/replace.R \name{str_replace_na} \alias{str_replace_na} \title{Turn NA into "NA"} \usage{ str_replace_na(string, replacement = "NA") } \arguments{ \item{string}{Input vector. Either a character vector, or something coercible to one.} \item{re...
\name{externalFormats} \alias{readHB} \alias{readMM} % \alias{writeHB} \alias{writeMM} \alias{writeMM,CsparseMatrix-method} \alias{writeMM,sparseMatrix-method} \title{Read and write external matrix formats} \description{ Read matrices stored in the Harwell-Boeing or MatrixMarket formats or write \code{\linkS4class{...
/branches/Matrix_1.1-5-branch/man/externalFormats.Rd
no_license
LTLA/Matrix
R
false
false
3,223
rd
\name{externalFormats} \alias{readHB} \alias{readMM} % \alias{writeHB} \alias{writeMM} \alias{writeMM,CsparseMatrix-method} \alias{writeMM,sparseMatrix-method} \title{Read and write external matrix formats} \description{ Read matrices stored in the Harwell-Boeing or MatrixMarket formats or write \code{\linkS4class{...
library(plotly) library(tidyverse) library(readr) # read the data from my folder NHtemp <- read_csv("~/OneDrive/GitHub/NASADatanauts/data/NHtemp.csv", na = "empty", comment = "*") # Pull out the monthly data for each year. Removing 2017 since it has missing data. # Tidy the data, gather the months a...
/R/northernHemipherePlotly.R
permissive
davidmeza1/NASADatanauts
R
false
false
3,518
r
library(plotly) library(tidyverse) library(readr) # read the data from my folder NHtemp <- read_csv("~/OneDrive/GitHub/NASADatanauts/data/NHtemp.csv", na = "empty", comment = "*") # Pull out the monthly data for each year. Removing 2017 since it has missing data. # Tidy the data, gather the months a...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/controlchart.R \name{KRDetect.outliers.controlchart} \alias{KRDetect.outliers.controlchart} \title{Identification of outliers using control charts} \usage{ KRDetect.outliers.controlchart(x, perform.smoothing = TRUE, bandwidth.type = ...
/man/KRDetect.outliers.controlchart.Rd
no_license
cran/envoutliers
R
false
true
7,805
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/controlchart.R \name{KRDetect.outliers.controlchart} \alias{KRDetect.outliers.controlchart} \title{Identification of outliers using control charts} \usage{ KRDetect.outliers.controlchart(x, perform.smoothing = TRUE, bandwidth.type = ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/write.R \name{write.ntk} \alias{write.ntk} \title{Write a SaTScan ntk (network) file} \usage{ write.ntk(x, location, filename, userownames = FALSE) } \arguments{ \item{x}{Your data frame.} \item{location}{Directory location where the file sh...
/man/write.ntk.Rd
no_license
cran/rsatscan
R
false
true
771
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/write.R \name{write.ntk} \alias{write.ntk} \title{Write a SaTScan ntk (network) file} \usage{ write.ntk(x, location, filename, userownames = FALSE) } \arguments{ \item{x}{Your data frame.} \item{location}{Directory location where the file sh...
# Grab user information # Load packages library(twitteR) library(dplyr) library(rjson) library(lubridate) # Load data today <- format(Sys.time(), '%Y-%m-%d') searchstring <- 'microsoft' # Load tweet file (from process_tweets.R) files <- list.files('data',paste0('proc_',searchstring)) files selectedfile <- paste0('da...
/scripts/load_users.R
permissive
dkrathi457/Twitter-Sentiment-PCA
R
false
false
2,730
r
# Grab user information # Load packages library(twitteR) library(dplyr) library(rjson) library(lubridate) # Load data today <- format(Sys.time(), '%Y-%m-%d') searchstring <- 'microsoft' # Load tweet file (from process_tweets.R) files <- list.files('data',paste0('proc_',searchstring)) files selectedfile <- paste0('da...
rankhospital<-function(state, outcome, num="best"){ ## Read outcome data data<-read.csv("outcome-of-care-measures.csv",na.strings="Not Available") outcome<-gsub(" ", ".", outcome) coln<-colnames(data) ##Check that state and outcome are valid if (!any(data$State == state)){ stop("Invalid Sta...
/rprog_data_ProgAssignment3-data/rankhospital.R
no_license
emilliman5/datasciencecoursera
R
false
false
878
r
rankhospital<-function(state, outcome, num="best"){ ## Read outcome data data<-read.csv("outcome-of-care-measures.csv",na.strings="Not Available") outcome<-gsub(" ", ".", outcome) coln<-colnames(data) ##Check that state and outcome are valid if (!any(data$State == state)){ stop("Invalid Sta...
library(tidyverse) library(here) library(DESeq2) synapser::synLogin() syn <- synExtra::synDownloader(here("tempdl"), followLink = TRUE) wd <- here("replicate_analysis") dir.create(wd, recursive = TRUE, showWarnings = FALSE) # set directories, import files ------------------------------------------------ ############...
/analysis/replicate_similarity.R
no_license
clemenshug/erk_senescence
R
false
false
16,233
r
library(tidyverse) library(here) library(DESeq2) synapser::synLogin() syn <- synExtra::synDownloader(here("tempdl"), followLink = TRUE) wd <- here("replicate_analysis") dir.create(wd, recursive = TRUE, showWarnings = FALSE) # set directories, import files ------------------------------------------------ ############...
clime2 <- function (x, lambda = NULL, nlambda = ifelse(is.null(lambda), 100, length(lambda)), lambda.max = 0.8, lambda.min = ifelse(nrow(x) > ncol(x), 1e-04, 0.01), sigma = FALSE, perturb = TRUE, standardize = TRUE, logspaced = TRUE, linsolver = c("primaldual", "simplex"), pdtol ...
/Graph Recovery/clime_kendall.R
no_license
xiangyh/Nonparametric-Graphical-Modeling
R
false
false
7,855
r
clime2 <- function (x, lambda = NULL, nlambda = ifelse(is.null(lambda), 100, length(lambda)), lambda.max = 0.8, lambda.min = ifelse(nrow(x) > ncol(x), 1e-04, 0.01), sigma = FALSE, perturb = TRUE, standardize = TRUE, logspaced = TRUE, linsolver = c("primaldual", "simplex"), pdtol ...
\name{beanplot-package} \alias{beanplot-package} \docType{package} \title{ Visualization via Beanplots (like Boxplot/Stripchart/Violin Plot } \description{ Plots univariate comparison graphs, alternative to boxplot/stripchart/violin plot } \details{ \tabular{ll}{ Package: \tab beanplot\cr Type: \t...
/man/beanplot-package.Rd
no_license
a3cel2/beanplot
R
false
false
993
rd
\name{beanplot-package} \alias{beanplot-package} \docType{package} \title{ Visualization via Beanplots (like Boxplot/Stripchart/Violin Plot } \description{ Plots univariate comparison graphs, alternative to boxplot/stripchart/violin plot } \details{ \tabular{ll}{ Package: \tab beanplot\cr Type: \t...
library("EML") ## ick, create_methods actually uses true slots to get slots and contains slots library("XML") library("xml2") library("purrr") library("dplyr") ## Filepaths assume working directory is package root source("inst/create-package/post_process.R") source("inst/create-package/create_classes.R") classes_fil...
/inst/create-package/create_package.R
no_license
mbjones/reml
R
false
false
10,407
r
library("EML") ## ick, create_methods actually uses true slots to get slots and contains slots library("XML") library("xml2") library("purrr") library("dplyr") ## Filepaths assume working directory is package root source("inst/create-package/post_process.R") source("inst/create-package/create_classes.R") classes_fil...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.R \name{ht} \alias{ht} \title{{Display the top and bottom of a data frame}} \usage{ ht(data, n = 5) } \arguments{ \item{data}{data frame} \item{n}{number of rows to display from head and tail \dontrun{ ht(mtcars) }} } \description{ {...
/man/ht.Rd
no_license
nrkoehler/xyzfuns
R
false
true
374
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.R \name{ht} \alias{ht} \title{{Display the top and bottom of a data frame}} \usage{ ht(data, n = 5) } \arguments{ \item{data}{data frame} \item{n}{number of rows to display from head and tail \dontrun{ ht(mtcars) }} } \description{ {...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/network-tools.r \name{jtt} \alias{jtt} \title{Number of JTTs in a graph} \usage{ jtt(data, from_id, to_id) } \arguments{ \item{data}{data set} \item{from_id}{name of the variable of edge tails} \item{to_id}{name of the variable of edge head...
/man/jtt.Rd
no_license
cran/geomnet
R
false
true
973
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/network-tools.r \name{jtt} \alias{jtt} \title{Number of JTTs in a graph} \usage{ jtt(data, from_id, to_id) } \arguments{ \item{data}{data set} \item{from_id}{name of the variable of edge tails} \item{to_id}{name of the variable of edge head...
library(recommenderlab) library(data.table) #read in the data customer <- fread('target_customers.csv') target_customer <- customer[customer$cluster==1 | customer$cluster==2,] product <- fread('product_table.csv') head(product) transaction <- fread('transaction_table.csv') tran <- transaction[,c('cust_id'...
/recommenderSystem.R
no_license
danieldiii/Marketing-Analytics
R
false
false
2,128
r
library(recommenderlab) library(data.table) #read in the data customer <- fread('target_customers.csv') target_customer <- customer[customer$cluster==1 | customer$cluster==2,] product <- fread('product_table.csv') head(product) transaction <- fread('transaction_table.csv') tran <- transaction[,c('cust_id'...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prism_subset_folders.R \name{prism_subset_folders} \alias{prism_subset_folders} \title{Subsets PRISM folders on the disk} \usage{ prism_subset_folders(type, temp_period, years = NULL, mon = NULL, minDate = NULL, maxDate = NULL, dates = NULL...
/man/prism_subset_folders.Rd
no_license
zejiang-unsw/prism
R
false
true
4,051
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prism_subset_folders.R \name{prism_subset_folders} \alias{prism_subset_folders} \title{Subsets PRISM folders on the disk} \usage{ prism_subset_folders(type, temp_period, years = NULL, mon = NULL, minDate = NULL, maxDate = NULL, dates = NULL...
\name{export2csv} \alias{export2csv} \title{ Exporting descriptives table to plain text (CSV) format } \description{ This function takes the result of \code{createTable} and exports the tables to plain text (CSV) format. } \usage{ export2csv(x, file, which.table="descr", sep=",", nmax = TRUE, header.labels = c(), ...)...
/man/export2csv.Rd
no_license
isubirana/compareGroups
R
false
false
2,112
rd
\name{export2csv} \alias{export2csv} \title{ Exporting descriptives table to plain text (CSV) format } \description{ This function takes the result of \code{createTable} and exports the tables to plain text (CSV) format. } \usage{ export2csv(x, file, which.table="descr", sep=",", nmax = TRUE, header.labels = c(), ...)...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/z2r.r \name{z2r} \alias{z2r} \title{Reverse Fisher's transformation of correlation cofficient to z-score} \usage{ z2r(z) } \description{ Reverse Fisher's transformation of correlation cofficient to z-score }
/man/z2r.Rd
no_license
devincaughey/CaugheyTools
R
false
true
286
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/z2r.r \name{z2r} \alias{z2r} \title{Reverse Fisher's transformation of correlation cofficient to z-score} \usage{ z2r(z) } \description{ Reverse Fisher's transformation of correlation cofficient to z-score }
#' Transform a GCT object in to a long form \code{\link{data.table}} (aka 'melt') #' #' @description Utilizes the \code{\link{data.table::melt}} function to transform the #' matrix into long form. Optionally can include the row and column #' annotations in the transformed \code{\link{data.table}}. #' #' @param ...
/R/utils.R
permissive
minghao2016/cmapR
R
false
false
18,367
r
#' Transform a GCT object in to a long form \code{\link{data.table}} (aka 'melt') #' #' @description Utilizes the \code{\link{data.table::melt}} function to transform the #' matrix into long form. Optionally can include the row and column #' annotations in the transformed \code{\link{data.table}}. #' #' @param ...
#' Supporting function #' #' @importFrom stats toeplitz acfpacf.pacf <- function(x,m){ nx=length(x) r<-acfpacf.acf(x,1) rho=r$acf rho=as.matrix(rho) pr<-matrix(0,1,m) pr[1]=rho[2] for (k in 2:m) {pmat=toeplitz(rho[1:k]) rhovec=rho[2:(k+1)] phi=qr.solve(pmat...
/perARMA/R/acfpacf.pacf.R
no_license
ingted/R-Examples
R
false
false
455
r
#' Supporting function #' #' @importFrom stats toeplitz acfpacf.pacf <- function(x,m){ nx=length(x) r<-acfpacf.acf(x,1) rho=r$acf rho=as.matrix(rho) pr<-matrix(0,1,m) pr[1]=rho[2] for (k in 2:m) {pmat=toeplitz(rho[1:k]) rhovec=rho[2:(k+1)] phi=qr.solve(pmat...
load("evan_enrichments_new.Rdata") source("go_enrichments.R") genes$stable_id = genes$human_protein for (iea in c('incl_iea')) { for (list in c('list7','list8','list9')) { print(list) if (iea == 'incl_iea') { go.data = get("go.hs.iea") } else { go.data = get("go.hs") } data = rea...
/projects/2xmammals/evan_enrichments.R
no_license
gjuggler/greg-ensembl
R
false
false
908
r
load("evan_enrichments_new.Rdata") source("go_enrichments.R") genes$stable_id = genes$human_protein for (iea in c('incl_iea')) { for (list in c('list7','list8','list9')) { print(list) if (iea == 'incl_iea') { go.data = get("go.hs.iea") } else { go.data = get("go.hs") } data = rea...
library(RNetCDF) library(stringr) fillMissVar=function(myMatrix){ naLoc=which(is.na(myMatrix[,,1]),arr.ind=T) for (i in 1:nrow(naLoc)){ longi_index=naLoc[i,1] lati_index=naLoc[i,2] level_search=min(which(!is.na(myMatrix[longi_index,lati_index,]))) myMatrix[longi_index,lati_index,1]=myMatrix[longi_i...
/CDFprocessing.R
no_license
flycat1989/RFinalProject
R
false
false
1,731
r
library(RNetCDF) library(stringr) fillMissVar=function(myMatrix){ naLoc=which(is.na(myMatrix[,,1]),arr.ind=T) for (i in 1:nrow(naLoc)){ longi_index=naLoc[i,1] lati_index=naLoc[i,2] level_search=min(which(!is.na(myMatrix[longi_index,lati_index,]))) myMatrix[longi_index,lati_index,1]=myMatrix[longi_i...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/graph-conversion.R \name{dodgr_to_tidygraph} \alias{dodgr_to_tidygraph} \title{dodgr_to_tidygraph} \usage{ dodgr_to_tidygraph(graph) } \arguments{ \item{graph}{A \code{dodgr} graph} } \value{ The \code{tidygraph} equivalent of the input } \de...
/fuzzedpackages/dodgr/man/dodgr_to_tidygraph.Rd
no_license
akhikolla/testpackages
R
false
true
469
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/graph-conversion.R \name{dodgr_to_tidygraph} \alias{dodgr_to_tidygraph} \title{dodgr_to_tidygraph} \usage{ dodgr_to_tidygraph(graph) } \arguments{ \item{graph}{A \code{dodgr} graph} } \value{ The \code{tidygraph} equivalent of the input } \de...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/exposure-package.R \name{\%>\%} \alias{\%>\%} \title{Pipe operator} \usage{ lhs \%>\% rhs } \description{ Pipe operator } \keyword{internal}
/man/pipe.Rd
no_license
ATFutures/exposure
R
false
true
219
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/exposure-package.R \name{\%>\%} \alias{\%>\%} \title{Pipe operator} \usage{ lhs \%>\% rhs } \description{ Pipe operator } \keyword{internal}
\name{controlled} \alias{controlled} \title{controlled} \usage{ controlled(gate,n,cQubits,tQubit) } \arguments{ \item{gate}{ single qubit gate to create controlled version of } \item{n}{ Number of qubits in the ket, including target, control, and all other qubits} \item{cQubits}{Vector of qubit indices. There...
/man/controlled.Rd
no_license
cran/QuantumOps
R
false
false
949
rd
\name{controlled} \alias{controlled} \title{controlled} \usage{ controlled(gate,n,cQubits,tQubit) } \arguments{ \item{gate}{ single qubit gate to create controlled version of } \item{n}{ Number of qubits in the ket, including target, control, and all other qubits} \item{cQubits}{Vector of qubit indices. There...
source('util.R') sigEpsilon <- function(epsilon) { function(val) { if (val > epsilon) { 1 } else if (val < -epsilon) { -1 } else { 0 } } } set.seed(6) n <- 10 x <- runif(n, min=3, max=6) d <- diff(x) ggplot(data.frame(i = 1:n, x=x), aes(i, x)) + geom_line() + geom_point...
/picExample.R
permissive
bgraf/mt-scripts
R
false
false
1,154
r
source('util.R') sigEpsilon <- function(epsilon) { function(val) { if (val > epsilon) { 1 } else if (val < -epsilon) { -1 } else { 0 } } } set.seed(6) n <- 10 x <- runif(n, min=3, max=6) d <- diff(x) ggplot(data.frame(i = 1:n, x=x), aes(i, x)) + geom_line() + geom_point...
#' Plot network, highlighting communities #' #' In a social network, community-detection algorithms can be used to find #' cliques that are more strongly connected to each other than to the rest #' of the network. This generates a plot similar to sma_plot(), except that #' the largest communities in the network are hig...
/R/community_plot.R
no_license
ccjolley/cRimson
R
false
false
2,944
r
#' Plot network, highlighting communities #' #' In a social network, community-detection algorithms can be used to find #' cliques that are more strongly connected to each other than to the rest #' of the network. This generates a plot similar to sma_plot(), except that #' the largest communities in the network are hig...
# Clean all variables rm(list=ls()) # Set working directory setwd("~/Documentos/Master/courses-master/03_GettingData/project") # Read and gather test data subjectTest <- read.table(file = "UCI HAR Dataset/test/subject_test.txt") activityTest <- read.table(file = "UCI HAR Dataset/test/y_test.txt") dataTest <- read.ta...
/run_analysis.R
no_license
marcosmarva/GettingCleaningData-Coursera
R
false
false
3,217
r
# Clean all variables rm(list=ls()) # Set working directory setwd("~/Documentos/Master/courses-master/03_GettingData/project") # Read and gather test data subjectTest <- read.table(file = "UCI HAR Dataset/test/subject_test.txt") activityTest <- read.table(file = "UCI HAR Dataset/test/y_test.txt") dataTest <- read.ta...
# A plotting R script produced by the REVIGO server at http://revigo.irb.hr/ # If you found REVIGO useful in your work, please cite the following reference: # Supek F et al. "REVIGO summarizes and visualizes long lists of Gene Ontology # terms" PLoS ONE 2011. doi:10.1371/journal.pone.0021800 # ------------------------...
/Rscripts/RevigoBD1CC.R
no_license
aleixyuki/FGP
R
false
false
5,977
r
# A plotting R script produced by the REVIGO server at http://revigo.irb.hr/ # If you found REVIGO useful in your work, please cite the following reference: # Supek F et al. "REVIGO summarizes and visualizes long lists of Gene Ontology # terms" PLoS ONE 2011. doi:10.1371/journal.pone.0021800 # ------------------------...
# Process the UCI HAR Dataset and calculate the average of mean and standard deviation values by subject and activity # Precondition: the UCI HAR Dataset zip file should be unzipped into the working directory if (!dir.exists("./UCI HAR Dataset")) stop("Please unzip the UCI HAR Dataset file into your working directory...
/run_analysis.R
no_license
jmichael1/gettingcleaningdata
R
false
false
2,965
r
# Process the UCI HAR Dataset and calculate the average of mean and standard deviation values by subject and activity # Precondition: the UCI HAR Dataset zip file should be unzipped into the working directory if (!dir.exists("./UCI HAR Dataset")) stop("Please unzip the UCI HAR Dataset file into your working directory...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/splitcombine.R \name{ilply} \alias{ilply} \title{Split an image along axis, apply function, return a list} \usage{ ilply(im, axis, fun, ...) } \arguments{ \item{im}{image} \item{axis}{axis for the split (e.g "c")} \item{fun}{function to app...
/man/ilply.Rd
no_license
anishsingh20/imager
R
false
true
536
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/splitcombine.R \name{ilply} \alias{ilply} \title{Split an image along axis, apply function, return a list} \usage{ ilply(im, axis, fun, ...) } \arguments{ \item{im}{image} \item{axis}{axis for the split (e.g "c")} \item{fun}{function to app...
71a0289d3c827e7014c3f130ee6a7ed1 query05_eequery_1344n.qdimacs 441 1259
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Database/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query05_eequery_1344n/query05_eequery_1344n.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
71
r
71a0289d3c827e7014c3f130ee6a7ed1 query05_eequery_1344n.qdimacs 441 1259
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ped_utils.R \name{print.nucleus} \alias{print.nucleus} \title{S3 methods} \usage{ \method{print}{nucleus}(x, ...) } \arguments{ \item{x}{An object} \item{...}{Not used} } \description{ S3 methods }
/man/print.nucleus.Rd
no_license
cran/pedtools
R
false
true
293
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ped_utils.R \name{print.nucleus} \alias{print.nucleus} \title{S3 methods} \usage{ \method{print}{nucleus}(x, ...) } \arguments{ \item{x}{An object} \item{...}{Not used} } \description{ S3 methods }
############################################################################### # # Project: UVA Projects # Script: server.R # Version: # Created: # Updated: Dec 3, 2015 # Author: RY5T # Copyright University of Virginia, 2014 ############################################################################### library(sh...
/Tools/Shiny/example_1.R
no_license
ryerex/Research_and_Methods
R
false
false
674
r
############################################################################### # # Project: UVA Projects # Script: server.R # Version: # Created: # Updated: Dec 3, 2015 # Author: RY5T # Copyright University of Virginia, 2014 ############################################################################### library(sh...
#' Write gene set file with GMT extension from a list #' #' Write Gene Matrix Transposed (gmt) file from a list. The first column of #' the GMT are gene set names, the second are descriptions, then are genes. #' #' @param gmt.lst List of gene sets. Each element has a gene set \code{name}, \code{description}, and \cod...
/R/write_gmt.R
permissive
jdreyf/ezlimma
R
false
false
970
r
#' Write gene set file with GMT extension from a list #' #' Write Gene Matrix Transposed (gmt) file from a list. The first column of #' the GMT are gene set names, the second are descriptions, then are genes. #' #' @param gmt.lst List of gene sets. Each element has a gene set \code{name}, \code{description}, and \cod...
# Examples of different loess smooths load("matlabplots.Rda") allplots <- unlist(matlabplots, recursive = F) allplots[[1]] allplots[[2]] allplots[[3]] allplots[[4]] allplots[[5]] allplots[[6]] allplots[[7]] allplots[[8]] allplots[[9]] allplots[[10]] allplots[[11]] allplots[[12]] allplots[[13]] allplot...
/test_loess_plots.R
no_license
kaijagahm/BurstSpeed
R
false
false
699
r
# Examples of different loess smooths load("matlabplots.Rda") allplots <- unlist(matlabplots, recursive = F) allplots[[1]] allplots[[2]] allplots[[3]] allplots[[4]] allplots[[5]] allplots[[6]] allplots[[7]] allplots[[8]] allplots[[9]] allplots[[10]] allplots[[11]] allplots[[12]] allplots[[13]] allplot...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nonstdMetrics.R \name{ser} \alias{ser} \title{Non-Standard Evaluation Metrics} \usage{ ser(trues, preds, phi.trues = NULL, ph = NULL, t = 0) } \arguments{ \item{trues}{Target values from a test set of a given data set. Should be a vector and ...
/man/ser.Rd
permissive
Yuanproj/IRon
R
false
true
1,416
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nonstdMetrics.R \name{ser} \alias{ser} \title{Non-Standard Evaluation Metrics} \usage{ ser(trues, preds, phi.trues = NULL, ph = NULL, t = 0) } \arguments{ \item{trues}{Target values from a test set of a given data set. Should be a vector and ...
library(gtrendsR) library(leaflet) library(dplyr) setwd("C:/Users/blake/OneDrive/Stryker Project/Country Leaflet Information Dashboard/Building Leaflet Final Interactive Map/Leaflet Map App") uscities <- read.csv("uscities.csv") MI <- gtrends("Dominos Pizza" ,geo = "US-MI",time = "all" )$interest_by_city usciti...
/GOOGLETRENDSBYCITY.R
no_license
btindol178/Customer-Intelligence-Platform
R
false
false
1,527
r
library(gtrendsR) library(leaflet) library(dplyr) setwd("C:/Users/blake/OneDrive/Stryker Project/Country Leaflet Information Dashboard/Building Leaflet Final Interactive Map/Leaflet Map App") uscities <- read.csv("uscities.csv") MI <- gtrends("Dominos Pizza" ,geo = "US-MI",time = "all" )$interest_by_city usciti...
#Installing packages - one time install.packages("dplyr") install.packages("mvnormtest") install.packages("pwr") install.packages("sm") #### INFM 600 Project #### df<-read.csv("FinalDataset.csv") View(FinalDataset) df4 <- na.omit(FinalDataset) require(dplyr) require(mvnormtest) require(pwr) require(sm) ...
/drafts/TeamPEDS_Manova.R
no_license
annlaurawalker/INFM_600
R
false
false
5,318
r
#Installing packages - one time install.packages("dplyr") install.packages("mvnormtest") install.packages("pwr") install.packages("sm") #### INFM 600 Project #### df<-read.csv("FinalDataset.csv") View(FinalDataset) df4 <- na.omit(FinalDataset) require(dplyr) require(mvnormtest) require(pwr) require(sm) ...
#' Pipe operator #' #' See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details. #' #' @name %>% #' @rdname pipe #' @keywords internal #' @export #' @importFrom magrittr %>% #' @usage lhs \%>\% rhs NULL url <- "https://raw.githubusercontent.com/ishaberry/Covid19Canada/master/cases.csv" iso.location <- data.frame(...
/R/utils.R
permissive
Covid19R/CanadaC19
R
false
false
1,681
r
#' Pipe operator #' #' See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details. #' #' @name %>% #' @rdname pipe #' @keywords internal #' @export #' @importFrom magrittr %>% #' @usage lhs \%>\% rhs NULL url <- "https://raw.githubusercontent.com/ishaberry/Covid19Canada/master/cases.csv" iso.location <- data.frame(...
library(dplyr) library(extrafont) library(waffle) library(patchwork) days_climb <- data.frame( date = seq(as.Date("2020-12-20"), as.Date("2021-04-12"), by="days") ) %>% mutate(label = case_when(date <= Sys.Date() ~ "Days I've spent waiting to climb again", TRUE ~ "Days left until I...
/Comparisons/Day 2 - Pictogram/day2-pictogram.R
no_license
linda-bennett/30-day-chart-challenge
R
false
false
3,047
r
library(dplyr) library(extrafont) library(waffle) library(patchwork) days_climb <- data.frame( date = seq(as.Date("2020-12-20"), as.Date("2021-04-12"), by="days") ) %>% mutate(label = case_when(date <= Sys.Date() ~ "Days I've spent waiting to climb again", TRUE ~ "Days left until I...
library("RPostgreSQL", quiet=TRUE) con <- dbConnect(PostgreSQL(), user="postgres", dbname="desura_data") axis_color <- rgb(0.7,0.7,0.7) primary_color <- "#DD4A4A" default_width <- 1000 default_height <- 600 default_height_half <- 400 colors <- rainbow(8) format_months <- function(months) { strftime(months, "%b %...
/graphs/common.r
no_license
leafo/desura-data
R
false
false
1,328
r
library("RPostgreSQL", quiet=TRUE) con <- dbConnect(PostgreSQL(), user="postgres", dbname="desura_data") axis_color <- rgb(0.7,0.7,0.7) primary_color <- "#DD4A4A" default_width <- 1000 default_height <- 600 default_height_half <- 400 colors <- rainbow(8) format_months <- function(months) { strftime(months, "%b %...
#Set working directory setwd("C:/Users/deschmidt/Desktop/Exploratory Data Analysis") filePath <- "./data/household_power_consumption.txt" #Read in column names columns <- read.table(filePath, sep = ";", na.strings = "?", nrows = 1, stringsAsFactors = FALSE) #Read in only rows from the desired dates myData <-...
/plot4.R
no_license
dschmidt5/ExData_Plotting1
R
false
false
1,665
r
#Set working directory setwd("C:/Users/deschmidt/Desktop/Exploratory Data Analysis") filePath <- "./data/household_power_consumption.txt" #Read in column names columns <- read.table(filePath, sep = ";", na.strings = "?", nrows = 1, stringsAsFactors = FALSE) #Read in only rows from the desired dates myData <-...
#' @title Weighted axial mean #' @description The mean of a weighted axial variable #' @param vec A vector of axis (degrees) #' @param weights A vector of weights of the same length as vec #' @return The mean axis (degrees) and the Pythagorean length #' @export meanaxial <- function(vec,weights=NULL){ if(is.null(weigh...
/R/fn_axialmean.R
no_license
shearwavesplitter/MFASTR
R
false
false
560
r
#' @title Weighted axial mean #' @description The mean of a weighted axial variable #' @param vec A vector of axis (degrees) #' @param weights A vector of weights of the same length as vec #' @return The mean axis (degrees) and the Pythagorean length #' @export meanaxial <- function(vec,weights=NULL){ if(is.null(weigh...
icr <- function (x, ...) UseMethod("icr") icr.formula <- function (formula, data, weights, ..., subset, na.action, contrasts = NULL) { m <- match.call(expand.dots = FALSE) if (is.matrix(eval.parent(m$data))) m$data <- as.data...
/pkg/caret/R/icr.R
no_license
klainfo/caret
R
false
false
3,456
r
icr <- function (x, ...) UseMethod("icr") icr.formula <- function (formula, data, weights, ..., subset, na.action, contrasts = NULL) { m <- match.call(expand.dots = FALSE) if (is.matrix(eval.parent(m$data))) m$data <- as.data...
# This file was generated by Rcpp::compileAttributes # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 .isProbRcpp <- function(prob) { .Call('markovchain_isProb', PACKAGE = 'markovchain', prob) } .isGenRcpp <- function(gen) { .Call('markovchain_isGen', PACKAGE = 'markovchain', gen) } .canonicFormRcpp <...
/R/RcppExports.R
no_license
cryptomanic/markovchain
R
false
false
3,263
r
# This file was generated by Rcpp::compileAttributes # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 .isProbRcpp <- function(prob) { .Call('markovchain_isProb', PACKAGE = 'markovchain', prob) } .isGenRcpp <- function(gen) { .Call('markovchain_isGen', PACKAGE = 'markovchain', gen) } .canonicFormRcpp <...
#' @importFrom magrittr %>% #' @export magrittr::`%>%` # rdname catm # messages() with some of the same syntax as cat(): takes a sep argument and # does not append a newline by default catm <- function(..., sep = " ", appendLF = FALSE) { message(paste(..., sep = sep), appendLF = appendLF) } # used in displaying...
/R/utils.R
no_license
TalkStats/quanteda
R
false
false
7,122
r
#' @importFrom magrittr %>% #' @export magrittr::`%>%` # rdname catm # messages() with some of the same syntax as cat(): takes a sep argument and # does not append a newline by default catm <- function(..., sep = " ", appendLF = FALSE) { message(paste(..., sep = sep), appendLF = appendLF) } # used in displaying...
#` sboost Prediction Function #' #' Make predictions for a feature set based on an sboost classifier. #' #' @param object \emph{sboost_classifier} S3 object output from sboost. #' @param features feature set data.frame. #' @param scores if true, raw scores generated; if false, predictions are generated. #' @para...
/R/predict.R
permissive
cran/sboost
R
false
false
3,230
r
#` sboost Prediction Function #' #' Make predictions for a feature set based on an sboost classifier. #' #' @param object \emph{sboost_classifier} S3 object output from sboost. #' @param features feature set data.frame. #' @param scores if true, raw scores generated; if false, predictions are generated. #' @para...
# Title : TODO # Objective : TODO # Created by: yichin # Created on: 2020/06/23 yichin <- data.frame(1:5, 1:5) x <- 2 for(i in 1:5){ x[i] <- x + i } for (){ }
/arduino_code/test.R
no_license
yichin-weng/environment_sensoro_system
R
false
false
166
r
# Title : TODO # Objective : TODO # Created by: yichin # Created on: 2020/06/23 yichin <- data.frame(1:5, 1:5) x <- 2 for(i in 1:5){ x[i] <- x + i } for (){ }
geom_tallrect <- function ### ggplot2 geom with xmin and xmax aesthetics that covers the entire ### y range. (mapping=NULL, data=NULL, stat="identity", position="identity", ...){ require(proto) require(grid) GeomTallRect <- proto(ggplot2:::GeomRect,{ objname <- "tallrect" required_aes <- c("xmin", "xm...
/R/geom_tallrect.R
no_license
Bhanditz/bams
R
false
false
1,060
r
geom_tallrect <- function ### ggplot2 geom with xmin and xmax aesthetics that covers the entire ### y range. (mapping=NULL, data=NULL, stat="identity", position="identity", ...){ require(proto) require(grid) GeomTallRect <- proto(ggplot2:::GeomRect,{ objname <- "tallrect" required_aes <- c("xmin", "xm...
.fittedW <- function(p,q,fit){ library(locfit) l <- log(q+1) data=data.frame(cbind(p,l)) w_fit <- predict(fit,data) return(w_fit) }
/R/fittedW.R
no_license
lianliu09/QNB
R
false
false
148
r
.fittedW <- function(p,q,fit){ library(locfit) l <- log(q+1) data=data.frame(cbind(p,l)) w_fit <- predict(fit,data) return(w_fit) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/streamSetApi.r \name{streamSet$getPlotAdHoc} \alias{streamSet$getPlotAdHoc} \title{Returns values of attributes for the specified streams over the specified time range suitable for plotting over the number of intervals (typically rep...
/man/streamSet-cash-getPlotAdHoc.Rd
permissive
eddyrene/PI-Web-API-Client-R
R
false
true
2,368
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/streamSetApi.r \name{streamSet$getPlotAdHoc} \alias{streamSet$getPlotAdHoc} \title{Returns values of attributes for the specified streams over the specified time range suitable for plotting over the number of intervals (typically rep...
# one-sample t-test #http://www.stat.columbia.edu/~martin/W2024/R2.pdf x = c(0.593, 0.142, 0.329, 0.691, 0.231, 0.793, 0.519, 0.392, 0.418) t.test(x, alternative="greater", mu=0.3)
/R Codes/Lecture 4. R T test/Lecture 4.1.R. one-sample t-test.R
permissive
hejibo/Psychological-Statistics
R
false
false
182
r
# one-sample t-test #http://www.stat.columbia.edu/~martin/W2024/R2.pdf x = c(0.593, 0.142, 0.329, 0.691, 0.231, 0.793, 0.519, 0.392, 0.418) t.test(x, alternative="greater", mu=0.3)
#### Individual Terms Analysis Code #### ### Written by Matthew Colón ### rm(list = ls()) # Clear the workspace ## Libraries. Note: we should probably use packrat for version control #Use these commands to install RSelenium if needed. Note: you have to install a #Java development kit to make it run. See: #https:...
/individual_terms_analysis.R
no_license
nick-short/AWN-Web-Scraping
R
false
false
3,050
r
#### Individual Terms Analysis Code #### ### Written by Matthew Colón ### rm(list = ls()) # Clear the workspace ## Libraries. Note: we should probably use packrat for version control #Use these commands to install RSelenium if needed. Note: you have to install a #Java development kit to make it run. See: #https:...
% Generated by roxygen2 (4.0.2): do not edit by hand \name{getBMRFilteredFeatures} \alias{getBMRFilteredFeatures} \title{Extract the feature selection results from a benchmark result.} \usage{ getBMRFilteredFeatures(bmr, task.ids = NULL, learner.ids = NULL, as.df = FALSE) } \arguments{ \item{bmr}{[\code{\link{Benchma...
/man/getBMRFilteredFeatures.Rd
no_license
narayana1208/mlr
R
false
false
1,278
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \name{getBMRFilteredFeatures} \alias{getBMRFilteredFeatures} \title{Extract the feature selection results from a benchmark result.} \usage{ getBMRFilteredFeatures(bmr, task.ids = NULL, learner.ids = NULL, as.df = FALSE) } \arguments{ \item{bmr}{[\code{\link{Benchma...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tppDeprecated.R \name{TPP-deprecated} \alias{TPP-deprecated} \alias{tpp2dPlotCCRGoodCurves} \alias{tpp2dPlotCCRAllCurves} \alias{tpp2dPlotCCRSingleCurves} \alias{tpp2dEvalConfigTable} \alias{tpp2dRemoveZeroSias} \alias{tpp2dReplaceColNames} \...
/man/TPP-deprecated.Rd
no_license
SamGG/TPP
R
false
true
1,689
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tppDeprecated.R \name{TPP-deprecated} \alias{TPP-deprecated} \alias{tpp2dPlotCCRGoodCurves} \alias{tpp2dPlotCCRAllCurves} \alias{tpp2dPlotCCRSingleCurves} \alias{tpp2dEvalConfigTable} \alias{tpp2dRemoveZeroSias} \alias{tpp2dReplaceColNames} \...
library(SEERaBomb) ### Name: msd ### Title: Mortality vs years Since Diagnosis ### Aliases: msd ### Keywords: IO ### ** Examples ## Not run: ##D library(SEERaBomb) ##D load("~/data/SEER/mrgd/cancDef.RData") #loads in canc ##D lu=canc%>%filter(cancer=="lung") ##D lu=lu%>%mutate(status=as.numeric(COD>0))%>%select(yr...
/data/genthat_extracted_code/SEERaBomb/examples/msd.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
752
r
library(SEERaBomb) ### Name: msd ### Title: Mortality vs years Since Diagnosis ### Aliases: msd ### Keywords: IO ### ** Examples ## Not run: ##D library(SEERaBomb) ##D load("~/data/SEER/mrgd/cancDef.RData") #loads in canc ##D lu=canc%>%filter(cancer=="lung") ##D lu=lu%>%mutate(status=as.numeric(COD>0))%>%select(yr...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Sensor_Methods.R \name{getE_deriv,redoxSensor-method} \alias{getE_deriv,redoxSensor-method} \title{Get the derivative of the redox potential (dE/dR) for a redox sensor} \usage{ \S4method{getE_deriv}{redoxSensor}(object, R = getR(object)) } \a...
/man/getE_deriv-redoxSensor-method.Rd
permissive
ApfeldLab/SensorOverlord
R
false
true
661
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Sensor_Methods.R \name{getE_deriv,redoxSensor-method} \alias{getE_deriv,redoxSensor-method} \title{Get the derivative of the redox potential (dE/dR) for a redox sensor} \usage{ \S4method{getE_deriv}{redoxSensor}(object, R = getR(object)) } \a...
library(generalCorr) ### Name: silentMtx0 ### Title: Older kernel-causality unanimity score matrix with optional ### control variables ### Aliases: silentMtx0 ### Keywords: SD1, SD2, SD3, SD4, causal correlations criteria, generalized ### ** Examples ## Not run: ##D options(np.messages=FALSE) ##D colnames(mtca...
/data/genthat_extracted_code/generalCorr/examples/silentMtx0.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
702
r
library(generalCorr) ### Name: silentMtx0 ### Title: Older kernel-causality unanimity score matrix with optional ### control variables ### Aliases: silentMtx0 ### Keywords: SD1, SD2, SD3, SD4, causal correlations criteria, generalized ### ** Examples ## Not run: ##D options(np.messages=FALSE) ##D colnames(mtca...
setwd("/Users/ianwhitestone/Documents/git/khp-analytics/analysis/") library(ggplot2) source("helper.R") library(data.table) library(dtplyr) library(dplyr) library(scales) library(zoo) library(RColorBrewer) library(plyr) library(RPostgreSQL) library(lubridate) number_ticks = function(n) {function(limits) pretty(limit...
/analysis/eda.R
permissive
ian-whitestone/khp-analytics
R
false
false
1,243
r
setwd("/Users/ianwhitestone/Documents/git/khp-analytics/analysis/") library(ggplot2) source("helper.R") library(data.table) library(dtplyr) library(dplyr) library(scales) library(zoo) library(RColorBrewer) library(plyr) library(RPostgreSQL) library(lubridate) number_ticks = function(n) {function(limits) pretty(limit...
# osmose2R ---------------------------------------------------------------- # main function, creates 'osmose' class objects osmose2R = function(path=NULL, version="v3r2", species.names=NULL, ...) { if(is.null(path) & interactive()) { path = choose.dir(caption="Select OSMOSE outputs folder") } if(is.n...
/R/osmose2R_package.R
no_license
osmose-model/osmose2R
R
false
false
2,648
r
# osmose2R ---------------------------------------------------------------- # main function, creates 'osmose' class objects osmose2R = function(path=NULL, version="v3r2", species.names=NULL, ...) { if(is.null(path) & interactive()) { path = choose.dir(caption="Select OSMOSE outputs folder") } if(is.n...
library(png) library(pracma) library(zoo) n <- length(list.files("frames2/", "frame.*")) # Number of frames r <- 30.005392 # frame rate ts <- (0:(n-1))/r # time of each index # Your initialization here vect = c() for (i in 1:n) { name <- sprintf("frames2/frame%05d.png", i) frame <- readPNG(name) ...
/Heart-Rate-Determination/jon_resting2.R
no_license
StyledSteezy/DSCI211-Data-Science-I
R
false
false
676
r
library(png) library(pracma) library(zoo) n <- length(list.files("frames2/", "frame.*")) # Number of frames r <- 30.005392 # frame rate ts <- (0:(n-1))/r # time of each index # Your initialization here vect = c() for (i in 1:n) { name <- sprintf("frames2/frame%05d.png", i) frame <- readPNG(name) ...
#matrix are done through matrix(), rbind(), cbind() ?matrix() data<- seq(1,20) matrix(data,5,4) # by default it is column wise matrix(data,5,4,byrow = TRUE) # by default it is column wise #rbind() v1 <- c("hi","how","are","you") v2 <- c(1,2,3,4) v3 <- c(4,2,4,12) rbind(v1,v2,v3) #cbind() v1 <- c("hi","how","ar...
/matrix.R
no_license
Meet619/R-Basics
R
false
false
697
r
#matrix are done through matrix(), rbind(), cbind() ?matrix() data<- seq(1,20) matrix(data,5,4) # by default it is column wise matrix(data,5,4,byrow = TRUE) # by default it is column wise #rbind() v1 <- c("hi","how","are","you") v2 <- c(1,2,3,4) v3 <- c(4,2,4,12) rbind(v1,v2,v3) #cbind() v1 <- c("hi","how","ar...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/runGroups.R \name{runGroups} \alias{runGroups} \title{Runs a comparison of any group of years in the record.} \usage{ runGroups(eList, windowSide, group1firstYear, group1lastYear, group2firstYear, group2lastYear, surfaceStart = NA, surfaceE...
/man/runGroups.Rd
permissive
zac-driscoll/EGRET
R
false
true
8,927
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/runGroups.R \name{runGroups} \alias{runGroups} \title{Runs a comparison of any group of years in the record.} \usage{ runGroups(eList, windowSide, group1firstYear, group1lastYear, group2firstYear, group2lastYear, surfaceStart = NA, surfaceE...