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
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # # úkony - rozdělené na prioritní / vše: # k datu # počet agend # % agend s úkony = hotovo # počet úkonů # ...
/app.R
no_license
trusinas/shiny_ukony
R
false
false
8,030
r
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # # úkony - rozdělené na prioritní / vše: # k datu # počet agend # % agend s úkony = hotovo # počet úkonů # ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ace2fastq-package.R \docType{package} \name{ace2fastq} \alias{ace2fastq} \title{ace2fastq} \description{ The package provides a function that converts ".ace" files (ABI Sanger capillary sequence assembly files) to standard ".fastq" files. Th...
/man/ace2fastq.Rd
no_license
c5sire/ace2fastq
R
false
true
727
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ace2fastq-package.R \docType{package} \name{ace2fastq} \alias{ace2fastq} \title{ace2fastq} \description{ The package provides a function that converts ".ace" files (ABI Sanger capillary sequence assembly files) to standard ".fastq" files. Th...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/drugDbInterface.R \name{whichPaths} \alias{whichPaths} \title{whichPaths} \usage{ whichPaths(pathList, geneList, STUDY) } \arguments{ \item{pathList}{the set of pathways to be selected from} \item{geneList}{the list of genes} \item{...
/packageDir/man/whichPaths.Rd
no_license
stochasticTreat/pathLayerDistributionVersion2
R
false
false
462
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/drugDbInterface.R \name{whichPaths} \alias{whichPaths} \title{whichPaths} \usage{ whichPaths(pathList, geneList, STUDY) } \arguments{ \item{pathList}{the set of pathways to be selected from} \item{geneList}{the list of genes} \item{...
phantom_run <- function(args, wait = TRUE, quiet = FALSE) { phantom_bin <- find_phantom(quiet = quiet) # Handle missing phantomjs if (is.null(phantom_bin)) return(NULL) # Make sure args is a char vector args <- as.character(args) p <- callr::process$new( phantom_bin, args = args, stdout = "|"...
/R/utils.R
no_license
blakcjack/webshot
R
false
false
13,773
r
phantom_run <- function(args, wait = TRUE, quiet = FALSE) { phantom_bin <- find_phantom(quiet = quiet) # Handle missing phantomjs if (is.null(phantom_bin)) return(NULL) # Make sure args is a char vector args <- as.character(args) p <- callr::process$new( phantom_bin, args = args, stdout = "|"...
#check if perpare data is avaible getData <- function() { if(!file.exists("./data/preparedData.rds")){loadData()} return (readRDS(file = "./data/preparedData.rds")) } #load and prepare data loadData <- function() { ##IF NECESSARY ./DATA FILE DOES NOT EXIST THEN CREATE IT if(!file.exists("./data")){dir.create("....
/prepareData.R
no_license
sschmiech/ExData_Plotting1
R
false
false
1,325
r
#check if perpare data is avaible getData <- function() { if(!file.exists("./data/preparedData.rds")){loadData()} return (readRDS(file = "./data/preparedData.rds")) } #load and prepare data loadData <- function() { ##IF NECESSARY ./DATA FILE DOES NOT EXIST THEN CREATE IT if(!file.exists("./data")){dir.create("....
\name{inpboxc} \alias{inpboxc} \title{Input Box with one combo box} \description{Input box for selection from a single list} \usage{inpboxc(vlabel, vcombo, inp)} \arguments{ \item{vlabel }{character vector with the text label of the box} \item{vcombo }{character vector with the text label of the combo} \i...
/man/inpboxc.Rd
no_license
cran/MenuCollection
R
false
false
888
rd
\name{inpboxc} \alias{inpboxc} \title{Input Box with one combo box} \description{Input box for selection from a single list} \usage{inpboxc(vlabel, vcombo, inp)} \arguments{ \item{vlabel }{character vector with the text label of the box} \item{vcombo }{character vector with the text label of the combo} \i...
#load required libaries library(dplyr) library(ggplot2) library(scales) library(data.table) #Read data NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") scc.vehicles <- SCC[grep("Mobile.*Vehicles", SCC$EI.Sector), ]; # Pattern match mobile vehicles in SCC description scc.vehicle...
/Plot6.R
no_license
merzoah/Peer-graded-Assignment-Course-Project-2
R
false
false
2,165
r
#load required libaries library(dplyr) library(ggplot2) library(scales) library(data.table) #Read data NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") scc.vehicles <- SCC[grep("Mobile.*Vehicles", SCC$EI.Sector), ]; # Pattern match mobile vehicles in SCC description scc.vehicle...
# BIF705 # Lab 5 # 14 February 2018 # This lab can be done in groups of 2-3. Include a comment below this header listing the names of the students who contributed. Each of you need to submit a copy of this lab via MySeneca. # ---------------------------------------------------------------------- # PART ONE: GENETIC AS...
/Genetic_associations.R
no_license
LPHOUTHAVONGSY/Bioinformatics
R
false
false
8,075
r
# BIF705 # Lab 5 # 14 February 2018 # This lab can be done in groups of 2-3. Include a comment below this header listing the names of the students who contributed. Each of you need to submit a copy of this lab via MySeneca. # ---------------------------------------------------------------------- # PART ONE: GENETIC AS...
library('foreign') d <- read.spss("data2.sav" , to.data.frame = T ) d$income = d$v353M_ppp ## my home country v255 d[ !( d$v255 %in% c('yes', 'no') ) , ] <- NA ## spouse home country d[ !( d$v342 %in% c('yes', 'no') ) , ] <- NA d$imigrant <- as.integer( d$v342 ) + as.integer( d$v255 ) - 2 ## education level d$com...
/regression.r
permissive
matnel/discriminatory-machinelearning
R
false
false
1,125
r
library('foreign') d <- read.spss("data2.sav" , to.data.frame = T ) d$income = d$v353M_ppp ## my home country v255 d[ !( d$v255 %in% c('yes', 'no') ) , ] <- NA ## spouse home country d[ !( d$v342 %in% c('yes', 'no') ) , ] <- NA d$imigrant <- as.integer( d$v342 ) + as.integer( d$v255 ) - 2 ## education level d$com...
require(rgdal) require(RODBC) library(tidyverse) library(IRlibrary) library(openxlsx) DO_data <- function(database) { print("Fetch DO data from IR database") #connect to IR database view as a general user # import Temperature data IR.sql <- odbcConnect(database) # Get data from IR database where ...
/Parameters/DO/fun_DO_data.R
no_license
TravisPritchardODEQ/IR2018
R
false
false
2,100
r
require(rgdal) require(RODBC) library(tidyverse) library(IRlibrary) library(openxlsx) DO_data <- function(database) { print("Fetch DO data from IR database") #connect to IR database view as a general user # import Temperature data IR.sql <- odbcConnect(database) # Get data from IR database where ...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/caseUtils.R \name{getCrimeSeries} \alias{getCrimeSeries} \title{Generate a list of offenders and their associated crime series.} \usage{ getCrimeSeries(offenderID, offenderTable, restrict = NULL, show.pb = FALSE) } \arguments{...
/man/getCrimeSeries.Rd
no_license
cran/crimelinkage
R
false
false
1,201
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/caseUtils.R \name{getCrimeSeries} \alias{getCrimeSeries} \title{Generate a list of offenders and their associated crime series.} \usage{ getCrimeSeries(offenderID, offenderTable, restrict = NULL, show.pb = FALSE) } \arguments{...
####======= plotting uso do solo por UPH - dados da ANA ============ ##================== Talita - 05/07/2020 =======================#### # loading pck #### library(rgdal) library(raster) library(rgeos) library(plyr) library(ggplot2) library(gridExtra) # Loading shp file #### guandu <- readOGR(dsn = "./Data/USO_ANA",...
/R_Scripts/plots.R
no_license
Projeto-BHRD-INMA/UPH
R
false
false
4,482
r
####======= plotting uso do solo por UPH - dados da ANA ============ ##================== Talita - 05/07/2020 =======================#### # loading pck #### library(rgdal) library(raster) library(rgeos) library(plyr) library(ggplot2) library(gridExtra) # Loading shp file #### guandu <- readOGR(dsn = "./Data/USO_ANA",...
#p=rep(0,200) p[1]=10 for(j in 2:200){ a=runif(1,-1,1) if(a<0){ p[j]=p[j-1]-1 }else{ p[j]=p[j-1]+1 } plot(p,type ='l',col='blue') } #Usando rbin# p=rep(0,200) p[1]=10 for(j in 2:200){ a=rbinom(1,1,0.5) if(a==0) { p[j]=p[j-1]-1 }else{ p[j]=p[j-1]+1 } plot(p,type ='l',col='blue') }
/Caminata aleatoria.R
no_license
AdeAlonso/Modelos-discretos
R
false
false
317
r
#p=rep(0,200) p[1]=10 for(j in 2:200){ a=runif(1,-1,1) if(a<0){ p[j]=p[j-1]-1 }else{ p[j]=p[j-1]+1 } plot(p,type ='l',col='blue') } #Usando rbin# p=rep(0,200) p[1]=10 for(j in 2:200){ a=rbinom(1,1,0.5) if(a==0) { p[j]=p[j-1]-1 }else{ p[j]=p[j-1]+1 } plot(p,type ='l',col='blue') }
"robustd.t" <- function(X, dfreq=FALSE, vt, vm="M0", vh=list("Chao"), vtheta=2, neg=TRUE) { ######################################################################################## # Validation des arguments fournis en entree et changement de leur forme si necessaire ################################################...
/R/robustd.t.r
no_license
cran/Rcapture
R
false
false
20,570
r
"robustd.t" <- function(X, dfreq=FALSE, vt, vm="M0", vh=list("Chao"), vtheta=2, neg=TRUE) { ######################################################################################## # Validation des arguments fournis en entree et changement de leur forme si necessaire ################################################...
\name{spc.rubberband} \alias{spc.rubberband} \title{Rubberband baseline correction} \usage{ spc.rubberband(spc, ..., upper = FALSE, noise = 0, spline = TRUE) } \arguments{ \item{spc}{hyperSpec object} \item{...}{further parameters handed to \code{\link[stats]{smooth.spline}}} \item{upper}{logical indica...
/man/spc-rubberband.Rd
no_license
fornasaros/hyperSpec
R
false
false
1,172
rd
\name{spc.rubberband} \alias{spc.rubberband} \title{Rubberband baseline correction} \usage{ spc.rubberband(spc, ..., upper = FALSE, noise = 0, spline = TRUE) } \arguments{ \item{spc}{hyperSpec object} \item{...}{further parameters handed to \code{\link[stats]{smooth.spline}}} \item{upper}{logical indica...
#' @title Refine Peaks with GC Effects #' #' @description #' This function refines the ranks (i.e. significance/pvalue) of #' pre-determined peaks by potential GC effects. These peaks can be #' obtained from other peak callers, e.g. MACS or SPP. #' #' @param coverage A list object returned by function \code{read5endCov...
/R/refinePeaks.r
no_license
jeffmgranja/gcapc
R
false
false
9,528
r
#' @title Refine Peaks with GC Effects #' #' @description #' This function refines the ranks (i.e. significance/pvalue) of #' pre-determined peaks by potential GC effects. These peaks can be #' obtained from other peak callers, e.g. MACS or SPP. #' #' @param coverage A list object returned by function \code{read5endCov...
## # File upload page ## tp_fileupload <- tabPanel( "Admin", fluidRow( column( width = 12, shypka.ddiv(tags$h3(class = "block_title", "Upload and Download"), color = "rgba(105,105,105,1)"), tags$br(), downloadButton(class = "btn-primary", "file_d", "Download Current Schedule"), ...
/iUI/fileupload.R
no_license
x2007tro/EventCal
R
false
false
477
r
## # File upload page ## tp_fileupload <- tabPanel( "Admin", fluidRow( column( width = 12, shypka.ddiv(tags$h3(class = "block_title", "Upload and Download"), color = "rgba(105,105,105,1)"), tags$br(), downloadButton(class = "btn-primary", "file_d", "Download Current Schedule"), ...
#' The likelihood function factory #' #' @description This encapsulates all the data the likelihood function needs #' to run into a single environment, and still fits #' into a slightly modified outbreaker2 which allows #' for i to be passed into the custom genetic #' likelihood function. #' this returns a function tha...
/R/likelihood_function_factory.R
no_license
andersgs/transtreesampler
R
false
false
1,084
r
#' The likelihood function factory #' #' @description This encapsulates all the data the likelihood function needs #' to run into a single environment, and still fits #' into a slightly modified outbreaker2 which allows #' for i to be passed into the custom genetic #' likelihood function. #' this returns a function tha...
library(tidyverse) library(ggplot2) setwd("C:/Users/NYUCM Loaner Access/Documents/GitHub/ling_in_loop/scripts") set.seed(42) anon_codes = read.csv("../../../SECRET/ling_in_loop_SECRET/anonymized_id_links.csv") round = "round5" # change this value each round LotS<-NULL LitL<-NULL LotS_files = list.files(paste0(".....
/scripts/for_mturk/check_heuristic_distributions.R
no_license
Alicia-Parrish/ling_in_loop
R
false
false
6,815
r
library(tidyverse) library(ggplot2) setwd("C:/Users/NYUCM Loaner Access/Documents/GitHub/ling_in_loop/scripts") set.seed(42) anon_codes = read.csv("../../../SECRET/ling_in_loop_SECRET/anonymized_id_links.csv") round = "round5" # change this value each round LotS<-NULL LitL<-NULL LotS_files = list.files(paste0(".....
library(bootSVD) ### Name: qrSVD ### Title: Wrapper for 'svd', which uses random preconditioning to restart ### when svd fails to converge ### Aliases: qrSVD ### ** Examples x <-matrix(rnorm(3*5),nrow=3,ncol=5) svdx <- qrSVD(x) svdx
/data/genthat_extracted_code/bootSVD/examples/qrSVD.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
242
r
library(bootSVD) ### Name: qrSVD ### Title: Wrapper for 'svd', which uses random preconditioning to restart ### when svd fails to converge ### Aliases: qrSVD ### ** Examples x <-matrix(rnorm(3*5),nrow=3,ncol=5) svdx <- qrSVD(x) svdx
handle_file <- function(end_time, fname, title) { with(read.csv(fname, header=FALSE), { start_ts = end_time - length(V1) timestamps <- 1:length(V1) + start_ts png(paste("graphs/", title, ".png", sep=""), width=1800, height=1000) plot(timestamps, V1, type='l', col='darkgreen', xlab="Time", yl...
/script/process.R
no_license
bensonk/light_sensor
R
false
false
728
r
handle_file <- function(end_time, fname, title) { with(read.csv(fname, header=FALSE), { start_ts = end_time - length(V1) timestamps <- 1:length(V1) + start_ts png(paste("graphs/", title, ".png", sep=""), width=1800, height=1000) plot(timestamps, V1, type='l', col='darkgreen', xlab="Time", yl...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Gomez_modularity_v6_1.R \docType{methods} \name{signedModularity,rnetMultiStrata-method} \alias{signedModularity,rnetMultiStrata-method} \title{signedModularity for class(x) = 'rnetMultiStrata'} \usage{ \S4method{signedModularity}{rnetMultiSt...
/man/signedModularity-rnetMultiStrata.Rd
no_license
EpidemiologyDVM/Rnets
R
false
true
957
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Gomez_modularity_v6_1.R \docType{methods} \name{signedModularity,rnetMultiStrata-method} \alias{signedModularity,rnetMultiStrata-method} \title{signedModularity for class(x) = 'rnetMultiStrata'} \usage{ \S4method{signedModularity}{rnetMultiSt...
vv <- load(file = "E:/Dropbox/Docs/MFE/FE8828/2019/notes-2019/new2019/data_model.Rda") vv df_sel <- df_omit # Preparing for data modeling form <- df[vars] %>% formula() %>% print() form seed <- 42 set.seed(seed) nobs <- 10000 df <- df_sel[sample(nobs),] train <- nobs %>% sample(0.70*nobs) validate <- nobs %...
/2019/notes-2019/new2019/ds_model.R
no_license
leafyoung/fe8828
R
false
false
7,556
r
vv <- load(file = "E:/Dropbox/Docs/MFE/FE8828/2019/notes-2019/new2019/data_model.Rda") vv df_sel <- df_omit # Preparing for data modeling form <- df[vars] %>% formula() %>% print() form seed <- 42 set.seed(seed) nobs <- 10000 df <- df_sel[sample(nobs),] train <- nobs %>% sample(0.70*nobs) validate <- nobs %...
library(shiny) library(shinythemes) library(tidyverse) library(dslabs) library(DT) data("brexit_polls") pollsters <- brexit_polls %>% count(pollster) %>% pull(pollster) %>% as.character() # Define the user interface ui <- fluidPage(theme = shinytheme("yeti"), # Application title titlePanel("B...
/brexit_polls_solutions/app.R
no_license
sta323-523-su20/lab4
R
false
false
2,365
r
library(shiny) library(shinythemes) library(tidyverse) library(dslabs) library(DT) data("brexit_polls") pollsters <- brexit_polls %>% count(pollster) %>% pull(pollster) %>% as.character() # Define the user interface ui <- fluidPage(theme = shinytheme("yeti"), # Application title titlePanel("B...
timss.mean <- function(variable, by, weight="TOTWGT", data, export=FALSE, name= "output", folder=getwd()) { mean.input <- function(variable, weight, data) { # Replicate weight means (sampling error) meanrp <- sapply(1:max(data[["JKZONE"]]), function(x) weighted.mean(as.numeric(data[[variable]]), ifelse(data[[...
/R/timss.mean.R
no_license
adriviteri/intsvy
R
false
false
1,332
r
timss.mean <- function(variable, by, weight="TOTWGT", data, export=FALSE, name= "output", folder=getwd()) { mean.input <- function(variable, weight, data) { # Replicate weight means (sampling error) meanrp <- sapply(1:max(data[["JKZONE"]]), function(x) weighted.mean(as.numeric(data[[variable]]), ifelse(data[[...
#' An example read Counts table #' #' A dataset of exemplary read counts #' #' @docType data #' @keywords datasets #' @name countsTable #' @usage data(countsTable) #' @format A data frame containing experiment design information #' for 12 samples/libraries. #' @return #' A data frame #' @examples #' data(countsTable) N...
/R/data.R
no_license
MengjunWu/TCseq
R
false
false
1,816
r
#' An example read Counts table #' #' A dataset of exemplary read counts #' #' @docType data #' @keywords datasets #' @name countsTable #' @usage data(countsTable) #' @format A data frame containing experiment design information #' for 12 samples/libraries. #' @return #' A data frame #' @examples #' data(countsTable) N...
#-----------------------------------------------------------------------# # Package: High-dimensional Undirected Graph Estimation # # huge.gect(): graph estimation via correlation thresholding (ct) # #-----------------------------------------------------------------------# #' Graph estimation via...
/R/huge.ct.R
no_license
HMJiangGatech/huge
R
false
false
4,543
r
#-----------------------------------------------------------------------# # Package: High-dimensional Undirected Graph Estimation # # huge.gect(): graph estimation via correlation thresholding (ct) # #-----------------------------------------------------------------------# #' Graph estimation via...
#' Normalize CSM simulation to have crown age equal to 1 #' #' @param sim - speciation of good species [Required] #' @return an object #' @author Jason Bragg (jasongbragg@gmail.com) #' @export #' @examples #' \dontrun{ #' csm_sim <- CSMcryptic(csm_sim, morph_thresh=0.05) #' } CSMnorm <- function(csm_sim) { run_st...
/R/CSMnorm.r
no_license
jasongbragg/csm
R
false
false
886
r
#' Normalize CSM simulation to have crown age equal to 1 #' #' @param sim - speciation of good species [Required] #' @return an object #' @author Jason Bragg (jasongbragg@gmail.com) #' @export #' @examples #' \dontrun{ #' csm_sim <- CSMcryptic(csm_sim, morph_thresh=0.05) #' } CSMnorm <- function(csm_sim) { run_st...
#' @title Choice of the best binary question #' @description This function finds the best binary question do divide a cluster A #' into to subclusters such that the bipartition (A_l, A_l_c) has maximum between-clusters inertia. #' @details This function works for both categorical, numerical and mixed data. #' This...
/R/choose_question.R
no_license
chavent/divclust
R
false
false
5,620
r
#' @title Choice of the best binary question #' @description This function finds the best binary question do divide a cluster A #' into to subclusters such that the bipartition (A_l, A_l_c) has maximum between-clusters inertia. #' @details This function works for both categorical, numerical and mixed data. #' This...
## regression tree: regTreeOut <- rxDTree(default ~ creditScore + ccDebt + yearsEmploy + houseAge , rowSelection = year == 2000, data = mortData, maxdepth = 5) ## print out the object: print(regTreeOut) ## plot a dendrogram, and add node labels: plot(rx...
/Data_Camp/Data_Camp/ex24_rxDTree.R
no_license
JeffreyUslan/Revolution
R
false
false
807
r
## regression tree: regTreeOut <- rxDTree(default ~ creditScore + ccDebt + yearsEmploy + houseAge , rowSelection = year == 2000, data = mortData, maxdepth = 5) ## print out the object: print(regTreeOut) ## plot a dendrogram, and add node labels: plot(rx...
library(ape) testtree <- read.tree("4907_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="4907_0_unrooted.txt")
/codeml_files/newick_trees_processed/4907_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("4907_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="4907_0_unrooted.txt")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/empirical_data.R \docType{data} \name{taipei_forts} \alias{taipei_forts} \title{Forts Location Taipei} \format{Data frame with columns \describe{ \item{id} \item{type}{1s are forts and NAs are gyms} \item{latitude} \item{longitude} \item...
/man/taipei_forts.Rd
no_license
bhavesh-kratos/pokemongor
R
false
true
681
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/empirical_data.R \docType{data} \name{taipei_forts} \alias{taipei_forts} \title{Forts Location Taipei} \format{Data frame with columns \describe{ \item{id} \item{type}{1s are forts and NAs are gyms} \item{latitude} \item{longitude} \item...
# installing required libraries install.packages("rjson") install.packages("jsonlite") install.packages("hydroTSM") install.packages("RCurl") install.packages("XML") install.packages("zoo") installed.packages("ggplot2") library(rjson) library(jsonlite) library(hydroTSM) library(plyr) library(RCurl) library(XML) librar...
/CityRatingPlots.R
no_license
Pari02/Summer_Practicum_Orbitz
R
false
false
7,324
r
# installing required libraries install.packages("rjson") install.packages("jsonlite") install.packages("hydroTSM") install.packages("RCurl") install.packages("XML") install.packages("zoo") installed.packages("ggplot2") library(rjson) library(jsonlite) library(hydroTSM) library(plyr) library(RCurl) library(XML) librar...
Classifier <- R6::R6Class( public = list( initialize = function(model_type) { private$model_type <- model_type }, setModelType = function(model_type) { private$model_type <- model_type }, trainModel= function(train, label, ...) { switch(private$model_type, logisti...
/classes/Classifier.R
permissive
jqtangMetaboProfile/SexualPrecocityPrediction
R
false
false
3,284
r
Classifier <- R6::R6Class( public = list( initialize = function(model_type) { private$model_type <- model_type }, setModelType = function(model_type) { private$model_type <- model_type }, trainModel= function(train, label, ...) { switch(private$model_type, logisti...
\name{FeatureSet-class} \docType{class} \alias{show,FeatureSet-method} \alias{FeatureSet-class} \alias{FeatureSet} \alias{initialize,FeatureSet-method} \alias{GeneFeatureSet-class} \alias{ExpressionFeatureSet-class} \alias{ExonFeatureSet-class} \alias{SnpFeatureSet-class} \alias{SnpCnvFeatureSet-class} \alias{TilingFea...
/man/FeatureSetExtensions-class.Rd
no_license
benilton/oligoClasses
R
false
false
2,575
rd
\name{FeatureSet-class} \docType{class} \alias{show,FeatureSet-method} \alias{FeatureSet-class} \alias{FeatureSet} \alias{initialize,FeatureSet-method} \alias{GeneFeatureSet-class} \alias{ExpressionFeatureSet-class} \alias{ExonFeatureSet-class} \alias{SnpFeatureSet-class} \alias{SnpCnvFeatureSet-class} \alias{TilingFea...
obj_fun <- function(x,aux) { FUN <- match.fun(aux$FUN) theta <- c(0,x) CC <- matrix(rep(theta,aux$n),nrow=aux$n) CC <- FUN(CC-t(CC)) y <- sum((aux$R-CC)^2) return(y) }
/R/obj_fun.R
no_license
cran/Correlplot
R
false
false
194
r
obj_fun <- function(x,aux) { FUN <- match.fun(aux$FUN) theta <- c(0,x) CC <- matrix(rep(theta,aux$n),nrow=aux$n) CC <- FUN(CC-t(CC)) y <- sum((aux$R-CC)^2) return(y) }
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 square_cpp <- function(args) { .Call(`_spMLM_square_cpp`, args) }
/R/RcppExports.R
permissive
markjanko/spMLM
R
false
false
205
r
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 square_cpp <- function(args) { .Call(`_spMLM_square_cpp`, args) }
library("data.table") setwd("~/RStudioESM/Exploratory Data Week Projects/ExData_Plotting1") # Read Data, Remove Empty Observations, Subset for the Two Specified Dates powerDT <- data.table::fread(input = "household_power_consumption.txt" , na.strings="?" ) # R...
/Plot1.R
no_license
elizabethsmoon/ExData_Plotting1
R
false
false
925
r
library("data.table") setwd("~/RStudioESM/Exploratory Data Week Projects/ExData_Plotting1") # Read Data, Remove Empty Observations, Subset for the Two Specified Dates powerDT <- data.table::fread(input = "household_power_consumption.txt" , na.strings="?" ) # R...
#' #' go_to_account #' #' trigger event to redirect user to Account (payments) page, #' typically used in an `observeEvent` #' #' @importFrom shiny getDefaultReactiveDomain updateQueryString #' #' @param session A Shiny session object. #' #' @export #' go_to_account <- function( session = shiny::getDefaultReactiveDo...
/R/go_to_account.R
no_license
socioskop/polipay
R
false
false
462
r
#' #' go_to_account #' #' trigger event to redirect user to Account (payments) page, #' typically used in an `observeEvent` #' #' @importFrom shiny getDefaultReactiveDomain updateQueryString #' #' @param session A Shiny session object. #' #' @export #' go_to_account <- function( session = shiny::getDefaultReactiveDo...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/matching.R \name{full_match} \alias{full_match} \title{Perform full matching} \usage{ full_match(data, dist_mat, formula = Dx ~ age_scan + bv + iq + sex, ...) } \arguments{ \item{data}{The data.frame of interest} \item{dist_mat}{The n x n di...
/autismSexDifferences/man/full_match.Rd
no_license
cfhammill/autism-sex-differences-code-appendix
R
false
true
711
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/matching.R \name{full_match} \alias{full_match} \title{Perform full matching} \usage{ full_match(data, dist_mat, formula = Dx ~ age_scan + bv + iq + sex, ...) } \arguments{ \item{data}{The data.frame of interest} \item{dist_mat}{The n x n di...
library(dynbenchmark) library(dynwrap) library(tidyverse) trajectory_types$id %>% map(function(trajectory_type) { plot <- dynbenchmark::plot_trajectory_types(trajectory_type = trajectory_type, size = 5) + scale_x_continuous(expand = c(0.1, 0)) + scale_y_continuous(expand = c(0.3, 0)) ggsave(glue::glue("inst/img/t...
/data-raw/generate_trajectory_type_pictures.R
permissive
dynverse/dynguidelines
R
false
false
410
r
library(dynbenchmark) library(dynwrap) library(tidyverse) trajectory_types$id %>% map(function(trajectory_type) { plot <- dynbenchmark::plot_trajectory_types(trajectory_type = trajectory_type, size = 5) + scale_x_continuous(expand = c(0.1, 0)) + scale_y_continuous(expand = c(0.3, 0)) ggsave(glue::glue("inst/img/t...
server = (function(input, output,session) { observe({ for (i in 1:nrow(new_old_customer_2016)){ new_old_customer_2016$new_target_acc[i]<-sum(new_old_customer_2016$new_target[1:i]) new_old_customer_2016$old_target_acc[i]<-sum(new_old_customer_2016$old_target[1:i]) revenue_2016$target_acc[i]<-...
/server.R
no_license
cocolin041/target_setup
R
false
false
8,633
r
server = (function(input, output,session) { observe({ for (i in 1:nrow(new_old_customer_2016)){ new_old_customer_2016$new_target_acc[i]<-sum(new_old_customer_2016$new_target[1:i]) new_old_customer_2016$old_target_acc[i]<-sum(new_old_customer_2016$old_target[1:i]) revenue_2016$target_acc[i]<-...
makeCacheMatrix <- function( m = matrix() ) { i <- NULL set <- function( matrix ) { m <<- matrix i <<- NULL } get <- function() { ## Return the matrix m } ## Method to set the inverse of the matrix setInverse <- function(inverse) { i <<- inverse } ## Method to get the invers...
/cachematrix.R
no_license
Utpal29/ProgrammingAssignment2
R
false
false
1,024
r
makeCacheMatrix <- function( m = matrix() ) { i <- NULL set <- function( matrix ) { m <<- matrix i <<- NULL } get <- function() { ## Return the matrix m } ## Method to set the inverse of the matrix setInverse <- function(inverse) { i <<- inverse } ## Method to get the invers...
install.packages("blogdown") library(blogdown) blogdown::install_hugo() blogdown::new_site(theme="nurlansu/hugo-sustain")
/start_script.R
no_license
kid-codei/website
R
false
false
122
r
install.packages("blogdown") library(blogdown) blogdown::install_hugo() blogdown::new_site(theme="nurlansu/hugo-sustain")
info_box_output_wrapper <- function (outputId, width = infobox_with) { infoBoxOutput(outputId, width = width) } prepare_aggregate <- function(cols_for_aggregation , DT) { DT_out <- DT[, .( Impressions = sum2(Impressions) , ClicksPublisher = sum2(ClicksPublisher) , Co...
/functions.R
no_license
adambondarzewskiITF/exampleApp
R
false
false
864
r
info_box_output_wrapper <- function (outputId, width = infobox_with) { infoBoxOutput(outputId, width = width) } prepare_aggregate <- function(cols_for_aggregation , DT) { DT_out <- DT[, .( Impressions = sum2(Impressions) , ClicksPublisher = sum2(ClicksPublisher) , Co...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/internal_validation.R \name{initializeInternalValidation} \alias{initializeInternalValidation} \title{Method that return a list of external validation initialized to zero.} \usage{ initializeInternalValidation() } \value{ A list of all values...
/man/initializeInternalValidation.Rd
no_license
cran/Clustering
R
false
true
441
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/internal_validation.R \name{initializeInternalValidation} \alias{initializeInternalValidation} \title{Method that return a list of external validation initialized to zero.} \usage{ initializeInternalValidation() } \value{ A list of all values...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/voice-pc-set.R \name{all_voicings_pc_multiset} \alias{all_voicings_pc_multiset} \title{All voicings (pitch-class multiset)} \usage{ all_voicings_pc_multiset(x, min_octave, max_octave, fix_melody = NA_integer_, fix_content = integer(), fix...
/man/all_voicings_pc_multiset.Rd
permissive
pmcharrison/voicer
R
false
true
1,070
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/voice-pc-set.R \name{all_voicings_pc_multiset} \alias{all_voicings_pc_multiset} \title{All voicings (pitch-class multiset)} \usage{ all_voicings_pc_multiset(x, min_octave, max_octave, fix_melody = NA_integer_, fix_content = integer(), fix...
# # This test file has been generated by kwb.test::create_test_files() # test_that("plotModelStructure() works", { expect_error( kwb.demeau:::plotModelStructure() # argument "df" is missing, with no default ) })
/tests/testthat/test-function-plotModelStructure.R
permissive
KWB-R/kwb.demeau
R
false
false
241
r
# # This test file has been generated by kwb.test::create_test_files() # test_that("plotModelStructure() works", { expect_error( kwb.demeau:::plotModelStructure() # argument "df" is missing, with no default ) })
## Loading the data (it was downloaded manually) data <- read.table(unz("exdata-data-household_power_consumption.zip", "household_power_consumption.txt"),sep=";",header=T, dec=".",na.strings = "?") data<-transform(data, Date=as.Date(Date,format="%d/%m/%Y")) ## Setting dates format ndata <- subset(data, Date == '2007-02...
/plot1.R
no_license
ElenaMironova/First-assignment
R
false
false
592
r
## Loading the data (it was downloaded manually) data <- read.table(unz("exdata-data-household_power_consumption.zip", "household_power_consumption.txt"),sep=";",header=T, dec=".",na.strings = "?") data<-transform(data, Date=as.Date(Date,format="%d/%m/%Y")) ## Setting dates format ndata <- subset(data, Date == '2007-02...
ub.wn.p2 <- function (pc, lb.pc, ub.pc, pt, lb.pt, ub.pt){ pc - pt + sqrt( (ub.pc - pc)^2 + (pt - lb.pt)^2 ) }
/funs/ub.wn.p2.R
no_license
yuliasidi/wilson_newcombe
R
false
false
113
r
ub.wn.p2 <- function (pc, lb.pc, ub.pc, pt, lb.pt, ub.pt){ pc - pt + sqrt( (ub.pc - pc)^2 + (pt - lb.pt)^2 ) }
lxtable<-function(tab,caption,label,note=F,rownames=T,head=F) { nr<-dim(tab)[1] nc<-dim(tab)[2] div<-1/nc headline="" # al<-paste0(rep("cp",nc),"{",div,"\\linewidth}",collapse="") al<-paste0(rep("c",nc),collapse="") if (!is.null(rownames(tab)) & rownames==T) { tab$Variabili<-rownames(tab) nc...
/R/latex.R
permissive
guhjy/StatWriter
R
false
false
1,177
r
lxtable<-function(tab,caption,label,note=F,rownames=T,head=F) { nr<-dim(tab)[1] nc<-dim(tab)[2] div<-1/nc headline="" # al<-paste0(rep("cp",nc),"{",div,"\\linewidth}",collapse="") al<-paste0(rep("c",nc),collapse="") if (!is.null(rownames(tab)) & rownames==T) { tab$Variabili<-rownames(tab) nc...
#' Scrape Batter Game Logs from FanGraphs #' #' This function allows you to scrape game logs by year for a batter from FanGraphs.com. #' @param playerid This is the playerid used by FanGraphs for a given player #' @param year The season for which game logs should be returned (use the YYYY format) #' @keywords MLB, sabe...
/R/batter_game_logs_fg.R
no_license
KyleW7/baseballr
R
false
false
1,445
r
#' Scrape Batter Game Logs from FanGraphs #' #' This function allows you to scrape game logs by year for a batter from FanGraphs.com. #' @param playerid This is the playerid used by FanGraphs for a given player #' @param year The season for which game logs should be returned (use the YYYY format) #' @keywords MLB, sabe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/singleRCodeFile.R \docType{methods} \name{FilesOutput} \alias{FilesOutput} \title{Constructor method for FilesOutput} \usage{ FilesOutput(outResultName) } \value{ \code{"FilesOutput"} }
/man/FilesOutput.Rd
permissive
SimonSchafferer/CLIHelperPackage
R
false
true
265
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/singleRCodeFile.R \docType{methods} \name{FilesOutput} \alias{FilesOutput} \title{Constructor method for FilesOutput} \usage{ FilesOutput(outResultName) } \value{ \code{"FilesOutput"} }
library(ggplot2) library(shinydashboard) ui <- dashboardPage( dashboardHeader(title = "Basic dashboard"), dashboardSidebar( sidebarMenu( menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")), menuItem("Widgets", tabName = "widgets", icon = icon("th")) ) ), dashboardBody( ...
/shinyapps/app40/app.R
no_license
imcullan/Shiny-Tutorial-Rgitbook
R
false
false
1,215
r
library(ggplot2) library(shinydashboard) ui <- dashboardPage( dashboardHeader(title = "Basic dashboard"), dashboardSidebar( sidebarMenu( menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")), menuItem("Widgets", tabName = "widgets", icon = icon("th")) ) ), dashboardBody( ...
df <- stack(mean1.surfaces) df2 <- stack(mean2.surfaces) df3 <- rbind(df$values,df2$values) barplot(df3, main="Médias de Pontos Ganhos com o 1º e 2º saque", xlab="Superfícies", ylab="Número de Pontos", legend = rownames(df3) , col=c("darkblue","red"), names=c("Carpet","Clay","Grass","Hard"), ylim ...
/códigos/media1Saque2Saque.R
no_license
dehatanes/2017-TrabMQAAE
R
false
false
520
r
df <- stack(mean1.surfaces) df2 <- stack(mean2.surfaces) df3 <- rbind(df$values,df2$values) barplot(df3, main="Médias de Pontos Ganhos com o 1º e 2º saque", xlab="Superfícies", ylab="Número de Pontos", legend = rownames(df3) , col=c("darkblue","red"), names=c("Carpet","Clay","Grass","Hard"), ylim ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/drug_parsers.R \name{parse_drug_patents} \alias{parse_drug_patents} \title{Extracts the drug patents element and return data as tibble.} \usage{ parse_drug_patents(save_table = FALSE, save_csv = FALSE, csv_path = ".", override_csv = ...
/man/parse_drug_patents.Rd
no_license
fabbondanza/dbparser
R
false
true
2,373
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/drug_parsers.R \name{parse_drug_patents} \alias{parse_drug_patents} \title{Extracts the drug patents element and return data as tibble.} \usage{ parse_drug_patents(save_table = FALSE, save_csv = FALSE, csv_path = ".", override_csv = ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/upset_utils.R \name{from_upset_df_to_intersections} \alias{from_upset_df_to_intersections} \title{Transform an upset compliant data frame into a data frame of intersection names and lineages} \usage{ from_upset_df_to_intersections(upset_df) }...
/man/from_upset_df_to_intersections.Rd
permissive
Arcadia-Science/sourmashconsumr
R
false
true
1,111
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/upset_utils.R \name{from_upset_df_to_intersections} \alias{from_upset_df_to_intersections} \title{Transform an upset compliant data frame into a data frame of intersection names and lineages} \usage{ from_upset_df_to_intersections(upset_df) }...
#Read File power<-read.table("household_power_consumption.txt",skip = 1,sep = ";") names(power)<-c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3") subpower<-subset(power,power$Date=="1/2/2007"|power$Date =="2/2/2007") # Trans...
/plot4.R
no_license
sumitguptaa56/ExData_Plotting1
R
false
false
1,446
r
#Read File power<-read.table("household_power_consumption.txt",skip = 1,sep = ";") names(power)<-c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3") subpower<-subset(power,power$Date=="1/2/2007"|power$Date =="2/2/2007") # Trans...
# type mix n=3 # w1, w2, w3, f1+, f2+, f3+, f1-, f2-, f3-, e(i)1+, e(i)2+, e(i)3+, e(ii)1+, e(ii)2+, e(ii)3+, e(iii)1+, e(iii)2+, e(iii)3+, e(iv)1+, e(iv)2+, e(iv)3+, e(iv)1-, e(iv)2-, e(iv)3-, e(v)1+, e(v)2+, e(v)3+ # A= 6000, B= 3000, C= 1000 library (lpSolve) f.obj <- c (0,0,0, 0.001, 0.001, 0.001, 0.001, 0.001, ...
/my_thsis/typeM-631-minusT4-T5-T3only1Constraint.R
no_license
yfde11/my_thsis
R
false
false
1,298
r
# type mix n=3 # w1, w2, w3, f1+, f2+, f3+, f1-, f2-, f3-, e(i)1+, e(i)2+, e(i)3+, e(ii)1+, e(ii)2+, e(ii)3+, e(iii)1+, e(iii)2+, e(iii)3+, e(iv)1+, e(iv)2+, e(iv)3+, e(iv)1-, e(iv)2-, e(iv)3-, e(v)1+, e(v)2+, e(v)3+ # A= 6000, B= 3000, C= 1000 library (lpSolve) f.obj <- c (0,0,0, 0.001, 0.001, 0.001, 0.001, 0.001, ...
testlist <- list(Beta = 0, CVLinf = -1.37672045511449e-268, FM = 3.81959242373749e-313, L50 = 0, L95 = 0, LenBins = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.9794...
/DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615828112-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
487
r
testlist <- list(Beta = 0, CVLinf = -1.37672045511449e-268, FM = 3.81959242373749e-313, L50 = 0, L95 = 0, LenBins = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.9794...
\name{RC.network.list} \alias{RC.network.list} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Create network (sociomatrix) based on list of bloggers } \description{ This function creates the sociomatrix of parent-child relationships about all computations that belong to a user-specified list of ...
/man/RC.network.list.Rd
no_license
cran/RC
R
false
false
2,177
rd
\name{RC.network.list} \alias{RC.network.list} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Create network (sociomatrix) based on list of bloggers } \description{ This function creates the sociomatrix of parent-child relationships about all computations that belong to a user-specified list of ...
# Building a Prod-Ready, Robust Shiny Application. # # README: each step of the dev files is optional, and you don't have to # fill every dev scripts before getting started. # 01_start.R should be filled at start. # 02_dev.R should be used to keep track of your development during the project. # 03_deploy.R should b...
/dev/01_start.R
no_license
mae92/testGolemApp
R
false
false
2,097
r
# Building a Prod-Ready, Robust Shiny Application. # # README: each step of the dev files is optional, and you don't have to # fill every dev scripts before getting started. # 01_start.R should be filled at start. # 02_dev.R should be used to keep track of your development during the project. # 03_deploy.R should b...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_documentation.R \docType{data} \name{photo_lessons} \alias{photo_lessons} \title{An actual dataset of photography students} \format{ A tibble with 162 rows and 7 variables: \describe{ \item{clientid}{A unique identifier for each stude...
/man/photo_lessons.Rd
no_license
dustinfife/flexplot
R
false
true
1,135
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_documentation.R \docType{data} \name{photo_lessons} \alias{photo_lessons} \title{An actual dataset of photography students} \format{ A tibble with 162 rows and 7 variables: \describe{ \item{clientid}{A unique identifier for each stude...
create_comb_list <- function(ratings, n = 10) { r <- expand.grid(rep(list(0:n), length(ratings))) r = subset(r, rowSums(r) == n) colnames(r) <- paste0('R', ratings) r } get_combs_with_target_rating <- function(ratings, target = 85, cost = c(), pre = NULL) { combs = create_comb_list(ratings, 11 - length(pre...
/ratings.R
no_license
v0l0dia/fifaratings
R
false
false
1,384
r
create_comb_list <- function(ratings, n = 10) { r <- expand.grid(rep(list(0:n), length(ratings))) r = subset(r, rowSums(r) == n) colnames(r) <- paste0('R', ratings) r } get_combs_with_target_rating <- function(ratings, target = 85, cost = c(), pre = NULL) { combs = create_comb_list(ratings, 11 - length(pre...
library(shiny) # Define UI for dataset viewer application shinyUI(pageWithSidebar( # Application title headerPanel("Predict with decision tree for species in IRIS data set"), sidebarPanel( numericInput("Sepal.Length", "Sepal.Length", 0.1, min = 0.1, step = 0.1), ...
/DDP/ui.R
no_license
yanyan-cas/R
R
false
false
817
r
library(shiny) # Define UI for dataset viewer application shinyUI(pageWithSidebar( # Application title headerPanel("Predict with decision tree for species in IRIS data set"), sidebarPanel( numericInput("Sepal.Length", "Sepal.Length", 0.1, min = 0.1, step = 0.1), ...
with(aa34d78397d984b348b9a9f05bcbc67fc, {ROOT <- 'D:/SEMOSS_v4.0.0_x64/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/80bb2a25-ac5d-47d0-abfc-b3f3811f0936';rm(list=ls())});
/80bb2a25-ac5d-47d0-abfc-b3f3811f0936/R/Temp/aZpFYUsVXdmkT.R
no_license
ayanmanna8/test
R
false
false
212
r
with(aa34d78397d984b348b9a9f05bcbc67fc, {ROOT <- 'D:/SEMOSS_v4.0.0_x64/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/80bb2a25-ac5d-47d0-abfc-b3f3811f0936';rm(list=ls())});
# Script to run contemporary species distribution model for a single species # Jeff Oliver # jcoliver@email.arizona.edu # 2017-09-07 rm(list = ls()) ################################################################################ # SETUP # Gather path information # Load dependancies # Things to set: infile <- "data/...
/src/lemmonii-sdm-single.R
permissive
BiodiversityDataScienceCorp/lemmonheads-mapping
R
false
false
6,634
r
# Script to run contemporary species distribution model for a single species # Jeff Oliver # jcoliver@email.arizona.edu # 2017-09-07 rm(list = ls()) ################################################################################ # SETUP # Gather path information # Load dependancies # Things to set: infile <- "data/...
# Author: Melinda de Jonge # Date: 14-11-2018 associationChange <- function(sample){ model_path = file.path('output',paste('ConditionalModel',sample,sep='')) figure_path = file.path('figures') #Combine associations at 5th, 25th, 75th and 95th percentile for all 3 chains Quantile1_1 = read.csv(file.path(model...
/R/associationChange.R
no_license
MelindadeJonge/ConditionalLove
R
false
false
3,526
r
# Author: Melinda de Jonge # Date: 14-11-2018 associationChange <- function(sample){ model_path = file.path('output',paste('ConditionalModel',sample,sep='')) figure_path = file.path('figures') #Combine associations at 5th, 25th, 75th and 95th percentile for all 3 chains Quantile1_1 = read.csv(file.path(model...
#' #' @export Relist.hy = function(a,b){ # Input : a = original list; b = number will be removed from a # Output : c = new list; d => d[k] = case number in c of a[k] c = a[!(a %in% b)]; d = rep(0,length(a)); for (i in 1:length(a)){ if (length(which(c==a[i]))>0){ d[i] = which(c==a[i]); } ...
/R/Relist.hy.R
no_license
hyochoi/SCISSOR
R
false
false
359
r
#' #' @export Relist.hy = function(a,b){ # Input : a = original list; b = number will be removed from a # Output : c = new list; d => d[k] = case number in c of a[k] c = a[!(a %in% b)]; d = rep(0,length(a)); for (i in 1:length(a)){ if (length(which(c==a[i]))>0){ d[i] = which(c==a[i]); } ...
library(miWQS) ### Name: coef.wqs ### Title: Finding WQS Coefficients ### Aliases: coef.wqs ### Keywords: wqs ### ** Examples #Use simulated dataset and set seed for reproducibility. data(simdata87) set.seed(23456) Wa <- estimate.wqs( y = simdata87$y.scenario, X = simdata87$X.true, B = 10, family ...
/data/genthat_extracted_code/miWQS/examples/coef.wqs.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
346
r
library(miWQS) ### Name: coef.wqs ### Title: Finding WQS Coefficients ### Aliases: coef.wqs ### Keywords: wqs ### ** Examples #Use simulated dataset and set seed for reproducibility. data(simdata87) set.seed(23456) Wa <- estimate.wqs( y = simdata87$y.scenario, X = simdata87$X.true, B = 10, family ...
/FinalWorkViz.R
no_license
vishakhsahni/Fighting-Terrorism-Predictive-Analytics
R
false
false
7,807
r
## Block diagonal concatenation of matrix input arguments. ## blkdiag <- function (x) { dots <- x if (!all(sapply(dots, is.matrix)) || !all(sapply(dots, is.numeric))) stop("All input arguments in x must be numeric matrices") nrows <- sapply(dots, nrow) ncols <-...
/R/blkdiag.R
no_license
cran/qkerntool
R
false
false
783
r
## Block diagonal concatenation of matrix input arguments. ## blkdiag <- function (x) { dots <- x if (!all(sapply(dots, is.matrix)) || !all(sapply(dots, is.numeric))) stop("All input arguments in x must be numeric matrices") nrows <- sapply(dots, nrow) ncols <-...
/bi-master_machine-learning/Classificação/Análise de Crédito/creditoScript.R
no_license
dougabreu/Atualiza-o_BI
R
false
false
1,036
r
### change alleles to forward without qc ### setwd ("/home/common/projects/ovine_selection/GWAS_on_russian_population_of_ovines/2020/data/Rdata") load("chip_data_pre-processed_96_animals_AB_alleles.Rdata") setwd("/home/common/projects/ovine_selection/GWAS_on_russian_population_of_ovines/2020/data/reference...
/2020/01_pre_processing_chip_data/01d_change_alleles_to_forward_without_qc.R
no_license
Defrag1236/GWAS_on_russian_population_of_ovines
R
false
false
1,732
r
### change alleles to forward without qc ### setwd ("/home/common/projects/ovine_selection/GWAS_on_russian_population_of_ovines/2020/data/Rdata") load("chip_data_pre-processed_96_animals_AB_alleles.Rdata") setwd("/home/common/projects/ovine_selection/GWAS_on_russian_population_of_ovines/2020/data/reference...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DataDocumentation.R \docType{data} \name{Summary_Import_2012} \alias{Summary_Import_2012} \title{Summary 2012 Import (2012 schema)} \format{A dataframe with 73 obs. and 93 variables} \source{ \url{https://apps.bea.gov/industry/xls/io-annual/I...
/man/Summary_Import_2012.Rd
permissive
qdread/useeior
R
false
true
446
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DataDocumentation.R \docType{data} \name{Summary_Import_2012} \alias{Summary_Import_2012} \title{Summary 2012 Import (2012 schema)} \format{A dataframe with 73 obs. and 93 variables} \source{ \url{https://apps.bea.gov/industry/xls/io-annual/I...
## Program for Caching the Inverse of a Matrix ## Function that creates a special "Matrix" object that can cache its Inverse makeCacheMatrix <- function(m = matrix()) { ## Initializing the Inverse property x <- NULL ## Method for Setting the Matrix object set <- function(matrix) { ...
/cachematrix.R
no_license
jayzcool/ProgrammingAssignment2
R
false
false
1,567
r
## Program for Caching the Inverse of a Matrix ## Function that creates a special "Matrix" object that can cache its Inverse makeCacheMatrix <- function(m = matrix()) { ## Initializing the Inverse property x <- NULL ## Method for Setting the Matrix object set <- function(matrix) { ...
## Most updated script for Dan's experiment plots # Cat - 1 November 2017 # Clear workspace rm(list=ls()) # remove everything currently held in the R memory options(stringsAsFactors=FALSE) graphics.off() # Load libraries library(dplyr) library(tidyr) library(ggplot2) # Set Working Directory setwd("~/Documents/git/sp...
/scripts/zarchive/DVR_diffPlot.R
no_license
cchambe12/springfreeze
R
false
false
3,466
r
## Most updated script for Dan's experiment plots # Cat - 1 November 2017 # Clear workspace rm(list=ls()) # remove everything currently held in the R memory options(stringsAsFactors=FALSE) graphics.off() # Load libraries library(dplyr) library(tidyr) library(ggplot2) # Set Working Directory setwd("~/Documents/git/sp...
################################################################################################## ## TIME FEATURE. ## Based on click time the data is bucketed into groups of 1 min, 5 min, 1 hr, 3 hr and 6 hrs ## Then the mean, max, variance and skewnwss of these bucket's frequencies are prepared ## Finally these featu...
/FeatureGeneration.R
no_license
BhavanaMeena/AdTracking-and-Fraud-Detection
R
false
false
3,929
r
################################################################################################## ## TIME FEATURE. ## Based on click time the data is bucketed into groups of 1 min, 5 min, 1 hr, 3 hr and 6 hrs ## Then the mean, max, variance and skewnwss of these bucket's frequencies are prepared ## Finally these featu...
#-----------------------------------------------------------------------------# # US Dept. of Veterans Affairs - Corporate Data Warehouse # Weight Measurement "Cleaning" Algorithm - Janney 2016 version # # Algorithm reconstructed from methods section in the publication: # Janney CA, Kilbourne AM, Germain A, et al....
/weightalgos/R/Janney2016.R
no_license
tszberkowitz/WeightAlgorithms
R
false
false
12,271
r
#-----------------------------------------------------------------------------# # US Dept. of Veterans Affairs - Corporate Data Warehouse # Weight Measurement "Cleaning" Algorithm - Janney 2016 version # # Algorithm reconstructed from methods section in the publication: # Janney CA, Kilbourne AM, Germain A, et al....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ols-plots-data.R \name{ols_prep_dfbeta_data} \alias{ols_prep_dfbeta_data} \title{DFBETAs plot data} \usage{ ols_prep_dfbeta_data(d, threshold) } \arguments{ \item{d}{A \code{tibble} or \code{data.frame} with dfbetas.} \item{thresh...
/man/ols_prep_dfbeta_data.Rd
no_license
Ganzeb/olsrr
R
false
true
677
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ols-plots-data.R \name{ols_prep_dfbeta_data} \alias{ols_prep_dfbeta_data} \title{DFBETAs plot data} \usage{ ols_prep_dfbeta_data(d, threshold) } \arguments{ \item{d}{A \code{tibble} or \code{data.frame} with dfbetas.} \item{thresh...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_ecxsys.R, R/plot_stress.R, % R/plot_survival.R \name{plot_ecxsys} \alias{plot_ecxsys} \alias{plot_stress} \alias{plot_survival} \title{Plot the results of the ECx-SyS model} \usage{ plot_stress( model, which = c("sys_tox...
/man/plot_ecxsys.Rd
no_license
cran/stressaddition
R
false
true
2,494
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_ecxsys.R, R/plot_stress.R, % R/plot_survival.R \name{plot_ecxsys} \alias{plot_ecxsys} \alias{plot_stress} \alias{plot_survival} \title{Plot the results of the ECx-SyS model} \usage{ plot_stress( model, which = c("sys_tox...
# CCLE script #load StringR package library("stringr", lib.loc="~/Library/R/3.1/library") library("plyr", lib.loc="~/Library/R/3.1/library") # match definitive gene names with GENBANK genbank <- read.csv ( file = 'SOURCE_DEFINITIVE_GENBANK_TRIM.csv') # merge with kinase gene names with motif data names <- read.csv...
/older scripts/allTRANSCRIPTSccle_2.R
no_license
adamfletcherUK/Kimo_Development
R
false
false
43,815
r
# CCLE script #load StringR package library("stringr", lib.loc="~/Library/R/3.1/library") library("plyr", lib.loc="~/Library/R/3.1/library") # match definitive gene names with GENBANK genbank <- read.csv ( file = 'SOURCE_DEFINITIVE_GENBANK_TRIM.csv') # merge with kinase gene names with motif data names <- read.csv...
df <- read.csv('bikeshare.csv') library(ggplot2) #EDA# ggplot(df,aes(temp,count)) + geom_point(alpha=0.7, aes(color=temp)) + theme_bw() df$datetime <- as.POSIXct(df$datetime) ggplot(df,aes(datetime,count)) + geom_point(aes(color=temp),alpha=0.7) + scale_color_continuous(low='#55D8CE',high='#FF6E2E') +theme_bw() cor(df...
/maincode.R
no_license
Akaktraa/Bike-Sharing-Demand-Prediction
R
false
false
1,643
r
df <- read.csv('bikeshare.csv') library(ggplot2) #EDA# ggplot(df,aes(temp,count)) + geom_point(alpha=0.7, aes(color=temp)) + theme_bw() df$datetime <- as.POSIXct(df$datetime) ggplot(df,aes(datetime,count)) + geom_point(aes(color=temp),alpha=0.7) + scale_color_continuous(low='#55D8CE',high='#FF6E2E') +theme_bw() cor(df...
library(frailtySurv) ### Name: simfrail ### Title: Simulate survival data and fit models ### Aliases: simfrail ### Keywords: survival simulation ### ** Examples ## Not run: ##D sim <- simfrail(reps=100, ##D genfrail.args=alist( ##D N=50, K=2, ##D beta=c(log(2),lo...
/data/genthat_extracted_code/frailtySurv/examples/simfrail.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
788
r
library(frailtySurv) ### Name: simfrail ### Title: Simulate survival data and fit models ### Aliases: simfrail ### Keywords: survival simulation ### ** Examples ## Not run: ##D sim <- simfrail(reps=100, ##D genfrail.args=alist( ##D N=50, K=2, ##D beta=c(log(2),lo...
library(stringr) library(rebus) #download our dataset, extract list of keywords data_df <- read.csv("C:/Users/KR/Desktop/R/week-09-inclass-rosetta-stone-3-0/data-biost-2018.csv", stringsAsFactors = FALSE) keyword_list <- data_df[["keywords"]] # tidy list: delete NAs, all letters to lowercase, all...
/sandbox/Count_keywords-Kira.R
no_license
PHP-2560/r-package-rosetta-stone-4-0
R
false
false
1,142
r
library(stringr) library(rebus) #download our dataset, extract list of keywords data_df <- read.csv("C:/Users/KR/Desktop/R/week-09-inclass-rosetta-stone-3-0/data-biost-2018.csv", stringsAsFactors = FALSE) keyword_list <- data_df[["keywords"]] # tidy list: delete NAs, all letters to lowercase, all...
library(ggplot2) library(ggthemes) library(plotly) options(scipen=999) str(Sales_full_data) names(Sales_full_data) #boxplot p <- ggplot(Sales_full_data, aes(y=`Sales`)) + geom_boxplot() + labs(x='Sales Bucket',title = 'Sales buket frequency',subtitle = 'Just a boxplot',caption = 'Made with ggplot2') ggplotl...
/visualization.R
no_license
somu2k16/practice_R
R
false
false
888
r
library(ggplot2) library(ggthemes) library(plotly) options(scipen=999) str(Sales_full_data) names(Sales_full_data) #boxplot p <- ggplot(Sales_full_data, aes(y=`Sales`)) + geom_boxplot() + labs(x='Sales Bucket',title = 'Sales buket frequency',subtitle = 'Just a boxplot',caption = 'Made with ggplot2') ggplotl...
########## plot function ############# plot_Func <- function(temp.x,temp.y,sens.loc,EStim_d,ylim,xlim){ sens.loc = data.frame(sens.loc) # temp plot plot(temp.x,temp.y,col="red",cex = 0.7,pch = 19,ylim = ylim, xaxt = 'n',yaxt ='n',xlab = "",ylab = "") par(new = T) # senser plot plot(sens.loc,pc...
/plot-one.R
no_license
ct-7/Graduation-thesis
R
false
false
550
r
########## plot function ############# plot_Func <- function(temp.x,temp.y,sens.loc,EStim_d,ylim,xlim){ sens.loc = data.frame(sens.loc) # temp plot plot(temp.x,temp.y,col="red",cex = 0.7,pch = 19,ylim = ylim, xaxt = 'n',yaxt ='n',xlab = "",ylab = "") par(new = T) # senser plot plot(sens.loc,pc...
##This function Function makeCacheMatrix gets a matrix as an input, set the value of the matrix, #get the value of the matrix, set the inverse Matrix and get the inverse Matrix. The matrix object #can cache its own object. #<<- operator is used to assign a value to an object in an environment that is different #from...
/cachematrix.R
no_license
rajeevshishodia/ProgrammingAssignment2
R
false
false
2,444
r
##This function Function makeCacheMatrix gets a matrix as an input, set the value of the matrix, #get the value of the matrix, set the inverse Matrix and get the inverse Matrix. The matrix object #can cache its own object. #<<- operator is used to assign a value to an object in an environment that is different #from...
#' Create flanking intervals from input intervals. #' #' @param x [ivl_df] #' @param genome [genome_df] #' @param both number of bases on both sizes #' @param left number of bases on left side #' @param right number of bases on right side #' @param fraction define flanks based on fraction of interval length #' @param s...
/R/bed_flank.r
permissive
rnabioco/valr
R
false
false
2,089
r
#' Create flanking intervals from input intervals. #' #' @param x [ivl_df] #' @param genome [genome_df] #' @param both number of bases on both sizes #' @param left number of bases on left side #' @param right number of bases on right side #' @param fraction define flanks based on fraction of interval length #' @param s...
#!/usr/bin/env RScript deseq2analysis::analyseFromConfig("test.parameters.yaml", getwd())
/example/rundemo.R
no_license
idot/deseq2analysis
R
false
false
93
r
#!/usr/bin/env RScript deseq2analysis::analyseFromConfig("test.parameters.yaml", getwd())
\name{sole} \alias{sole} %- Also NEED an `\alias' for EACH other topic documented here. \title{Sole Eggs in the Bristol Channel} \description{ Data on Sole Egg densities in the Bristol Channel (West Coast of England, UK.) The data are from 5 research cruises undertaken for the purpose of measuring Sole egg densities. S...
/man/sole.Rd
no_license
cran/gamair
R
false
false
3,306
rd
\name{sole} \alias{sole} %- Also NEED an `\alias' for EACH other topic documented here. \title{Sole Eggs in the Bristol Channel} \description{ Data on Sole Egg densities in the Bristol Channel (West Coast of England, UK.) The data are from 5 research cruises undertaken for the purpose of measuring Sole egg densities. S...
PATH <- 'worldcitiespop.txt' system.time(lines <- readLines(PATH)) # user system elapsed # 5.535 0.052 5.585 system.time(df1 <- read.csv(PATH, stringsAsFactors = FALSE)) # user system elapsed # 12.761 0.112 12.867 dim(df1) # [1] 3173958 7 library(data.table) system.time(df2 <- fread(PATH,...
/benchs.R
no_license
kforner/csv_parsers
R
false
false
1,119
r
PATH <- 'worldcitiespop.txt' system.time(lines <- readLines(PATH)) # user system elapsed # 5.535 0.052 5.585 system.time(df1 <- read.csv(PATH, stringsAsFactors = FALSE)) # user system elapsed # 12.761 0.112 12.867 dim(df1) # [1] 3173958 7 library(data.table) system.time(df2 <- fread(PATH,...
% Generated by roxygen2 (4.0.2): do not edit by hand \name{wdmat} \alias{wdmat} \title{Compute the weighted distances between two data sets of rankings} \usage{ wdmat(dset1, dset2 = dset1, dset1.agg = FALSE, dset2.agg = FALSE, dtype = "Kendall", weight = NULL, modal = NULL) } \arguments{ \item{dset1}{one data set wit...
/man/wdmat.Rd
no_license
zfy1989lee/StatMethRank
R
false
false
1,407
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \name{wdmat} \alias{wdmat} \title{Compute the weighted distances between two data sets of rankings} \usage{ wdmat(dset1, dset2 = dset1, dset1.agg = FALSE, dset2.agg = FALSE, dtype = "Kendall", weight = NULL, modal = NULL) } \arguments{ \item{dset1}{one data set wit...
testlist <- list(AgeVector = c(-4.73074171454048e-167, 1.45898740757476e-71, -9.12990429452952e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.1127156218370...
/myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615768215-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
1,804
r
testlist <- list(AgeVector = c(-4.73074171454048e-167, 1.45898740757476e-71, -9.12990429452952e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.1127156218370...
library(inferr) ### Name: infer_os_var_test ### Title: One Sample Variance Comparison Test ### Aliases: infer_os_var_test os_vartest ### ** Examples # lower tail infer_os_var_test(mtcars, mpg, 5, alternative = 'less') # upper tail infer_os_var_test(mtcars, mpg, 5, alternative = 'greater') # both tails infer_os_va...
/data/genthat_extracted_code/inferr/examples/infer_os_var_test.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
436
r
library(inferr) ### Name: infer_os_var_test ### Title: One Sample Variance Comparison Test ### Aliases: infer_os_var_test os_vartest ### ** Examples # lower tail infer_os_var_test(mtcars, mpg, 5, alternative = 'less') # upper tail infer_os_var_test(mtcars, mpg, 5, alternative = 'greater') # both tails infer_os_va...
# context.R: SparkContext driven functions #' Create an RDD from a text file. #' #' This function reads a text file from HDFS, a local file system (available on all #' nodes), or any Hadoop-supported file system URI, and creates an #' RDD of strings from it. #' #' @param sc SparkContext to use #' @param path Path of f...
/pkg/R/context.R
permissive
butterluo/SparkR-pkg
R
false
false
5,613
r
# context.R: SparkContext driven functions #' Create an RDD from a text file. #' #' This function reads a text file from HDFS, a local file system (available on all #' nodes), or any Hadoop-supported file system URI, and creates an #' RDD of strings from it. #' #' @param sc SparkContext to use #' @param path Path of f...
setwd("~/GitHub/MonomoriumNurseLarva/") library(plyr) library(reshape2) library(ggplot2) library(grid) library(gridExtra) library(edgeR) library(topGO) library(multcomp) library(gtable) library(magrittr) #Generate means and bootstrapped confidence intervals bootCI <- function(v,boots){ v = v[!is.na(v)] bV = unlist...
/src/final_analysis.R
no_license
warnerm/MonomoriumNurseLarva
R
false
false
24,443
r
setwd("~/GitHub/MonomoriumNurseLarva/") library(plyr) library(reshape2) library(ggplot2) library(grid) library(gridExtra) library(edgeR) library(topGO) library(multcomp) library(gtable) library(magrittr) #Generate means and bootstrapped confidence intervals bootCI <- function(v,boots){ v = v[!is.na(v)] bV = unlist...
#' Dado una lista de bouts, y una lista que contiene funciones de generación de calendarios, #' devuelve lista de calendarios #' #' @param bouts #' @param listFunctionalCalendars #' @param progreso #' #' @return #' @export computeCalendars=function(bouts,generateCalendars,progreso=NULL,idBIN=NA_character_){...
/R/computeCalendars.R
no_license
fjbaron/accelerator
R
false
false
641
r
#' Dado una lista de bouts, y una lista que contiene funciones de generación de calendarios, #' devuelve lista de calendarios #' #' @param bouts #' @param listFunctionalCalendars #' @param progreso #' #' @return #' @export computeCalendars=function(bouts,generateCalendars,progreso=NULL,idBIN=NA_character_){...
## The "makeCacheMatrix" function creates a special array object, and then the "cacheSolve" function calculates the inverse of the array. ## If the inverse of the array has already been computed, it is found in the cache and returns it, with no need to recalculate it. ## Creates a special array of object makeCacheMat...
/cachematrix.R
no_license
DiveshAgarwal/ProgrammingAssignment2
R
false
false
954
r
## The "makeCacheMatrix" function creates a special array object, and then the "cacheSolve" function calculates the inverse of the array. ## If the inverse of the array has already been computed, it is found in the cache and returns it, with no need to recalculate it. ## Creates a special array of object makeCacheMat...
#http://stats.stackexchange.com/questions/118051/how-to-perform-residual-analysis-for-binary-dichotomous-independent-predictors-i #Regressions diagnostics data <- read.csv('R-Output/data_corrected.csv')[,3:37] data$household_id <- as.character(ifelse((data$region %in% c("Harari", "Gambella", "Dire Dawa")), data$house...
/ScriptsJF/diagnostics.r
no_license
vincentlinderhof/NutritionETH
R
false
false
2,751
r
#http://stats.stackexchange.com/questions/118051/how-to-perform-residual-analysis-for-binary-dichotomous-independent-predictors-i #Regressions diagnostics data <- read.csv('R-Output/data_corrected.csv')[,3:37] data$household_id <- as.character(ifelse((data$region %in% c("Harari", "Gambella", "Dire Dawa")), data$house...