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
############################################################ ## Some functions to load data and compute ROC and AUCs ############################################################ createSubclones <- function(nbClones, len, nBkp) { ### Breakpoints in subclones interval <- 1:(len - 1) u <- numeric(0) minLength <- ...
/inst/Simu_n=24000/00.functions.R
no_license
mpierrejean/c3co
R
false
false
6,016
r
############################################################ ## Some functions to load data and compute ROC and AUCs ############################################################ createSubclones <- function(nbClones, len, nBkp) { ### Breakpoints in subclones interval <- 1:(len - 1) u <- numeric(0) minLength <- ...
# PITF Country Code Maker # Creates 'code' variable to match SFTGCODE in PITF Merge files. # # NOTE: # 1. Target data frame must be named 'data' # 2. Country name var must be named 'name' # 3. Year variable must be named 'year' data$code <- NA data$code[data$name=="Afghanistan"] <- 'AFG' data$code[da...
/pitf_code_maker.R
no_license
liampj/earlywarningproject-statrisk-2014
R
false
false
15,333
r
# PITF Country Code Maker # Creates 'code' variable to match SFTGCODE in PITF Merge files. # # NOTE: # 1. Target data frame must be named 'data' # 2. Country name var must be named 'name' # 3. Year variable must be named 'year' data$code <- NA data$code[data$name=="Afghanistan"] <- 'AFG' data$code[da...
#1. Quina ?s l'estimaci? puntual del temps mitj? que els estudiants dediquen #a l'assignatura en q?esti?? v <- c(107, 131, 116, 123, 142, 91, 93, 102, 105, 135, 120, 97, 122, 103, 124, 117, 141, 128, ...
/E-STATUS 2/B4 Meu/etcs.R
no_license
mcasellas/FIB-PE
R
false
false
1,731
r
#1. Quina ?s l'estimaci? puntual del temps mitj? que els estudiants dediquen #a l'assignatura en q?esti?? v <- c(107, 131, 116, 123, 142, 91, 93, 102, 105, 135, 120, 97, 122, 103, 124, 117, 141, 128, ...
require(data.table) get_lbp <- function(post_data) { lbp <- post_data[,list('Likes per post'=mean(likes), Posts=length(likes), 'Total Likes'=sum(likes)), by='poster'] setkey(lbp, 'poster') lbp }
/app/R/reshaping_tables.R
no_license
NathanDeMaria/FacebookShiny
R
false
false
243
r
require(data.table) get_lbp <- function(post_data) { lbp <- post_data[,list('Likes per post'=mean(likes), Posts=length(likes), 'Total Likes'=sum(likes)), by='poster'] setkey(lbp, 'poster') lbp }
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/Correlation/endometrium.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="mae",alpha=0.6,family="gaussian",standardize=FALSE) sink('./endometrium_068.txt',ap...
/Model/EN/Correlation/endometrium/endometrium_068.R
no_license
esbgkannan/QSMART
R
false
false
360
r
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/Correlation/endometrium.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="mae",alpha=0.6,family="gaussian",standardize=FALSE) sink('./endometrium_068.txt',ap...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/xtable_to_flextable.R \name{as_flextable.xtable} \alias{as_flextable.xtable} \alias{xtable_to_flextable} \title{get a flextable from a xtable object} \usage{ \method{as_flextable}{xtable}( x, text.properties = officer::fp_text(), format...
/man/as_flextable.xtable.Rd
no_license
NewGraphEnvironment/flextable
R
false
true
3,255
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/xtable_to_flextable.R \name{as_flextable.xtable} \alias{as_flextable.xtable} \alias{xtable_to_flextable} \title{get a flextable from a xtable object} \usage{ \method{as_flextable}{xtable}( x, text.properties = officer::fp_text(), format...
# ---- nm_fun ---- me_ <- nm_fun("TEST-drive_mv") nm_ <- nm_fun("TEST-drive_mv", user_run = FALSE) # ---- clean ---- if (CLEAN) { drive_trash(c( nm_("move-files-into-me"), nm_("move-to-folder-shortcut"), nm_("DESC"), nm_("DESC-renamed") )) } # ---- setup ---- if (SETUP) { drive_mkdir(nm_("move-f...
/tests/testthat/test-drive_mv.R
permissive
stjordanis/googledrive
R
false
false
4,562
r
# ---- nm_fun ---- me_ <- nm_fun("TEST-drive_mv") nm_ <- nm_fun("TEST-drive_mv", user_run = FALSE) # ---- clean ---- if (CLEAN) { drive_trash(c( nm_("move-files-into-me"), nm_("move-to-folder-shortcut"), nm_("DESC"), nm_("DESC-renamed") )) } # ---- setup ---- if (SETUP) { drive_mkdir(nm_("move-f...
##################################################################### # 20190922 EJ # # Running stock assessments for WGMG 2018 projects ##################################################################### library(FLa4a) source('../../helper_code/a4a_funs.R') wkdir <- system("pwd", intern=TRUE) #====================...
/state-space/GOMhaddock/a4asca/algorithm.R
no_license
ices-eg/wg_MGWG
R
false
false
2,333
r
##################################################################### # 20190922 EJ # # Running stock assessments for WGMG 2018 projects ##################################################################### library(FLa4a) source('../../helper_code/a4a_funs.R') wkdir <- system("pwd", intern=TRUE) #====================...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/geom-path-line.r \name{geom_line} \alias{geom_line} \title{Connect observations, ordered by x value.} \usage{ geom_line(mapping = NULL, data = NULL, stat = "identity", position = "identity", show_guide = NA, ...) } \arguments{ \item...
/man/geom_line.Rd
no_license
larkery/ggplot2
R
false
false
3,476
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/geom-path-line.r \name{geom_line} \alias{geom_line} \title{Connect observations, ordered by x value.} \usage{ geom_line(mapping = NULL, data = NULL, stat = "identity", position = "identity", show_guide = NA, ...) } \arguments{ \item...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{load_gpkg} \alias{load_gpkg} \title{Load geopackage from tempdir to global environment} \usage{ load_gpkg(file_url, temps = NULL) } \arguments{ \item{file_url}{A string with the file_url address of a geobr dataset} \item{temps}...
/r-package/man/load_gpkg.Rd
no_license
Joaobazzo/geobr
R
false
true
617
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{load_gpkg} \alias{load_gpkg} \title{Load geopackage from tempdir to global environment} \usage{ load_gpkg(file_url, temps = NULL) } \arguments{ \item{file_url}{A string with the file_url address of a geobr dataset} \item{temps}...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/xmu.R \name{xmu_start_value_list} \alias{xmu_start_value_list} \title{Make start values} \usage{ xmu_start_value_list(mean = 1, sd = NA, n = 1) } \arguments{ \item{mean}{the mean start value} \item{sd}{the sd of values} \item{n}{how many to...
/man/xmu_start_value_list.Rd
no_license
qingwending/umx
R
false
true
1,847
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/xmu.R \name{xmu_start_value_list} \alias{xmu_start_value_list} \title{Make start values} \usage{ xmu_start_value_list(mean = 1, sd = NA, n = 1) } \arguments{ \item{mean}{the mean start value} \item{sd}{the sd of values} \item{n}{how many to...
\name{seqinfo} \alias{seqinfo} \alias{seqinfo<-} \alias{seqnames} \alias{seqnames<-} \alias{seqlevels} \alias{seqlevels,ANY-method} \alias{seqlevels<-} \alias{seqlevels<-,ANY-method} \alias{sortSeqlevels} \alias{sortSeqlevels,character-method} \alias{sortSeqlevels,ANY-method} \alias{seqlevelsInUse} \alias{seqlevelsInU...
/man/seqinfo.Rd
no_license
Bioconductor/GenomeInfoDb
R
false
false
16,788
rd
\name{seqinfo} \alias{seqinfo} \alias{seqinfo<-} \alias{seqnames} \alias{seqnames<-} \alias{seqlevels} \alias{seqlevels,ANY-method} \alias{seqlevels<-} \alias{seqlevels<-,ANY-method} \alias{sortSeqlevels} \alias{sortSeqlevels,character-method} \alias{sortSeqlevels,ANY-method} \alias{seqlevelsInUse} \alias{seqlevelsInU...
line.fit=function(spec,linefit,z=NA, FWM=65, plot = F, col='red') { orig_xunit<-spec$xunit if (spec$xunit!='ang') {spec<-xunit.spec(spec,'ang') } if (is.finite(z)==F) {z<-spec$z[1]} if (is.numeric(linefit)==F) { if (is.finite(z)==F) {z<-readline('**** PLEASE PROVIDE A REDSHIFT OF THIS S...
/R/line.fit.R
no_license
lukejdavies/spec.tools
R
false
false
6,178
r
line.fit=function(spec,linefit,z=NA, FWM=65, plot = F, col='red') { orig_xunit<-spec$xunit if (spec$xunit!='ang') {spec<-xunit.spec(spec,'ang') } if (is.finite(z)==F) {z<-spec$z[1]} if (is.numeric(linefit)==F) { if (is.finite(z)==F) {z<-readline('**** PLEASE PROVIDE A REDSHIFT OF THIS S...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/errors.R \name{dfError} \alias{dfError} \title{Dataframe input error handling} \usage{ dfError(asrStructure, dataframeName, dataframe, colnames, inference) } \arguments{ \item{asrStructure}{the named list returned by \code{\link{runASR}}, \co...
/ASR/man/dfError.Rd
no_license
laiso1983/ASR
R
false
true
859
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/errors.R \name{dfError} \alias{dfError} \title{Dataframe input error handling} \usage{ dfError(asrStructure, dataframeName, dataframe, colnames, inference) } \arguments{ \item{asrStructure}{the named list returned by \code{\link{runASR}}, \co...
library(shiny) # load models load("blogs.model.hashed") load("news.model.hashed") load("twitter.model.hashed") # load unigrams load("blogs.unigram.hashed") load("news.unigram.hashed") load("twitter.unigram.hashed") # predictive function predictNextWord <- function(char, model, hash, unigram, uni_hash, clean=TRUE) { ...
/server.R
no_license
HukoJack/Natural_Language_Processing_Project
R
false
false
6,502
r
library(shiny) # load models load("blogs.model.hashed") load("news.model.hashed") load("twitter.model.hashed") # load unigrams load("blogs.unigram.hashed") load("news.unigram.hashed") load("twitter.unigram.hashed") # predictive function predictNextWord <- function(char, model, hash, unigram, uni_hash, clean=TRUE) { ...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 3529 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 3529 c c Input Parameter (command line, file): c input filename QBFLIB/Biere/Counter/cnt14r.qdimacs c output filename /tmp/dcn...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Biere/Counter/cnt14r/cnt14r.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
601
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 3529 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 3529 c c Input Parameter (command line, file): c input filename QBFLIB/Biere/Counter/cnt14r.qdimacs c output filename /tmp/dcn...
#=====================================================================# # This is code to create: colored tables solution for SEG # Authored by and feedback to: mjfrigaard@gmail.com # MIT License # SEG Version: 1.4 #=====================================================================# # create library(tidyverse) libra...
/Code/1.4-DT_formatStyle_RiskCat.R
no_license
quesgensupport/SEG1.3
R
false
false
2,533
r
#=====================================================================# # This is code to create: colored tables solution for SEG # Authored by and feedback to: mjfrigaard@gmail.com # MIT License # SEG Version: 1.4 #=====================================================================# # create library(tidyverse) libra...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/loading_files.R \name{ask_for_csv} \alias{ask_for_csv} \title{Ask the user for the Qualtrics Response Set} \usage{ ask_for_csv(responsesfile, headerrows) } \arguments{ \item{responsesfile}{this is the file path of a CSV response set to a Qual...
/man/ask_for_csv.Rd
no_license
leettran/QualtricsTools
R
false
true
952
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/loading_files.R \name{ask_for_csv} \alias{ask_for_csv} \title{Ask the user for the Qualtrics Response Set} \usage{ ask_for_csv(responsesfile, headerrows) } \arguments{ \item{responsesfile}{this is the file path of a CSV response set to a Qual...
#' Compute confusion matrix on metacells #' #' @param mc_id meta cell object #' @param graph_id graph object #' @param K Knn parameter for filtering graph edges #' #' @export mcell_mc_confusion_mat = function(mc_id, graph_id, K, ignore_mismatch = F) { graph = scdb_cgraph(graph_id) if(is.null(graph)) { stop("MC-ER...
/R/mc_confusion.r
permissive
Chenmengpin/metacell
R
false
false
3,661
r
#' Compute confusion matrix on metacells #' #' @param mc_id meta cell object #' @param graph_id graph object #' @param K Knn parameter for filtering graph edges #' #' @export mcell_mc_confusion_mat = function(mc_id, graph_id, K, ignore_mismatch = F) { graph = scdb_cgraph(graph_id) if(is.null(graph)) { stop("MC-ER...
library(shiny) library(tidyverse) library(shinythemes) # Define UI for application that draws a histogram ui <- fluidPage( theme = shinytheme("cerulean"), # Application title titlePanel("244 Example: Old Faithful Geyser Data"), navbarPage("Here's a main title!", tabPanel("Summ...
/navbarPage_ex/app.R
no_license
molly-williams/esm-244-lab-4
R
false
false
3,200
r
library(shiny) library(tidyverse) library(shinythemes) # Define UI for application that draws a histogram ui <- fluidPage( theme = shinytheme("cerulean"), # Application title titlePanel("244 Example: Old Faithful Geyser Data"), navbarPage("Here's a main title!", tabPanel("Summ...
\name{PlotMarginalsNormalInverseWishart} \alias{PlotMarginalsNormalInverseWishart} \title{Plot the marginals of the normal-inverse-Whishart model. Described in A. Meucci "Risk and Asset Allocation", Springer, 2005} \usage{ PlotMarginalsNormalInverseWishart(Mu_Simul, InvSigma_Simul, Mu_0, T_0, Sigma_0, Nu_0, Legen...
/man/PlotMarginalsNormalInverseWishart.Rd
no_license
runiaruni/Meucci
R
false
false
1,152
rd
\name{PlotMarginalsNormalInverseWishart} \alias{PlotMarginalsNormalInverseWishart} \title{Plot the marginals of the normal-inverse-Whishart model. Described in A. Meucci "Risk and Asset Allocation", Springer, 2005} \usage{ PlotMarginalsNormalInverseWishart(Mu_Simul, InvSigma_Simul, Mu_0, T_0, Sigma_0, Nu_0, Legen...
#' @title Warp a SpatialLines or SpatialLinesDataFrame object according a to cartogram transform #' @description #' Given a \code{SpatialLines} or \code{SpatialLinesDataFrame} object, apply a cartogram transform #' according to the transform grid of a \code{SpatialPolygonsDataFrame} created via \code{quick.carto} #' T...
/getcartr/R/warp.lines.R
no_license
MichaelChirico/getcartr
R
false
false
2,428
r
#' @title Warp a SpatialLines or SpatialLinesDataFrame object according a to cartogram transform #' @description #' Given a \code{SpatialLines} or \code{SpatialLinesDataFrame} object, apply a cartogram transform #' according to the transform grid of a \code{SpatialPolygonsDataFrame} created via \code{quick.carto} #' T...
## data file (df) get a text file df <- "household_power_consumption.txt" ## read text file into a power data file powerdf<-read.table(df, header = FALSE, sep = ";", skip = 1, colClasses = c(rep("character",2), rep("numeric", 7)), na.strings = "?") ## read column names to cnames cnames <- readLines(df, 1) cnames ...
/Ploty01.R
no_license
hyeawon/ExploratoryDataAnalysis
R
false
false
890
r
## data file (df) get a text file df <- "household_power_consumption.txt" ## read text file into a power data file powerdf<-read.table(df, header = FALSE, sep = ";", skip = 1, colClasses = c(rep("character",2), rep("numeric", 7)), na.strings = "?") ## read column names to cnames cnames <- readLines(df, 1) cnames ...
library(testthat) suppressMessages(library(dmaps)) test_check("dmaps")
/tests/testthat.R
permissive
jhaineymilevis/dmaps
R
false
false
72
r
library(testthat) suppressMessages(library(dmaps)) test_check("dmaps")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prep.R \name{marg.snps} \alias{marg.snps} \title{internal function marg.snps} \usage{ marg.snps(d) } \arguments{ \item{d}{snpmod object} } \description{ internal function marg.snps } \author{ Chris Wallace }
/man/marg.snps.Rd
no_license
jennasimit/flashfm
R
false
true
286
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prep.R \name{marg.snps} \alias{marg.snps} \title{internal function marg.snps} \usage{ marg.snps(d) } \arguments{ \item{d}{snpmod object} } \description{ internal function marg.snps } \author{ Chris Wallace }
library(quantreg) options("scipen"=30, "digits"=4) digits.option <- 4 path.data <- 'C:/Users/etna/Desktop/Etienne_work/Data' if (file.exists(file.path(path.data))){ path.data <- path.data }else{ path.data <- '//ulysse/users/echamayou/Bureau/Etienne_work/Data' } path.data.disp <- file.path(path.data, 'data_gaso...
/code_gasoline_france/analysis/analysis_dispersion/pairs/rr_vs_distance_regressions.R
no_license
etiennecha/master_code
R
false
false
5,512
r
library(quantreg) options("scipen"=30, "digits"=4) digits.option <- 4 path.data <- 'C:/Users/etna/Desktop/Etienne_work/Data' if (file.exists(file.path(path.data))){ path.data <- path.data }else{ path.data <- '//ulysse/users/echamayou/Bureau/Etienne_work/Data' } path.data.disp <- file.path(path.data, 'data_gaso...
#------------------------------------------------------------------------------------ # CAR PRICE ASSIGNMENT- LINEAR REGRESSION #------------------------------------------------------------------------------------ #-------------------------------- Loading Libraries -----------------------...
/AutomobilePricePrediction/CarPrice_Assignment.R
no_license
ankush-kr/DataScienceProjects-PGDDS-course
R
false
false
38,145
r
#------------------------------------------------------------------------------------ # CAR PRICE ASSIGNMENT- LINEAR REGRESSION #------------------------------------------------------------------------------------ #-------------------------------- Loading Libraries -----------------------...
#' Convert Custom File #' #' Convert columns of a Custom annotation file into a format #' recognizable by internal functions #' @name waterfall_Custom2anno #' @param x a data frame with columns having values for sample, gene, mutation #' type #' @param label_col Character string specifying the column name of a #' label...
/R/waterfall_Custom2anno.R
permissive
pradyumnasagar/GenVisR
R
false
false
1,485
r
#' Convert Custom File #' #' Convert columns of a Custom annotation file into a format #' recognizable by internal functions #' @name waterfall_Custom2anno #' @param x a data frame with columns having values for sample, gene, mutation #' type #' @param label_col Character string specifying the column name of a #' label...
### R code to edit the .g01 files of HEC_RAS ### Idea is to read in the file (which is a special structured text format) ### and replace the cross-section values with the values we want input_file='./original_hecras/Backup.g01' # HEC_RAS geometry file output_file='with_lidar.g03' output_dir='./modified_hecras/...
/R_editor.R
no_license
grothered/hack_hec
R
false
false
3,788
r
### R code to edit the .g01 files of HEC_RAS ### Idea is to read in the file (which is a special structured text format) ### and replace the cross-section values with the values we want input_file='./original_hecras/Backup.g01' # HEC_RAS geometry file output_file='with_lidar.g03' output_dir='./modified_hecras/...
########################################################## # ########################################################## amyloidPlaqueGenerationFromAll <- function(neurons, plaqueMaximumSize, plaquePullIntraDendrite, ...
/modelFunctions/amyloidPlaqueGenerationFromAll.R
no_license
jadenecke/ACHABM
R
false
false
11,173
r
########################################################## # ########################################################## amyloidPlaqueGenerationFromAll <- function(neurons, plaqueMaximumSize, plaquePullIntraDendrite, ...
#' Create an htmlmail instance #' #' @description must first run gm_auth_configure(path = "support/gmailAPI.json") with respect to the json file from gmail API credential setup (see gmailr). #' @param htmlpath the path of the html content for the email, especially created from mjml app. #' #' @return An environment, wi...
/R/htmlmail.R
no_license
tpemartin/htmlmail
R
false
false
1,418
r
#' Create an htmlmail instance #' #' @description must first run gm_auth_configure(path = "support/gmailAPI.json") with respect to the json file from gmail API credential setup (see gmailr). #' @param htmlpath the path of the html content for the email, especially created from mjml app. #' #' @return An environment, wi...
#' Conversion to numeric #' #' Simply an abbreviation for \code{as.numeric(as.character())} #' #' #' @param x Something to be converted to numeric #' @author Zach Kurtz # @export as.num as.num = function(x) as.numeric(as.character(x)) #' Put LLM vector into a LLM design matrix #' #' Given the output of \code{pop....
/R/design.R
permissive
zkurtz/lllcrc
R
false
false
326,394
r
#' Conversion to numeric #' #' Simply an abbreviation for \code{as.numeric(as.character())} #' #' #' @param x Something to be converted to numeric #' @author Zach Kurtz # @export as.num as.num = function(x) as.numeric(as.character(x)) #' Put LLM vector into a LLM design matrix #' #' Given the output of \code{pop....
#-------------------------------------------------------------------------------# # Objective: Program to get Optimum 'Conservative' PF # # for various cases ... # # a) horizon = 12, 6, 24 (in months) # # b) group = 4 & 4.1 (max individual fund wt 80% & 40%, resp) # # c)...
/conservat.R
no_license
ghosh-icron84/PO
R
false
false
8,563
r
#-------------------------------------------------------------------------------# # Objective: Program to get Optimum 'Conservative' PF # # for various cases ... # # a) horizon = 12, 6, 24 (in months) # # b) group = 4 & 4.1 (max individual fund wt 80% & 40%, resp) # # c)...
#' @name wiot_1995 #' @docType data #' @title WIOD data (2013 Release) for the year 1995 #' @description A WIOT for year 1995 will be loaded into the #' environment. The input-output table data is contained in a list #' with the following items: #' #' \itemize{ #' #' \item matrix \strong{inter}, the square (1...
/R/wiod-data.R
no_license
bquast/wiod
R
false
false
12,891
r
#' @name wiot_1995 #' @docType data #' @title WIOD data (2013 Release) for the year 1995 #' @description A WIOT for year 1995 will be loaded into the #' environment. The input-output table data is contained in a list #' with the following items: #' #' \itemize{ #' #' \item matrix \strong{inter}, the square (1...
#' @title Score the FACIT-AD #' #' @description #' Generates all of the scores of the Functional Assessment of Chronic Illness Therapy - #' Abdominal Discomfort (FACIT-AD, v4) from item responses. #' #' @details #' Given a data frame that includes all of the FACIT-AD (Version 4) items as #' variables, appr...
/FACTscorer/R/sx-scoreFACIT_AD.R
no_license
ingted/R-Examples
R
false
false
7,848
r
#' @title Score the FACIT-AD #' #' @description #' Generates all of the scores of the Functional Assessment of Chronic Illness Therapy - #' Abdominal Discomfort (FACIT-AD, v4) from item responses. #' #' @details #' Given a data frame that includes all of the FACIT-AD (Version 4) items as #' variables, appr...
# exercicio inferencia # 1) Fixe \theta_0 para algum f(x|\theta) theta0 = 2 # 2) criar sequencia de valores para \theta theta = seq(1,5, 0.01) # 3) fixar n e gerar X de X~f(x|\theta) n = 10 x = rexp(n, theta0) # obter L(\theta, x) para da \theta seq lexp - function(x, n, theta){(theta^n)*exp(-theta*...
/inferencia/inferencia-teorema.R
no_license
wyaravms/ufrn-master
R
false
false
1,397
r
# exercicio inferencia # 1) Fixe \theta_0 para algum f(x|\theta) theta0 = 2 # 2) criar sequencia de valores para \theta theta = seq(1,5, 0.01) # 3) fixar n e gerar X de X~f(x|\theta) n = 10 x = rexp(n, theta0) # obter L(\theta, x) para da \theta seq lexp - function(x, n, theta){(theta^n)*exp(-theta*...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ggrepel.R \name{gf_text_repel} \alias{gf_text_repel} \alias{gf_label_repel} \title{Repulsive textual annotations} \usage{ gf_text_repel(object = NULL, gformula = NULL, data = NULL, label, alpha, angle, color, family, fontface, group, hjust,...
/man/gf_text_repel.Rd
no_license
ProjectMOSAIC/ggformulaExtra
R
false
true
10,943
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ggrepel.R \name{gf_text_repel} \alias{gf_text_repel} \alias{gf_label_repel} \title{Repulsive textual annotations} \usage{ gf_text_repel(object = NULL, gformula = NULL, data = NULL, label, alpha, angle, color, family, fontface, group, hjust,...
\name{mult.choice} \alias{mult.choice} \title{ Multiple Choice Items to Binary Responses } \description{ It converts multiple choice items to a matrix of binary responses. } \usage{ mult.choice(data, correct) } \arguments{ \item{data}{ a \code{matrix} or a \code{data.frame} containing the man...
/man/mult.choice.Rd
no_license
cran/ltm
R
false
false
1,055
rd
\name{mult.choice} \alias{mult.choice} \title{ Multiple Choice Items to Binary Responses } \description{ It converts multiple choice items to a matrix of binary responses. } \usage{ mult.choice(data, correct) } \arguments{ \item{data}{ a \code{matrix} or a \code{data.frame} containing the man...
dinvgamma <- function(x, alpha, beta = 1, log = FALSE) { if ((alpha <= 0) | (beta <= 0)) { stop("alpha (shape) and/or beta (scale) parameter negative in dinvgamma().\n") } log.density <- alpha * log(beta) - lgamma(alpha) - (alpha + 1) * log(x) - (beta/x) if (log) { return(log.density) } else return(exp(log.den...
/fuzzedpackages/dmbc/R/utils.R
no_license
akhikolla/testpackages
R
false
false
12,565
r
dinvgamma <- function(x, alpha, beta = 1, log = FALSE) { if ((alpha <= 0) | (beta <= 0)) { stop("alpha (shape) and/or beta (scale) parameter negative in dinvgamma().\n") } log.density <- alpha * log(beta) - lgamma(alpha) - (alpha + 1) * log(x) - (beta/x) if (log) { return(log.density) } else return(exp(log.den...
# This is the code for creating return, given stock list and weights , every rebalancing date ##################################################### Libraries library("xts") library("zoo") library("matrixStats") ############################ Inputs to the code setwd("D:/LFT/Template/tester/R test data/full si...
/all files read_write.R
no_license
VivekVerma25/codingground
R
false
false
997
r
# This is the code for creating return, given stock list and weights , every rebalancing date ##################################################### Libraries library("xts") library("zoo") library("matrixStats") ############################ Inputs to the code setwd("D:/LFT/Template/tester/R test data/full si...
ggplot() [S] mM 1/[S] 1/V 1/Va 1/Vb 0,02 5,00 0,10 0,25 0,22 0,40 2,50 0,06 0,15 0,12 1,00 1,00 0,04 0,09 0,06 2,00 0,50 0,03 0,07 0,04 10,00 0,10 0,02 0,05 0,02 #read bq <- read.csv("C:/Users/CarlosVictor/Downloads/Livro.csv") bq ggplot(data = bq , aes(x = X1..S., y=X1.V), lm(bq))+ geom_point () + geom_line () ...
/Scripts/Grafico-bq1-lista5- pqlicençaoffice.R
no_license
carlosvictor96/UFRJ-Undergraduation
R
false
false
1,983
r
ggplot() [S] mM 1/[S] 1/V 1/Va 1/Vb 0,02 5,00 0,10 0,25 0,22 0,40 2,50 0,06 0,15 0,12 1,00 1,00 0,04 0,09 0,06 2,00 0,50 0,03 0,07 0,04 10,00 0,10 0,02 0,05 0,02 #read bq <- read.csv("C:/Users/CarlosVictor/Downloads/Livro.csv") bq ggplot(data = bq , aes(x = X1..S., y=X1.V), lm(bq))+ geom_point () + geom_line () ...
# Resets the input elements back to their riginal values. # @param ids A vector of character strings representing the input elements' id's. reset_all <- function(ids){ for(i in 1:length(ids)) reset(ids[i]) }
/inst/application/helpers/reset_all.R
no_license
Samantha-Lui/EZRecords
R
false
false
214
r
# Resets the input elements back to their riginal values. # @param ids A vector of character strings representing the input elements' id's. reset_all <- function(ids){ for(i in 1:length(ids)) reset(ids[i]) }
# # function for creating master file for corrected absorbance and fluorescence files # For passing these files into a file that will calculate absorbance and fluorescence indicies # 24 July 2015 # AJ PhD project ################## abseemfilecomp <- function(directoryRaleigh, projectname, directorynoncorabs, filelist_...
/AbsEEMSfilecomp_function.R
no_license
ashjolly/SpecScripts
R
false
false
1,988
r
# # function for creating master file for corrected absorbance and fluorescence files # For passing these files into a file that will calculate absorbance and fluorescence indicies # 24 July 2015 # AJ PhD project ################## abseemfilecomp <- function(directoryRaleigh, projectname, directorynoncorabs, filelist_...
library(shiny) library(ggplot2) library(dplyr) library(grid) shinyServer(function(input, output) { output$plot <- renderPlot({ # Input from the ui inFile <- input$datafile if (is.null(inFile)) return(NULL) data <- read.csv(inFile$datapath, header = TRUE, ...
/server.R
no_license
gpagliuca/surge_calculator
R
false
false
3,625
r
library(shiny) library(ggplot2) library(dplyr) library(grid) shinyServer(function(input, output) { output$plot <- renderPlot({ # Input from the ui inFile <- input$datafile if (is.null(inFile)) return(NULL) data <- read.csv(inFile$datapath, header = TRUE, ...
# @file fitGLMModel.R # # Copyright 2019 Observational Health Data Sciences and Informatics # # This file is part of PatientLevelPrediction # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # ...
/R/FitGLMModel.R
permissive
brcamor/PatientLevelPrediction
R
false
false
6,649
r
# @file fitGLMModel.R # # Copyright 2019 Observational Health Data Sciences and Informatics # # This file is part of PatientLevelPrediction # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # ...
## NOTHING NEW. WORKS THE SAME WAY AS GIVEN EXPAMPLE ABOUT CACHED MEAN ## This function initializes to NULL ## the "mx_inv" variable wich contains the inverse of matrix ## and creates and returns a list of four functions: ## set(new_mx) - updates the original matrix in enviroment and sets "mx_inv" to NULL ## ...
/cachematrix.R
no_license
MGN-Roman/ProgrammingAssignment2
R
false
false
2,078
r
## NOTHING NEW. WORKS THE SAME WAY AS GIVEN EXPAMPLE ABOUT CACHED MEAN ## This function initializes to NULL ## the "mx_inv" variable wich contains the inverse of matrix ## and creates and returns a list of four functions: ## set(new_mx) - updates the original matrix in enviroment and sets "mx_inv" to NULL ## ...
#Creates a special matrix object that cache its inverse makeCacheMatrix <- function(x = matrix()) { ## Initialize the inverse property inverse_mat <- NULL ## A method to set the matrix set <- function(y){ x <<- y inverse_mat <<- NULL } ## A method to get the matrix get <- function() x ...
/cachematrix.R
no_license
vaibhav1741/ProgrammingAssignment2
R
false
false
1,392
r
#Creates a special matrix object that cache its inverse makeCacheMatrix <- function(x = matrix()) { ## Initialize the inverse property inverse_mat <- NULL ## A method to set the matrix set <- function(y){ x <<- y inverse_mat <<- NULL } ## A method to get the matrix get <- function() x ...
#' Run the Shiny Application #' #' This function launches a Shiny App to help R4DS Online Learning Community #' mentors find unanswered questions. #' #' @export run_app <- function(...) { golem::with_golem_options( app = shiny::shinyApp(ui = .ui_main, server = .app_server), golem_opts = list(...) ) }
/R/run_app.R
permissive
jmbuhr/mentordash
R
false
false
314
r
#' Run the Shiny Application #' #' This function launches a Shiny App to help R4DS Online Learning Community #' mentors find unanswered questions. #' #' @export run_app <- function(...) { golem::with_golem_options( app = shiny::shinyApp(ui = .ui_main, server = .app_server), golem_opts = list(...) ) }
#' Mandatory: Reaver Extraction #' #' @description Optional: Function to extract values from multilayer objects for several spatial polygons #' and calculate multiple statistic values with one value per polygone. returns a single data frame. #' @name Mandatory Reaver #' @export Mandatory Reaver #' @param Mandatory i...
/src/Reaver/REAVER_extraction/REAVER_extraction_v1.1/000_Reaver_extraction_v1.1.R
no_license
GeoMOER-Students-Space/Envimaster-Geomorph
R
false
false
3,891
r
#' Mandatory: Reaver Extraction #' #' @description Optional: Function to extract values from multilayer objects for several spatial polygons #' and calculate multiple statistic values with one value per polygone. returns a single data frame. #' @name Mandatory Reaver #' @export Mandatory Reaver #' @param Mandatory i...
library(forecast) ; library(plyr) f_ts.eval.accuracy.lm = function (model.lm = NULL, y = NULL, y.hat = NULL, res = NULL, test = "all", snaive.lag = 1) # calculate accuracy stats for a model of type lm { if (is.null(y.hat)) y.hat = model.lm$fitted if (is.null(y)) y = model.lm$model[[1]] # hope this works!!! ...
/model/ModelFitting/RegressionModelling/03_regression_functions_diagnostics.R
permissive
wellermatt/iri
R
false
false
2,838
r
library(forecast) ; library(plyr) f_ts.eval.accuracy.lm = function (model.lm = NULL, y = NULL, y.hat = NULL, res = NULL, test = "all", snaive.lag = 1) # calculate accuracy stats for a model of type lm { if (is.null(y.hat)) y.hat = model.lm$fitted if (is.null(y)) y = model.lm$model[[1]] # hope this works!!! ...
library(ggplot2) this.dir <- dirname(parent.frame(2)$ofile) setwd(this.dir) data <- read.csv('../salesdata/pairedwithprestige.csv') victorians <- data[data$midcareer >= 1840 & data$midcareer < 1875, ] victorians$reviewed <- as.factor(victorians$reviews > 0) victorians$plotnames = rep('', length(victorians$author)) v...
/chapter3/rplots/C3Fig4victorianfield.R
permissive
ericayhayes/horizon
R
false
false
2,352
r
library(ggplot2) this.dir <- dirname(parent.frame(2)$ofile) setwd(this.dir) data <- read.csv('../salesdata/pairedwithprestige.csv') victorians <- data[data$midcareer >= 1840 & data$midcareer < 1875, ] victorians$reviewed <- as.factor(victorians$reviews > 0) victorians$plotnames = rep('', length(victorians$author)) v...
source('/datascience/projects/statisticallyfit/github/R/RStatistics/FORMULAS.R') library(DescTools) # ----------------------------------------------------------------------------------------------- ################################################################################## ######## χ2, G2 ...
/FORMULAS_haserrors.R
no_license
statisticallyfit/RStatistics
R
false
false
57,649
r
source('/datascience/projects/statisticallyfit/github/R/RStatistics/FORMULAS.R') library(DescTools) # ----------------------------------------------------------------------------------------------- ################################################################################## ######## χ2, G2 ...
# Note: percent map is designed to work with the counties data set # It may not work correctly with other data sets if their row order does # not exactly match the order in which the maps package plots counties percent_map <- function(var, color, legend.title, min, max) { # generate vector of fill colors for map ...
/App/helpers.R
no_license
GavinatorK/Capstone-Project
R
false
false
1,627
r
# Note: percent map is designed to work with the counties data set # It may not work correctly with other data sets if their row order does # not exactly match the order in which the maps package plots counties percent_map <- function(var, color, legend.title, min, max) { # generate vector of fill colors for map ...
# # Copyright (c) Microsoft. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
/R/times.R
permissive
RevolutionAnalytics/foreach
R
false
false
877
r
# # Copyright (c) Microsoft. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { inv <- NULL ## initialize inv as NULL; will hold value of matrix inverse set <- function(y) { x <<- y inv <<- NULL ## } g...
/cachematrix.R
no_license
cautree/ProgrammingAssignment2
R
false
false
1,071
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { inv <- NULL ## initialize inv as NULL; will hold value of matrix inverse set <- function(y) { x <<- y inv <<- NULL ## } g...
\name{agingdata} \alias{agingdata} \docType{data} \title{Montpetit and Bergeman Longitudinal Study on Aging Data} \description{The data consist of 521 cases and 7 variables with 280 of the cases being complete. The variables are Education, Income, Perceived satisfaction of social support, Social coping, Total lif...
/man/agingdata.Rd
no_license
cortrudolph/MissMech
R
false
false
1,410
rd
\name{agingdata} \alias{agingdata} \docType{data} \title{Montpetit and Bergeman Longitudinal Study on Aging Data} \description{The data consist of 521 cases and 7 variables with 280 of the cases being complete. The variables are Education, Income, Perceived satisfaction of social support, Social coping, Total lif...
\name{carHexsticker} \alias{carHexsticker} \title{ View the Official Hex Sticker for the car Package} \description{ Open the official hex sticker for the car package in your browser} \usage{ carHexsticker() } \value{ Used for its side effect of openning the hex sticker for the car package in your browser. ...
/man/carHexsticker.Rd
no_license
jsta/car
R
false
false
439
rd
\name{carHexsticker} \alias{carHexsticker} \title{ View the Official Hex Sticker for the car Package} \description{ Open the official hex sticker for the car package in your browser} \usage{ carHexsticker() } \value{ Used for its side effect of openning the hex sticker for the car package in your browser. ...
#' summary.phenologyout prints the information from a result object. #' @title Print the summary information from a ouput object. #' @author Marc Girondot #' @return None #' @param object An output generated by plot_phenology #' @param ... Not used #' @description The function summary.phenologyout displays the output f...
/phenology/R/summary.phenologyout.R
no_license
ingted/R-Examples
R
false
false
1,335
r
#' summary.phenologyout prints the information from a result object. #' @title Print the summary information from a ouput object. #' @author Marc Girondot #' @return None #' @param object An output generated by plot_phenology #' @param ... Not used #' @description The function summary.phenologyout displays the output f...
#Mini project to predict the churn in Telecom industry rm(list = ls()) setwd("D:/BABI/Predictive_Modelling_M5/Mini_Project") library(readxl) library(caTools) library(rlang) Churn_Predict_Dataset=read_excel("Cellphone.xlsx",2) str(Churn_Predict_Dataset) set.seed(1000) Churn_Predict_Dataset$Churn=as.factor(Churn_Predict_...
/Churn_Prediction.R
no_license
nandy26/Predictive-Modelling
R
false
false
12,895
r
#Mini project to predict the churn in Telecom industry rm(list = ls()) setwd("D:/BABI/Predictive_Modelling_M5/Mini_Project") library(readxl) library(caTools) library(rlang) Churn_Predict_Dataset=read_excel("Cellphone.xlsx",2) str(Churn_Predict_Dataset) set.seed(1000) Churn_Predict_Dataset$Churn=as.factor(Churn_Predict_...
library(cowplot) library(ggplot2) library(GGally) library(nlme) library(car) library(multcomp) library(tidyverse) source('https://raw.githubusercontent.com/MJHeaton/glstools/master/stdres.gls.R') card <- read.table('https://mheaton.byu.edu/Courses/Stat469/Topics/2%20-%20TemporalCorrelation/2%20-%20Longitudinal/HWCaseS...
/Cardiovascular_analysis.R
no_license
jocobtt/Rprojects
R
false
false
3,783
r
library(cowplot) library(ggplot2) library(GGally) library(nlme) library(car) library(multcomp) library(tidyverse) source('https://raw.githubusercontent.com/MJHeaton/glstools/master/stdres.gls.R') card <- read.table('https://mheaton.byu.edu/Courses/Stat469/Topics/2%20-%20TemporalCorrelation/2%20-%20Longitudinal/HWCaseS...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/backup_operations.R \name{backup_delete_backup_vault} \alias{backup_delete_backup_vault} \title{Deletes the backup vault identified by its name} \usage{ backup_delete_backup_vault(BackupVaultName) } \arguments{ \item{BackupVaultName}{[require...
/cran/paws.storage/man/backup_delete_backup_vault.Rd
permissive
paws-r/paws
R
false
true
812
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/backup_operations.R \name{backup_delete_backup_vault} \alias{backup_delete_backup_vault} \title{Deletes the backup vault identified by its name} \usage{ backup_delete_backup_vault(BackupVaultName) } \arguments{ \item{BackupVaultName}{[require...
#!/usr/bin/env Rscript ########################################################################################## # MSKCC CMO # Annotate low-confidence mutation calls ########################################################################################## annotate_maf <- function(maf) { # Add TAG to MAF if...
/filter_low_conf.R
no_license
jharenza/ngs-filters
R
false
false
2,145
r
#!/usr/bin/env Rscript ########################################################################################## # MSKCC CMO # Annotate low-confidence mutation calls ########################################################################################## annotate_maf <- function(maf) { # Add TAG to MAF if...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{logOR} \alias{logOR} \title{calculate pairwise log odds ratios} \usage{ logOR(MBS.case, MBS.ctrl) } \arguments{ \item{MBS.case}{Case Bronze-Standard (BrS) data} \item{MBS.ctrl}{Control Bronze-Standard (BrS) data} } \description...
/man/logOR.Rd
permissive
vjcitn/baker
R
false
true
375
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{logOR} \alias{logOR} \title{calculate pairwise log odds ratios} \usage{ logOR(MBS.case, MBS.ctrl) } \arguments{ \item{MBS.case}{Case Bronze-Standard (BrS) data} \item{MBS.ctrl}{Control Bronze-Standard (BrS) data} } \description...
library(shinydashboard) dashboardPage( dashboardHeader(), dashboardSidebar( sidebarMenu( menuItem("Home", tabName = "dashboard", icon = icon("dashboard")), menuItem("Widgets", tabName = "widgets", icon = icon("th")), fileInput("datafile", "Choose CSV File", ...
/ui.R
no_license
EYRKSHT/ShinyApp
R
false
false
2,442
r
library(shinydashboard) dashboardPage( dashboardHeader(), dashboardSidebar( sidebarMenu( menuItem("Home", tabName = "dashboard", icon = icon("dashboard")), menuItem("Widgets", tabName = "widgets", icon = icon("th")), fileInput("datafile", "Choose CSV File", ...
\name{Crsk} \alias{Crsk} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Create a competing risks object. } \description{ Combines observed time and cause indicator to be a competing risks object. For internal use only. } \usage{ Crsk(t, ic) } %- maybe also 'usage' for other objects d...
/man/Crsk.Rd
no_license
cran/crskdiag
R
false
false
438
rd
\name{Crsk} \alias{Crsk} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Create a competing risks object. } \description{ Combines observed time and cause indicator to be a competing risks object. For internal use only. } \usage{ Crsk(t, ic) } %- maybe also 'usage' for other objects d...
function_fibonacci <- function(x) { if(x==1) { return (0) } if(x==2) { function_fibonacci(x-1) return (1) } if(x>2) { a <- function_fibonacci(x-1) b <- function_fibonacci(x-2) val <- a + b return (val) } }
/r_tests/function_fibonacci.r
no_license
ggaranha/R_tests
R
false
false
251
r
function_fibonacci <- function(x) { if(x==1) { return (0) } if(x==2) { function_fibonacci(x-1) return (1) } if(x>2) { a <- function_fibonacci(x-1) b <- function_fibonacci(x-2) val <- a + b return (val) } }
# Read the data file in. Any field with ? in it is considered to be NA. df.power <- read.csv("household_power_consumption.txt",header=TRUE,sep=";",stringsAsFactors=F, na.strings="?") # Convert the Date field to a date class from a string df.power$Date <- as.Date(df.power$Date,"%d/%m/%Y") #We on...
/plot2.R
no_license
redmage123/ExData_Plotting1
R
false
false
981
r
# Read the data file in. Any field with ? in it is considered to be NA. df.power <- read.csv("household_power_consumption.txt",header=TRUE,sep=";",stringsAsFactors=F, na.strings="?") # Convert the Date field to a date class from a string df.power$Date <- as.Date(df.power$Date,"%d/%m/%Y") #We on...
\name{suma.dos.numeros} \alias{suma.dos.numeros} \title{Suma dos números} \usage{ suma.dos.numeros(x, y) } \description{ Suma dos números. } \examples{ suma.dos.numeros(2,2) suma.dos.numeros(2.5) }
/man/suma.dos.numeros.Rd
no_license
xmezco/jrodriguez
R
false
false
200
rd
\name{suma.dos.numeros} \alias{suma.dos.numeros} \title{Suma dos números} \usage{ suma.dos.numeros(x, y) } \description{ Suma dos números. } \examples{ suma.dos.numeros(2,2) suma.dos.numeros(2.5) }
# plot4.R - Multi-graphics for global active power, voltage, submetering and global reactive power # read data from file data <- read.table("household_power_consumption.txt", sep=";", header=T, colClasses = c(rep('character', 2), rep('numeric', 7)), ...
/plot4.R
no_license
mtolent23/ExData_Plotting1
R
false
false
1,761
r
# plot4.R - Multi-graphics for global active power, voltage, submetering and global reactive power # read data from file data <- read.table("household_power_consumption.txt", sep=";", header=T, colClasses = c(rep('character', 2), rep('numeric', 7)), ...
list.of.packages <- c("shiny", "DT", "colourpicker", "viridis", "RColorBrewer", "shinyWidgets", "rhandsontable") new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] if(length(new.packages)) { install.packages(new.packages, repos='http://cran.us.r-project.org') } if (! "gganatog...
/shiny/ui.R
no_license
neuroconductor/gganatogram
R
false
false
1,844
r
list.of.packages <- c("shiny", "DT", "colourpicker", "viridis", "RColorBrewer", "shinyWidgets", "rhandsontable") new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] if(length(new.packages)) { install.packages(new.packages, repos='http://cran.us.r-project.org') } if (! "gganatog...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/remove_duplicates.R \name{remove_duplicates} \alias{remove_duplicates} \title{Remove duplicate geometries} \usage{ remove_duplicates(x, threshold = 0.00001) } \arguments{ \item{x}{An sf POINT, POLYGON or LINESTRING object} \item{threshold}{A...
/man/remove_duplicates.Rd
no_license
cran/spatialEco
R
false
true
1,157
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/remove_duplicates.R \name{remove_duplicates} \alias{remove_duplicates} \title{Remove duplicate geometries} \usage{ remove_duplicates(x, threshold = 0.00001) } \arguments{ \item{x}{An sf POINT, POLYGON or LINESTRING object} \item{threshold}{A...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/betabin.R \name{plotBBCellFrac} \alias{plotBBCellFrac} \title{Plot cell fraction estimates} \usage{ plotBBCellFrac(xci_dt, xcig = NULL, gene_names = "", color_col = NULL, xist = T) } \arguments{ \item{xci_dt}{A \code{data.table}. The data t...
/man/plotBBCellFrac.Rd
no_license
HaiminLi0/XCIR
R
false
true
1,131
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/betabin.R \name{plotBBCellFrac} \alias{plotBBCellFrac} \title{Plot cell fraction estimates} \usage{ plotBBCellFrac(xci_dt, xcig = NULL, gene_names = "", color_col = NULL, xist = T) } \arguments{ \item{xci_dt}{A \code{data.table}. The data t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/activate.R \name{activate} \alias{activate} \alias{active} \title{Determine the context of subsequent manipulations} \usage{ activate(.data, what) active(x) } \arguments{ \item{.data, x}{A tbl_graph or a grouped_tbl_graph} \item{what}{What ...
/man/activate.Rd
no_license
inambioinfo/tidygraph
R
false
true
996
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/activate.R \name{activate} \alias{activate} \alias{active} \title{Determine the context of subsequent manipulations} \usage{ activate(.data, what) active(x) } \arguments{ \item{.data, x}{A tbl_graph or a grouped_tbl_graph} \item{what}{What ...
testlist <- list(AgeVector = c(-2.35915553327825e-100, 9.77841944261133e-61, -2.62651554523651e-213, -6.21814974741971e+41, -9.71129224057181e-180, 5.95177530988534e-309, -5.36234076745575e+144, -1.06141111182788e-218, 9.59875009861121e-309, 4.8342879869899e+206, -4.73074171454048e-167, 2.2262381097027e-76, -9.1299...
/myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615764402-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
1,877
r
testlist <- list(AgeVector = c(-2.35915553327825e-100, 9.77841944261133e-61, -2.62651554523651e-213, -6.21814974741971e+41, -9.71129224057181e-180, 5.95177530988534e-309, -5.36234076745575e+144, -1.06141111182788e-218, 9.59875009861121e-309, 4.8342879869899e+206, -4.73074171454048e-167, 2.2262381097027e-76, -9.1299...
library(tableone) library(Matching) library(ipw) library(survey) library(MatchIt) data(lalonde) #Fit a propensity score model. Use a logistic regression model, #where the outcome is treatment. Include the 8 confounding #variables in the model as predictors, with no interaction terms or #non-linear terms (s...
/IPTW Causal Analysis Exmaple.R
no_license
Zoe187419/Examples
R
false
false
2,720
r
library(tableone) library(Matching) library(ipw) library(survey) library(MatchIt) data(lalonde) #Fit a propensity score model. Use a logistic regression model, #where the outcome is treatment. Include the 8 confounding #variables in the model as predictors, with no interaction terms or #non-linear terms (s...
if(FALSE) {## a nice idea --- but not working: setOldClass() is fine, ## but then dispatch here only works if you create new("bigz",...) objects ## (though dispatch *does* work for asNumeric(.) -- really just R bug ??? ## see also 'if(FALSE)' in ./bigq.R ## NOTE: %*% is an S4, but *not* an S3 generic...
/R/matrix-prods.R
no_license
barleytea/gmp
R
false
false
4,325
r
if(FALSE) {## a nice idea --- but not working: setOldClass() is fine, ## but then dispatch here only works if you create new("bigz",...) objects ## (though dispatch *does* work for asNumeric(.) -- really just R bug ??? ## see also 'if(FALSE)' in ./bigq.R ## NOTE: %*% is an S4, but *not* an S3 generic...
library(KMsurv) ### Name: hodg ### Title: data from Section 1.10 ### Aliases: hodg ### Keywords: datasets ### ** Examples data(hodg)
/data/genthat_extracted_code/KMsurv/examples/hodg.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
140
r
library(KMsurv) ### Name: hodg ### Title: data from Section 1.10 ### Aliases: hodg ### Keywords: datasets ### ** Examples data(hodg)
#find best custom combination of metrics for pMMI #step 1: import your data from Step4b so it is in your global environment setwd(paste0("~/Documents/R/ASCI/pMMI_newnew/", assemblage, "/")) # screen metrics results3<-read.csv(paste0(assemblage,".results3.csv"), row.names=1, stringsAsFactors = F) results3<-as.data....
/pMMI/Step4bb_iterate.metrics_all.R
no_license
stheroux/ASCI
R
false
false
3,911
r
#find best custom combination of metrics for pMMI #step 1: import your data from Step4b so it is in your global environment setwd(paste0("~/Documents/R/ASCI/pMMI_newnew/", assemblage, "/")) # screen metrics results3<-read.csv(paste0(assemblage,".results3.csv"), row.names=1, stringsAsFactors = F) results3<-as.data....
## Okay so this script should make it so you can go from an unclean Relative abundance 16s dataframe to pretty graphs ## You need the taxonomy seperated out into its seven rows so that you can then filter to only include samples which are defined to the order level. ## Then because a lot of different people helped to m...
/graphics/Pie_Charts_Daniel.R
no_license
Primordial-Haggis/birds_misc_R_Scripts
R
false
false
8,831
r
## Okay so this script should make it so you can go from an unclean Relative abundance 16s dataframe to pretty graphs ## You need the taxonomy seperated out into its seven rows so that you can then filter to only include samples which are defined to the order level. ## Then because a lot of different people helped to m...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/blank_write.R \name{blank.write} \alias{blank.write} \title{Write a blank line to a file; useful for creating a script log} \usage{ blank.write(file, append = TRUE) } \arguments{ \item{file}{Path to a file} \item{append}{TRUE if would like t...
/man/blank.write.Rd
no_license
stas-g/funfun
R
false
true
625
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/blank_write.R \name{blank.write} \alias{blank.write} \title{Write a blank line to a file; useful for creating a script log} \usage{ blank.write(file, append = TRUE) } \arguments{ \item{file}{Path to a file} \item{append}{TRUE if would like t...
#set timezone. un-comment the line for your timezone Sys.setenv(TZ="US/Eastern") #Sys.setenv(TZ="US/Central") #Sys.setenv(TZ="US/Moutain") #Sys.setenv(TZ="US/Pacific") #install knitr to support R Markdown install.packages("knitr") #install RColorBrewer to provide palette for plot colors install.packages("RcolorBrewer...
/RNA_Seq/installDeSeqAndPrereq.R
no_license
gkjhgkjh/BINF6309
R
false
false
785
r
#set timezone. un-comment the line for your timezone Sys.setenv(TZ="US/Eastern") #Sys.setenv(TZ="US/Central") #Sys.setenv(TZ="US/Moutain") #Sys.setenv(TZ="US/Pacific") #install knitr to support R Markdown install.packages("knitr") #install RColorBrewer to provide palette for plot colors install.packages("RcolorBrewer...
os <- "C:/Users/serfk/" #os <- "/Users/se/" CORRECTION_FILE = paste(os,"OneDrive/Thesis/Auswertung/Data Analysis/correction_values.csv",sep="") files <- list.files(path=paste(os,"OneDrive/Thesis/Auswertung/Daten/Eye_Tracking/Corrected/output/error_corrected/only_straight/",sep = ""), pattern="*.txt", full.names=T, r...
/R Scripts/filterAndMergeGlances.R
no_license
SErfkamp/LCT_Data_Analysis
R
false
false
1,365
r
os <- "C:/Users/serfk/" #os <- "/Users/se/" CORRECTION_FILE = paste(os,"OneDrive/Thesis/Auswertung/Data Analysis/correction_values.csv",sep="") files <- list.files(path=paste(os,"OneDrive/Thesis/Auswertung/Daten/Eye_Tracking/Corrected/output/error_corrected/only_straight/",sep = ""), pattern="*.txt", full.names=T, r...
#' Create Azure recommender service #' #' Method for the [AzureRMR::az_resource_group] and [AzureRMR::az_subscription] classes. #' #' @rdname create_rec_service #' @name create_rec_service #' @aliases create_rec_service #' @section Usage: #' ``` #' ## R6 method for class 'az_subscription' #' create_rec_servic...
/fuzzedpackages/SAR/R/onload.R
no_license
akhikolla/testpackages
R
false
false
8,929
r
#' Create Azure recommender service #' #' Method for the [AzureRMR::az_resource_group] and [AzureRMR::az_subscription] classes. #' #' @rdname create_rec_service #' @name create_rec_service #' @aliases create_rec_service #' @section Usage: #' ``` #' ## R6 method for class 'az_subscription' #' create_rec_servic...
library(ape) testtree <- read.tree("5937_8.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="5937_8_unrooted.txt")
/codeml_files/newick_trees_processed/5937_8/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("5937_8.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="5937_8_unrooted.txt")
Italian<-read.csv("/Users/home/Documents/TAMU/stat608/Data/ItalianEdit.csv", header=TRUE) attach(Italian) plot(Italian) m1<-lm(Food~Service + Pct_Liked + Cost) anova(m1) summary(m1) m2<-lm(Food ~ Pct_Liked + Cost) summary(m2) m3<-lm(Food ~ Service) anova(m3) anova(m3, m1) #anova(reduced, full) #By hand, jus...
/Italian.R
no_license
bharathallu/Advanced-Regression-Analysis
R
false
false
970
r
Italian<-read.csv("/Users/home/Documents/TAMU/stat608/Data/ItalianEdit.csv", header=TRUE) attach(Italian) plot(Italian) m1<-lm(Food~Service + Pct_Liked + Cost) anova(m1) summary(m1) m2<-lm(Food ~ Pct_Liked + Cost) summary(m2) m3<-lm(Food ~ Service) anova(m3) anova(m3, m1) #anova(reduced, full) #By hand, jus...
tension.dat = read.table("tension.csv", header = T, sep=",") tension5 = tension.dat[1:5,] barplottension=barplot(tension5$tension, names.arg=1:5, ylim=c(0,180), main="Représentation de la tension des 5 premiers individus", sub...
/exoStat.r
no_license
Nikkunemufr/R
R
false
false
1,668
r
tension.dat = read.table("tension.csv", header = T, sep=",") tension5 = tension.dat[1:5,] barplottension=barplot(tension5$tension, names.arg=1:5, ylim=c(0,180), main="Représentation de la tension des 5 premiers individus", sub...
setwd("E:/project/urine/final/cluster/Figure S11") data <- read.csv('barL6.txt',sep='\t',row.names = 1) map <- as.data.frame(read.csv('hclust-mapping.txt',sep='\t',row.names = 1)) L6.m <- rowMeans(data) data <- data[head(order(L6.m,decreasing = T)),rownames(map)] rownames(data) <- c("Prevotella","Streptococcu...
/Figure_S5.R
no_license
RChGO/UrinaryMicrobiota
R
false
false
1,691
r
setwd("E:/project/urine/final/cluster/Figure S11") data <- read.csv('barL6.txt',sep='\t',row.names = 1) map <- as.data.frame(read.csv('hclust-mapping.txt',sep='\t',row.names = 1)) L6.m <- rowMeans(data) data <- data[head(order(L6.m,decreasing = T)),rownames(map)] rownames(data) <- c("Prevotella","Streptococcu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/predictBvs.R \name{predict.Bvs} \alias{predict.Bvs} \title{Bayesian Model Averaged predictions} \usage{ \method{predict}{Bvs}(object, newdata, n.sim = 10000, ...) } \arguments{ \item{object}{An object of class \code{Bvs}} \item{newdata}{A da...
/man/predict.Bvs.Rd
no_license
comodin19/BayesVarSel
R
false
true
2,572
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/predictBvs.R \name{predict.Bvs} \alias{predict.Bvs} \title{Bayesian Model Averaged predictions} \usage{ \method{predict}{Bvs}(object, newdata, n.sim = 10000, ...) } \arguments{ \item{object}{An object of class \code{Bvs}} \item{newdata}{A da...
# use_todo.R # Inspired by functions like devtools::use_testthat. #' Get going with TodoList package for your project. #' #' @param name Name of TodoList object to generate #' @param file location of csv file storing the list. #' @export use_todo <- function(name = "todo", file = "./todo.csv") { # Check for RStudi...
/R/use_todo.R
no_license
markwh/todoList
R
false
false
2,415
r
# use_todo.R # Inspired by functions like devtools::use_testthat. #' Get going with TodoList package for your project. #' #' @param name Name of TodoList object to generate #' @param file location of csv file storing the list. #' @export use_todo <- function(name = "todo", file = "./todo.csv") { # Check for RStudi...
rm(list=ls()) #PATH ANALYSIS MECAL: ABUNDANCE RESPONSE FOR SUPPLEMENTARY MATERIAL #Plot with PlotPath3.1 (-LAI) (Updated psem) ## Included gaussian spatial autocorrelation library(dplyr) library(tidyr) library(piecewiseSEM) library(nlme) library(MASS) # For correlation structures in glmm library(aod) #library(lme4)...
/Temp/ASP/Path/Spatial_autoc/P1.Path_MECAL_Mixed_sp_ABUNDANCE.R
no_license
Cyril-Milleret/PathAnalysis
R
false
false
20,805
r
rm(list=ls()) #PATH ANALYSIS MECAL: ABUNDANCE RESPONSE FOR SUPPLEMENTARY MATERIAL #Plot with PlotPath3.1 (-LAI) (Updated psem) ## Included gaussian spatial autocorrelation library(dplyr) library(tidyr) library(piecewiseSEM) library(nlme) library(MASS) # For correlation structures in glmm library(aod) #library(lme4)...
############################################################### # Function to Calculate the Likelihood after marginalizing out # lambda - WITH CONSTANTS DROPPED # ############################################################### # Calculate P(N|pi), that is the probability of the data given # given the partition (after m...
/code/model/prop_marg_likelihood.R
no_license
Creagh/ppirmSample
R
false
false
2,383
r
############################################################### # Function to Calculate the Likelihood after marginalizing out # lambda - WITH CONSTANTS DROPPED # ############################################################### # Calculate P(N|pi), that is the probability of the data given # given the partition (after m...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/respiratory-condition.R \name{resp_condition_fun3} \alias{resp_condition_fun3} \title{resp_condition_fun3} \usage{ resp_condition_fun3(DHHGAGE_cont, CCC_091, CCC_91A, CCC_031) } \arguments{ \item{DHHGAGE_cont}{continuous age variable...
/man/resp_condition_fun3.Rd
permissive
cran/cchsflow
R
false
true
2,215
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/respiratory-condition.R \name{resp_condition_fun3} \alias{resp_condition_fun3} \title{resp_condition_fun3} \usage{ resp_condition_fun3(DHHGAGE_cont, CCC_091, CCC_91A, CCC_031) } \arguments{ \item{DHHGAGE_cont}{continuous age variable...
install.packages("revealjs", type = "source") devtools::install_github('yihui/xaringan') devtools::install_github("thomasp85/lime") install.packages("RSNSS") #for nueral nets install.packages("gbm") #gradient boosting install.packages("xgboost") #extreme gradient boosting (paraellel) install.packages("corrplot") instal...
/lime-presentation-jun17/packages-required.R
no_license
boboburo/lime-exploration
R
false
false
344
r
install.packages("revealjs", type = "source") devtools::install_github('yihui/xaringan') devtools::install_github("thomasp85/lime") install.packages("RSNSS") #for nueral nets install.packages("gbm") #gradient boosting install.packages("xgboost") #extreme gradient boosting (paraellel) install.packages("corrplot") instal...
rm(list=ls()) library(doMC) library(xgboost) library(plyr) library(caret) library(pROC) library(dummy) set.seed(13) startTime <- Sys.time() equalSamples <- F scriptName<-ifelse(equalSamples,"XgBoostEqualSamples","XgBoostAllFactors3000RoundsDepth20") set.seed(13) os <- Sys.info()[["sysname"]] nodename <- Sys.info()[["n...
/XgBoostCV.R
no_license
tsuresh83/KaggleSpringLeafMarketingChallenge
R
false
false
17,032
r
rm(list=ls()) library(doMC) library(xgboost) library(plyr) library(caret) library(pROC) library(dummy) set.seed(13) startTime <- Sys.time() equalSamples <- F scriptName<-ifelse(equalSamples,"XgBoostEqualSamples","XgBoostAllFactors3000RoundsDepth20") set.seed(13) os <- Sys.info()[["sysname"]] nodename <- Sys.info()[["n...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/score2adjust.R \name{score2adjust} \alias{score2adjust} \title{Convert neuropsychological test scores to demographically adjusted norms.} \usage{ score2adjust( data = NULL, test.score = NULL, group.id = NULL, control.id = NULL, all....
/man/score2adjust.Rd
no_license
cran/test2norm
R
false
true
4,518
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/score2adjust.R \name{score2adjust} \alias{score2adjust} \title{Convert neuropsychological test scores to demographically adjusted norms.} \usage{ score2adjust( data = NULL, test.score = NULL, group.id = NULL, control.id = NULL, all....
library(ggplot2) library(extrafont) library(scales) library(grid) loadfonts(device = "win") setwd("D:/Lab/OA/Pn_OA") tes <- read.table('./Pn_total_genome_compare_te.txt', header = T, sep = '\t') head(tes) tes$te_type ggplot(tes, aes(reorder(spp, +order), percentage, fill=reorder(te_type, -pos)))+ geom_bar...
/codes/TEdistribution.R
no_license
lsoda/Pnana_Methylation
R
false
false
1,127
r
library(ggplot2) library(extrafont) library(scales) library(grid) loadfonts(device = "win") setwd("D:/Lab/OA/Pn_OA") tes <- read.table('./Pn_total_genome_compare_te.txt', header = T, sep = '\t') head(tes) tes$te_type ggplot(tes, aes(reorder(spp, +order), percentage, fill=reorder(te_type, -pos)))+ geom_bar...
### Results and Analysis for CGR 202002 ### library(tidyverse) library(lmtest) library(sandwich) library(plm) name_script_file <- "CGR_202001_equity_alt.R" source(name_script_file, echo = F) #Compute diversification using original daily index data summ_stat_div <- apply(Div_ind_full_wide[, - 1], 2, summary) #Compute...
/CGR_202001_equity_alt_results.R
permissive
abhinavananddwivedi/CGR_201910_data_2017
R
false
false
21,911
r
### Results and Analysis for CGR 202002 ### library(tidyverse) library(lmtest) library(sandwich) library(plm) name_script_file <- "CGR_202001_equity_alt.R" source(name_script_file, echo = F) #Compute diversification using original daily index data summ_stat_div <- apply(Div_ind_full_wide[, - 1], 2, summary) #Compute...
test_summary <- model_cluster_assignments %>% sample_n(1000) %>% group_by(cluster) %>% summarise(count = n()) %>% mutate(p = count / sum(count)) %>% arrange(p) %>% mutate(Hub = LETTERS[sequence(n())] %>% as_factor()) %>% print() #fc8d59 #red #ffffbf #yellow #91cf60 #green colors <- c("Normal" = "#91c...
/ggplot_testing.R
permissive
kputschko/cs-realtime
R
false
false
1,862
r
test_summary <- model_cluster_assignments %>% sample_n(1000) %>% group_by(cluster) %>% summarise(count = n()) %>% mutate(p = count / sum(count)) %>% arrange(p) %>% mutate(Hub = LETTERS[sequence(n())] %>% as_factor()) %>% print() #fc8d59 #red #ffffbf #yellow #91cf60 #green colors <- c("Normal" = "#91c...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/total_visits_batch.R \name{total_visits_batch} \alias{total_visits_batch} \title{Accepts multiple tiny.cc short urls and returns their total visits} \usage{ total_visits_batch(shortURLs) } \arguments{ \item{shortURLs}{vector, the vector of sh...
/man/total_visits_batch.Rd
no_license
ottlngr/tinycc
R
false
true
675
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/total_visits_batch.R \name{total_visits_batch} \alias{total_visits_batch} \title{Accepts multiple tiny.cc short urls and returns their total visits} \usage{ total_visits_batch(shortURLs) } \arguments{ \item{shortURLs}{vector, the vector of sh...
library(data.table) # Zadanie 1 ------------------------------------------------------------------------------------------------------- # Stwórz następujące wektory zawierające 10^5 elementów każdy: # # - `toa` z rozkładu jednostajnego o wartościach pomiędzy 100 i 150000; # - `principal` jako losowa część...
/ListyZadan/01_ListaRozwiazania.R
no_license
ArekSobol/Lab2020
R
false
false
7,809
r
library(data.table) # Zadanie 1 ------------------------------------------------------------------------------------------------------- # Stwórz następujące wektory zawierające 10^5 elementów każdy: # # - `toa` z rozkładu jednostajnego o wartościach pomiędzy 100 i 150000; # - `principal` jako losowa część...