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
##' Add RDF data cube codelist to RDF store ##' ##' This function could be split into two function corresponding to the usage. ##' @param obsData Data Frame with the data for which the code list is to be generated ##' @param codeType Character "DATA" or "SDTM". ##' "DATA" to derive code list from the data. ##' "SDTM" t...
/rrdfqb/R/buildCodelist.R
no_license
rjsheperd/rrdfqbcrnd0
R
false
false
19,314
r
##' Add RDF data cube codelist to RDF store ##' ##' This function could be split into two function corresponding to the usage. ##' @param obsData Data Frame with the data for which the code list is to be generated ##' @param codeType Character "DATA" or "SDTM". ##' "DATA" to derive code list from the data. ##' "SDTM" t...
legend(4, 400, c("Orange", "Appple", "Banana"), cex=0.8, col=c("red","green","blue"), pch=21, lty=1:3)
/work/r데이터분석_예제파일/예제/4_16.R
no_license
bass4th/R
R
false
false
103
r
legend(4, 400, c("Orange", "Appple", "Banana"), cex=0.8, col=c("red","green","blue"), pch=21, lty=1:3)
cv.ncvsurv <- function(X, y, ..., nfolds=10, seed, returnY=FALSE, trace=FALSE, events.only=TRUE) { ## Error checking if (class(X) != "matrix") { tmp <- try(X <- as.matrix(X), silent=TRUE) if (class(tmp)[1] == "try-error") stop("X must be a matrix or able to be coerced to a matrix") } if (class(y) != "m...
/R/cv.ncvsurv.R
no_license
YaohuiZeng/ncvreg
R
false
false
1,926
r
cv.ncvsurv <- function(X, y, ..., nfolds=10, seed, returnY=FALSE, trace=FALSE, events.only=TRUE) { ## Error checking if (class(X) != "matrix") { tmp <- try(X <- as.matrix(X), silent=TRUE) if (class(tmp)[1] == "try-error") stop("X must be a matrix or able to be coerced to a matrix") } if (class(y) != "m...
library(lubridate) #needed library #An initial inspection reveals the general location of desired data in the #larger file. This first part reads in that section. #This assumes the file household_power_consumption.txt is in the working #directory. hpc <- read.table("household_power_consumption.txt", ...
/plot4.R
no_license
ttegt/ExData_Plotting1
R
false
false
2,177
r
library(lubridate) #needed library #An initial inspection reveals the general location of desired data in the #larger file. This first part reads in that section. #This assumes the file household_power_consumption.txt is in the working #directory. hpc <- read.table("household_power_consumption.txt", ...
#************************************Investment Case Study**************************************************** #*********************************** Loading libraries *********************************************** library(tidyr) library(dplyr) library(stringr) #Loading data in the data frames companies <...
/Solution.R
no_license
kanupriya-singh/investment-case-study-R
R
false
false
11,742
r
#************************************Investment Case Study**************************************************** #*********************************** Loading libraries *********************************************** library(tidyr) library(dplyr) library(stringr) #Loading data in the data frames companies <...
knn.multi.sim <- function(Z, ny = dim(Z)[1]){ sims <- array(0,dim=c(dim(Z),nsims)) K <- sqrt(ny) W <- 1/(1:K) W <- cumsum( W/sum(W) ) for(i in 1:nsims){ this.sim <- array(0,c(ny*12,2)) ## Start with a previous Dec value.. Z.last <- rbind( Z[sample(1:ny,1), 12, ] ) for(j in 1:(ny*12)){ month ...
/data-analysis/4-multivariate/src/knn-multi-sim.R
no_license
cameronbracken/classy
R
false
false
1,109
r
knn.multi.sim <- function(Z, ny = dim(Z)[1]){ sims <- array(0,dim=c(dim(Z),nsims)) K <- sqrt(ny) W <- 1/(1:K) W <- cumsum( W/sum(W) ) for(i in 1:nsims){ this.sim <- array(0,c(ny*12,2)) ## Start with a previous Dec value.. Z.last <- rbind( Z[sample(1:ny,1), 12, ] ) for(j in 1:(ny*12)){ month ...
##Chapter 14 Notes## #finish when you get the chance
/chapter.14.tanjanay.R
no_license
paul-shannon/learningR
R
false
false
52
r
##Chapter 14 Notes## #finish when you get the chance
#' @title taxize authentication #' #' @description Help on authentication #' #' @name taxize-authentication #' @aliases authentication #' @seealso [key_helpers()] #' #' @section What is an API?: #' An API is an Application Programming Interface. The term "API" can be used #' for lots of scenarios, but in this case we...
/R/taxize-authentication.R
permissive
puyo/taxize
R
false
false
2,513
r
#' @title taxize authentication #' #' @description Help on authentication #' #' @name taxize-authentication #' @aliases authentication #' @seealso [key_helpers()] #' #' @section What is an API?: #' An API is an Application Programming Interface. The term "API" can be used #' for lots of scenarios, but in this case we...
epa=read.csv("epa_lista.csv") nombres=read.csv("../DICCIONARIO.csv")[c("CAS","NOMBRE.QUIMICO")] A=merge(epa,nombres,by="CAS",all.x=TRUE) write.csv(A,"epa_lista_castellano.csv")
/EPA/traducirNombres.R
permissive
gauss-ma/toxDB
R
false
false
180
r
epa=read.csv("epa_lista.csv") nombres=read.csv("../DICCIONARIO.csv")[c("CAS","NOMBRE.QUIMICO")] A=merge(epa,nombres,by="CAS",all.x=TRUE) write.csv(A,"epa_lista_castellano.csv")
library(tidyverse) data <- read_csv("data/dataset_hr.csv", col_names = TRUE) data$index<-1:nrow(data) head(data) summary(data) data.long<-data%>%pivot_longer(cols=`14.6`:`661.2`,names_to = "size",values_to = "value") #no values below zero data.long%>%filter(value<0) #921 values of exactly zero. Fill ...
/code/correlation-matrix.R
no_license
OBaerenbold/UFP-TIES
R
false
false
3,953
r
library(tidyverse) data <- read_csv("data/dataset_hr.csv", col_names = TRUE) data$index<-1:nrow(data) head(data) summary(data) data.long<-data%>%pivot_longer(cols=`14.6`:`661.2`,names_to = "size",values_to = "value") #no values below zero data.long%>%filter(value<0) #921 values of exactly zero. Fill ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/report.R \name{report_progress} \alias{report_progress} \title{Print issue-milestone progress in RMarkdown friendly way} \usage{ report_progress(issues, group_var = "milestone_title", link_url = TRUE, show_ratio = TRUE, show_pct = TRUE) } \...
/man/report_progress.Rd
permissive
silvrwolfboy/projmgr
R
false
true
2,269
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/report.R \name{report_progress} \alias{report_progress} \title{Print issue-milestone progress in RMarkdown friendly way} \usage{ report_progress(issues, group_var = "milestone_title", link_url = TRUE, show_ratio = TRUE, show_pct = TRUE) } \...
#################### 1. Setting environment ################################## # Load SparkR spark_path <- '/usr/local/spark' if (nchar(Sys.getenv("SPARK_HOME")) < 1) { Sys.setenv(SPARK_HOME = spark_path) } library(SparkR, lib.loc = c(file.path(Sys.getenv("SPARK_HOME"), "R", "lib"))) sparkR.session(master = "ya...
/NYC Parking Ticket Case Study/NYC_case_study.R
no_license
nayakvidya/PGDDS-IIITB
R
false
false
45,366
r
#################### 1. Setting environment ################################## # Load SparkR spark_path <- '/usr/local/spark' if (nchar(Sys.getenv("SPARK_HOME")) < 1) { Sys.setenv(SPARK_HOME = spark_path) } library(SparkR, lib.loc = c(file.path(Sys.getenv("SPARK_HOME"), "R", "lib"))) sparkR.session(master = "ya...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/test.R \name{test} \alias{test} \title{Bootstrap based test for covariate selection} \usage{ test(x, y, method = "lm", family = "gaussian", nboot = 50, speedup = TRUE, qmin = NULL, unique = FALSE, q = NULL, bootseed = NULL, cluster = TRUE...
/man/test.Rd
no_license
sestelo/fwdselect
R
false
true
4,481
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/test.R \name{test} \alias{test} \title{Bootstrap based test for covariate selection} \usage{ test(x, y, method = "lm", family = "gaussian", nboot = 50, speedup = TRUE, qmin = NULL, unique = FALSE, q = NULL, bootseed = NULL, cluster = TRUE...
severity = function(mu0, xbar, sigma, n, alpha) { require(graphics) ### check inputs ### mu0 = as.integer(mu0) # make sure it is an integer n = as.integer(n) # make sure it is an integer sigma = as.numeric(sigma) alpha = as.numeric(alpha) if(class(xbar) != "numeric") { xbar = as.numeric(xbar) } ###...
/severity/R/severity.R
no_license
ingted/R-Examples
R
false
false
6,069
r
severity = function(mu0, xbar, sigma, n, alpha) { require(graphics) ### check inputs ### mu0 = as.integer(mu0) # make sure it is an integer n = as.integer(n) # make sure it is an integer sigma = as.numeric(sigma) alpha = as.numeric(alpha) if(class(xbar) != "numeric") { xbar = as.numeric(xbar) } ###...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/consistency.R \name{consistency} \alias{consistency} \alias{inconsistency} \title{MSC network meta-analysis models} \usage{ consistency(x, mods = NULL, ...) inconsistency(x, mods = NULL, ...) } \arguments{ \item{x}{A set of aggregated perfor...
/man/consistency.Rd
no_license
srhaile/mscpredmodel
R
false
true
2,407
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/consistency.R \name{consistency} \alias{consistency} \alias{inconsistency} \title{MSC network meta-analysis models} \usage{ consistency(x, mods = NULL, ...) inconsistency(x, mods = NULL, ...) } \arguments{ \item{x}{A set of aggregated perfor...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/exportMetaData.R \name{exportMetaData} \alias{exportMetaData} \alias{exportMetaData.redcapApiConnection} \alias{exportMetaData.redcapDbConnection} \title{Export Meta Data from a REDCap Database} \usage{ exportMetaData(rcon, ...) \method{expo...
/man/exportMetaData.Rd
no_license
thensle/redcapAPI
R
false
true
1,632
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/exportMetaData.R \name{exportMetaData} \alias{exportMetaData} \alias{exportMetaData.redcapApiConnection} \alias{exportMetaData.redcapDbConnection} \title{Export Meta Data from a REDCap Database} \usage{ exportMetaData(rcon, ...) \method{expo...
t <- read.table("household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?", colClasses = c('character','character','numeric','numeric','numeric','numeric','numeric','numeric','numeric')) ## Format date to Type Date t$Date <- as.Date(t$Date, "%d/%m/%Y") ## Filter data set from Feb. 1, 2007 to Feb. 2, 2007...
/plot3.R
no_license
N-Nirpeksh/ExData_Plotting1
R
false
false
1,199
r
t <- read.table("household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?", colClasses = c('character','character','numeric','numeric','numeric','numeric','numeric','numeric','numeric')) ## Format date to Type Date t$Date <- as.Date(t$Date, "%d/%m/%Y") ## Filter data set from Feb. 1, 2007 to Feb. 2, 2007...
# Generating automatic tests for input checks. for(dens in densities) { eval(call("context", paste0("Input check: ", dens))) eval(call("expect_error", call(dens, "x"))) eval(call("expect_error", call(dens, lm))) eval(call("expect_error", call(dens, replicate(3, 1:3)))) eval(call("expect_error", call(dens, NA...
/tests/testthat/test_automatic.R
permissive
vbaliga/univariateML
R
false
false
328
r
# Generating automatic tests for input checks. for(dens in densities) { eval(call("context", paste0("Input check: ", dens))) eval(call("expect_error", call(dens, "x"))) eval(call("expect_error", call(dens, lm))) eval(call("expect_error", call(dens, replicate(3, 1:3)))) eval(call("expect_error", call(dens, NA...
#' movies #' #' A dataframe containing information about the top 5000 grossing movies of all time. #' #' #' @format A data frame containing 5000 rows and 13 columns #' \describe{ #' \item{name}{Movie name} #' \item{rating}{MPAA rating} #' \item{genre}{Movie genre} #' \item{creative.type}{Creative type} #' \it...
/R/movies_doc.R
no_license
ndphillips/yarrr
R
false
false
872
r
#' movies #' #' A dataframe containing information about the top 5000 grossing movies of all time. #' #' #' @format A data frame containing 5000 rows and 13 columns #' \describe{ #' \item{name}{Movie name} #' \item{rating}{MPAA rating} #' \item{genre}{Movie genre} #' \item{creative.type}{Creative type} #' \it...
ff_opti_bisect_pmap_multi <- function(df, fc_withroot, fl_lower_x, fl_upper_x, ls_svr_df_in_func, svr_root_x = 'x', it_iter_tol = 50, fl_zero_tol = ...
/R/ff_opti_bisect.R
permissive
FanWangEcon/REconTools
R
false
false
7,594
r
ff_opti_bisect_pmap_multi <- function(df, fc_withroot, fl_lower_x, fl_upper_x, ls_svr_df_in_func, svr_root_x = 'x', it_iter_tol = 50, fl_zero_tol = ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/freqlist.R \name{freqlist} \alias{freqlist} \alias{freqlist.table} \alias{freqlist.formula} \title{freqlist} \usage{ freqlist(object, ...) \method{freqlist}{table}(object, na.options = c("include", "showexclude", "remove"), strata = NULL, ...
/man/freqlist.Rd
no_license
bzkrouse/arsenal
R
false
true
2,772
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/freqlist.R \name{freqlist} \alias{freqlist} \alias{freqlist.table} \alias{freqlist.formula} \title{freqlist} \usage{ freqlist(object, ...) \method{freqlist}{table}(object, na.options = c("include", "showexclude", "remove"), strata = NULL, ...
# load packages library(sf) library(raster) suppressMessages(library(dplyr)) library(mapview) # set paths data_dir <- "data/NDR/" # utility functions raster_sum <- function(x) sum(x[], na.rm = TRUE) get_values_from_rasters <- function(sf_point, raster_list){ lapply(raster_list, function(x) raster::extract(x, sf_po...
/scripts/99_utils.R
no_license
jsta/invest_ndr
R
false
false
328
r
# load packages library(sf) library(raster) suppressMessages(library(dplyr)) library(mapview) # set paths data_dir <- "data/NDR/" # utility functions raster_sum <- function(x) sum(x[], na.rm = TRUE) get_values_from_rasters <- function(sf_point, raster_list){ lapply(raster_list, function(x) raster::extract(x, sf_po...
library(plyr) library(ggplot2) if(!exists("NEI")) NEI <- readRDS("exdata_data_NEI_data/summarySCC_PM25.rds") if(!exists("SCC")) SCC <- readRDS("exdata_data_NEI_data/Source_Classification_Code.rds") scCoal <- SCC[grepl("coal", tolower(SCC$EI.Sector)),] data <- join(scCoal, NEI, by="SCC", type="inner") aggData <- dat...
/plot4.R
permissive
Vongo/Exploratory2
R
false
false
1,026
r
library(plyr) library(ggplot2) if(!exists("NEI")) NEI <- readRDS("exdata_data_NEI_data/summarySCC_PM25.rds") if(!exists("SCC")) SCC <- readRDS("exdata_data_NEI_data/Source_Classification_Code.rds") scCoal <- SCC[grepl("coal", tolower(SCC$EI.Sector)),] data <- join(scCoal, NEI, by="SCC", type="inner") aggData <- dat...
#' Exponential distribution maximum likelihood estimation #' #' The maximum likelihood estimate of `rate` is the inverse sample mean. #' #' For the density function of the exponential distribution see #' [Exponential][stats::Exponential]. #' #' @param x a (non-empty) numeric vector of data values. #' @param na.rm lo...
/R/mlexp.R
permissive
JonasMoss/univariateML
R
false
false
1,782
r
#' Exponential distribution maximum likelihood estimation #' #' The maximum likelihood estimate of `rate` is the inverse sample mean. #' #' For the density function of the exponential distribution see #' [Exponential][stats::Exponential]. #' #' @param x a (non-empty) numeric vector of data values. #' @param na.rm lo...
library(ggplot2) library(dplyr) source('R/analysis_utils.R') rna.meta <- readRDS('seurat/RNA_seq_metadata.rds') atac.meta <- readRDS('ATAC_metadata_df.rds') atac.meta$sample <- rna.meta$sample comb.meta <- rbind(rna.meta, atac.meta) comb.meta$Assay <- c(rep("RNA",18),rep("ATAC",18)) collapsed.comb.meta <- comb.meta...
/R/plot_metadata.R
no_license
sq-96/heart_atlas
R
false
false
1,965
r
library(ggplot2) library(dplyr) source('R/analysis_utils.R') rna.meta <- readRDS('seurat/RNA_seq_metadata.rds') atac.meta <- readRDS('ATAC_metadata_df.rds') atac.meta$sample <- rna.meta$sample comb.meta <- rbind(rna.meta, atac.meta) comb.meta$Assay <- c(rep("RNA",18),rep("ATAC",18)) collapsed.comb.meta <- comb.meta...
setwd("~/dev/prime_project/R_code/data/") # loading the variables names based on the NHANES code book source("./real_data/NHANES/subset_data_based_on_hypothesis/variable_names/exposure_name_loading.R") # loading some helper functions for update LC source("./real_data/NHANES/subset_data_based_on_hypothesis/LC_update.R")...
/R_code/data/real_data/NHANES/subset_data_based_on_hypothesis/missing_PCB_and_LC.R
no_license
wal615/prime_project
R
false
false
8,421
r
setwd("~/dev/prime_project/R_code/data/") # loading the variables names based on the NHANES code book source("./real_data/NHANES/subset_data_based_on_hypothesis/variable_names/exposure_name_loading.R") # loading some helper functions for update LC source("./real_data/NHANES/subset_data_based_on_hypothesis/LC_update.R")...
## ui.R library(shiny) library(rCharts) shinyUI(fluidPage( conditionalPanel( titlePanel("Przykład rCharts")), sidebarLayout( sidebarPanel( selectInput("rodzaj", label = "Wybierz rodzaj wykresu:", choices = list("slupkowy", "liniowy"), selected = "liniowy"), ...
/magisterskie/5_rok/1_semestr/TWDwR/laboratoria/RCharts/G3/ui.R
no_license
sommermarta/studia
R
false
false
733
r
## ui.R library(shiny) library(rCharts) shinyUI(fluidPage( conditionalPanel( titlePanel("Przykład rCharts")), sidebarLayout( sidebarPanel( selectInput("rodzaj", label = "Wybierz rodzaj wykresu:", choices = list("slupkowy", "liniowy"), selected = "liniowy"), ...
options(scipen=100) setDir="" # Rscript plot_signif_TADs_overallTop.R # Rscript plot_signif_TADs_overallTop.R wt_vs_mut # Rscript plot_signif_TADs_overallTop.R norm_vs_tumor # Rscript plot_signif_TADs_overallTop.R subtypes script_name <- "plot_signif_TADs_overallTop.R" startTime <- Sys.time() cat("> START ", scrip...
/plot_signif_TADs_overallTop.R
no_license
marzuf/v2_Yuanlong_Cancer_HiC_data_TAD_DA
R
false
false
3,362
r
options(scipen=100) setDir="" # Rscript plot_signif_TADs_overallTop.R # Rscript plot_signif_TADs_overallTop.R wt_vs_mut # Rscript plot_signif_TADs_overallTop.R norm_vs_tumor # Rscript plot_signif_TADs_overallTop.R subtypes script_name <- "plot_signif_TADs_overallTop.R" startTime <- Sys.time() cat("> START ", scrip...
### R code from vignette source 'cias.Rnw' ################################################### ### code chunk number 1: set_seed_chunk ################################################### set.seed(0) ################################################### ### code chunk number 2: time_saver ##############################...
/inst/doc/cias.R
no_license
cran/multivator
R
false
false
3,985
r
### R code from vignette source 'cias.Rnw' ################################################### ### code chunk number 1: set_seed_chunk ################################################### set.seed(0) ################################################### ### code chunk number 2: time_saver ##############################...
rm(list=ls()) ##Installing and loading libraries (RUN THIS PART LINE BY LINE!!)#### # Install and load package devtools if (!requireNamespace("devtools")) install.packages("devtools") library("devtools") #Use of version 2.0.2 # Install and load package Bikecourse install_github('NDFabri/Bike_sharing_course/packages...
/scripts/Bike sharing.R
no_license
NDFabri/Bike_sharing_course
R
false
false
4,716
r
rm(list=ls()) ##Installing and loading libraries (RUN THIS PART LINE BY LINE!!)#### # Install and load package devtools if (!requireNamespace("devtools")) install.packages("devtools") library("devtools") #Use of version 2.0.2 # Install and load package Bikecourse install_github('NDFabri/Bike_sharing_course/packages...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/abundance.R \name{abundance} \alias{abundance} \title{Abundance} \usage{ abundance( phylo_ob, level = "genus", id = "abcno", sample_id = "Time", relative_abun = TRUE, strata = NULL, strata_val = NULL, remove_collapsed_taxa = F...
/man/abundance.Rd
no_license
jstokholm/abundance
R
false
true
1,401
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/abundance.R \name{abundance} \alias{abundance} \title{Abundance} \usage{ abundance( phylo_ob, level = "genus", id = "abcno", sample_id = "Time", relative_abun = TRUE, strata = NULL, strata_val = NULL, remove_collapsed_taxa = F...
\name{bas.glm} \alias{bas.glm} \title{Bayesian Adaptive Sampling Without Replacement for Variable Selection in Generalized Linear Models} \description{Sample with or without replacement from a posterior distribution on GLMs} \usage{ bas.glm(formula, family = binomial(link = "logit"), data, weights, subset, offset, na...
/man/bas.glm.Rd
no_license
aespar21/BAS
R
false
false
10,150
rd
\name{bas.glm} \alias{bas.glm} \title{Bayesian Adaptive Sampling Without Replacement for Variable Selection in Generalized Linear Models} \description{Sample with or without replacement from a posterior distribution on GLMs} \usage{ bas.glm(formula, family = binomial(link = "logit"), data, weights, subset, offset, na...
rm(list=ls()) #Some functions and code to simulate predators depending on prey abundance #######Some Functions######### ###Function to calculate unfished "SSBR", and abundance or biomass, or equilibrium characteristics given exploitation rate for delay-difference dynamics with Beverton-Holt SR. #function(unfishedspr,d...
/PredScriptArchive/MSE_TernLink_AssBias.R
no_license
sgaichas/herringMSE
R
false
false
16,137
r
rm(list=ls()) #Some functions and code to simulate predators depending on prey abundance #######Some Functions######### ###Function to calculate unfished "SSBR", and abundance or biomass, or equilibrium characteristics given exploitation rate for delay-difference dynamics with Beverton-Holt SR. #function(unfishedspr,d...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/generateNoiseImage.R \name{generateNoiseImage} \alias{generateNoiseImage} \title{Generate single noise image based on parameter vector} \usage{ generateNoiseImage(params, p) } \arguments{ \item{params}{Vector with each value specifying the co...
/man/generateNoiseImage.Rd
no_license
rdotsch/rcicr
R
false
true
714
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/generateNoiseImage.R \name{generateNoiseImage} \alias{generateNoiseImage} \title{Generate single noise image based on parameter vector} \usage{ generateNoiseImage(params, p) } \arguments{ \item{params}{Vector with each value specifying the co...
test_metrics <- kf_init_metrics() test_that("Input validation works", { expect_error(kf_add_metric(test_metrics, "ROC"), "Name does not match required pattern.") expect_error(kf_add_metric(test_metrics, name = "roc", value = "15"), "Value must be numeric.") expect_error(kf_add_metric(test_metrics, name = "roc", ...
/tests/testthat/test-kf_add_metric.R
permissive
ndiquattro/kflow
R
false
false
1,012
r
test_metrics <- kf_init_metrics() test_that("Input validation works", { expect_error(kf_add_metric(test_metrics, "ROC"), "Name does not match required pattern.") expect_error(kf_add_metric(test_metrics, name = "roc", value = "15"), "Value must be numeric.") expect_error(kf_add_metric(test_metrics, name = "roc", ...
#' Bisulfite conversion rate visualization #' #'Plot the bisulfite conversion rate for each sample #'based on the pheno data in the bs object #'@param bs bsseq object #'@return Plot showing bisulfite conversion rate for each sample #'@examples #'directory <- system.file("extdata/bismark_data", package='scmeth') #'bs <-...
/R/bsConversionPlot.R
no_license
aryeelab/scmeth
R
false
false
811
r
#' Bisulfite conversion rate visualization #' #'Plot the bisulfite conversion rate for each sample #'based on the pheno data in the bs object #'@param bs bsseq object #'@return Plot showing bisulfite conversion rate for each sample #'@examples #'directory <- system.file("extdata/bismark_data", package='scmeth') #'bs <-...
setwd("C:/Users/lorenzo/Documents/Master in Economics/Programming Course/R/Hackathon") #Inserting sample B B <- read_csv("sample_B.csv", col_types = cols(new_hrs = col_double(), new_wage = col_double())) B #Table 2 #Period: 1967-79 B_6779 <- filter(B, year %in% 1968:1980) B_6779 %>% group_by(sex) %>% summarize(m...
/Lorenzo/Table2.R
no_license
lorenzokaaks/Hackathon18
R
false
false
1,638
r
setwd("C:/Users/lorenzo/Documents/Master in Economics/Programming Course/R/Hackathon") #Inserting sample B B <- read_csv("sample_B.csv", col_types = cols(new_hrs = col_double(), new_wage = col_double())) B #Table 2 #Period: 1967-79 B_6779 <- filter(B, year %in% 1968:1980) B_6779 %>% group_by(sex) %>% summarize(m...
# Create graphs for visualizations # set seed for random processes set.seed(617) library(igraph) library('cluster') library('animation') # Set to directory which contains files setwd('/Users/angelavierling-claassen/Documents/DataScience/GayGraphs/DataFromTrials') # read in the graph edges data and the nodes data g...
/gaygraph_viz_old.R
no_license
techtronics/GayGraphs
R
false
false
8,665
r
# Create graphs for visualizations # set seed for random processes set.seed(617) library(igraph) library('cluster') library('animation') # Set to directory which contains files setwd('/Users/angelavierling-claassen/Documents/DataScience/GayGraphs/DataFromTrials') # read in the graph edges data and the nodes data g...
### ### low-level file handling functions ### ## txt format get_txt <- function(f, ...) { txt <- paste(readLines(con <- file(f, ...), warn = FALSE), collapse = "\n") close(con) data.frame(text = txt, stringsAsFactors = FALSE) } ## csv format get_csv <- function(path, text_field, ...) { args <- list...
/R/get-functions.R
no_license
thrinu/readtext
R
false
false
8,879
r
### ### low-level file handling functions ### ## txt format get_txt <- function(f, ...) { txt <- paste(readLines(con <- file(f, ...), warn = FALSE), collapse = "\n") close(con) data.frame(text = txt, stringsAsFactors = FALSE) } ## csv format get_csv <- function(path, text_field, ...) { args <- list...
# Install and load packages package_names <- c("survey","dplyr","foreign","devtools") lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x)) lapply(package_names, require, character.only=T) install_github("e-mitchell/meps_r_pkg/MEPS") library(MEPS) options(survey.lonely.ps...
/mepstrends/hc_use/json/code/r/totEXP__insurance__poverty__.r
permissive
RandomCriticalAnalysis/MEPS-summary-tables
R
false
false
2,729
r
# Install and load packages package_names <- c("survey","dplyr","foreign","devtools") lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x)) lapply(package_names, require, character.only=T) install_github("e-mitchell/meps_r_pkg/MEPS") library(MEPS) options(survey.lonely.ps...
########################################################################## # # R version: # # File Name: # # Author: # # Process: # # Inputs: # # Outputs: # # File history: ########################################################################## setwd("/Users/fabiotejedor/Documents/TU_Delft_University/Thesis_Projec...
/03_pca_socioeconomic.R
no_license
fhtejedorg/Airbnb_Gentrification_AMS
R
false
false
29,723
r
########################################################################## # # R version: # # File Name: # # Author: # # Process: # # Inputs: # # Outputs: # # File history: ########################################################################## setwd("/Users/fabiotejedor/Documents/TU_Delft_University/Thesis_Projec...
# ---- functions-to-examine-temporal-patterns ------------------- # examine the pattern of measures over time for a given individual temporal_pattern <- function(d,time, measure, seed_value = 42){ set.seed(seed_value) d_long <- d (ids <- sample(unique(d_long$id),1)) d1 <-d_long %>% dplyr::filter(id %in% ids...
/scripts/common-functions.R
no_license
casslbrown/brown-2017-disseration
R
false
false
3,669
r
# ---- functions-to-examine-temporal-patterns ------------------- # examine the pattern of measures over time for a given individual temporal_pattern <- function(d,time, measure, seed_value = 42){ set.seed(seed_value) d_long <- d (ids <- sample(unique(d_long$id),1)) d1 <-d_long %>% dplyr::filter(id %in% ids...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/onsite.R \name{get_mesoonsite} \alias{get_mesoonsite} \title{Get mesocosm onsite data} \usage{ get_mesoonsite(onsitepath = file.path("Raw", "onsite"), experiment = "SoilPlant") } \arguments{ \item{onsitepath}{character file.path to onsite r...
/man/get_mesoonsite.Rd
no_license
jsta/peatcollapse
R
false
true
556
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/onsite.R \name{get_mesoonsite} \alias{get_mesoonsite} \title{Get mesocosm onsite data} \usage{ get_mesoonsite(onsitepath = file.path("Raw", "onsite"), experiment = "SoilPlant") } \arguments{ \item{onsitepath}{character file.path to onsite r...
wd <- getwd() setwd("/Users/bobfridley/Documents/Coursera/03 - Getting and Cleaning Data/R-wd") # load packages using sapply # non-verbose (no package messages) packages <- c("dplyr", "data.table") loadp <- sapply(packages, library, character.only=TRUE, quietly=TRUE, logical.return=TRUE) if (!all(loadp)) { ...
/R-wd/quiz3-3.R
no_license
bobfridley/03-Getting-and-Cleaning-Data
R
false
false
2,104
r
wd <- getwd() setwd("/Users/bobfridley/Documents/Coursera/03 - Getting and Cleaning Data/R-wd") # load packages using sapply # non-verbose (no package messages) packages <- c("dplyr", "data.table") loadp <- sapply(packages, library, character.only=TRUE, quietly=TRUE, logical.return=TRUE) if (!all(loadp)) { ...
library(gamlss.countKinf) ### Name: KINBF ### Title: K-inflated Negative Binomial Family distributions for fitting a ### GAMLSS model ### Aliases: KINBF dKINBF pKINBF qKINBF rKINBF ### Keywords: distribution regression ### ** Examples #------------------------------------------------------------------------------...
/data/genthat_extracted_code/gamlss.countKinf/examples/KINBF.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
2,737
r
library(gamlss.countKinf) ### Name: KINBF ### Title: K-inflated Negative Binomial Family distributions for fitting a ### GAMLSS model ### Aliases: KINBF dKINBF pKINBF qKINBF rKINBF ### Keywords: distribution regression ### ** Examples #------------------------------------------------------------------------------...
####TEAD2 dependency in pancancer library("ggplot2") library("ggthemes") data=read.delim("D:/demo/TEAD2_dependency_pancancer.txt",head=T,sep="\t") p=ggplot(data,aes(x=Cancer_type,y=TEAD2)) pp=p+geom_boxplot(size=1,color="pink")+geom_point(size=3,color="black") pp+theme_bw()+ylim(-3,3) ####YAP1 dependency in pa...
/dependency in pancancer.R
no_license
dreamerwu/Gene-dependency-in-pancancer
R
false
false
1,060
r
####TEAD2 dependency in pancancer library("ggplot2") library("ggthemes") data=read.delim("D:/demo/TEAD2_dependency_pancancer.txt",head=T,sep="\t") p=ggplot(data,aes(x=Cancer_type,y=TEAD2)) pp=p+geom_boxplot(size=1,color="pink")+geom_point(size=3,color="black") pp+theme_bw()+ylim(-3,3) ####YAP1 dependency in pa...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.13693025791547e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(10L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling...
/CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615779108-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
348
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.13693025791547e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(10L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling...
#' Setup environment variables for \code{slack.com} API #' #' Initialize all the environment variables \link{slackr} will need to use to #' work properly. #' #' By default, \code{slackr} (and other functions) will use the \code{#general} room and a username #' of \code{slackr()} with no emoji and the default \url{slack...
/R/slackr.R
no_license
arturochian/slackr
R
false
false
18,143
r
#' Setup environment variables for \code{slack.com} API #' #' Initialize all the environment variables \link{slackr} will need to use to #' work properly. #' #' By default, \code{slackr} (and other functions) will use the \code{#general} room and a username #' of \code{slackr()} with no emoji and the default \url{slack...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{kremlin_en} \alias{kremlin_en} \title{A dataset including all contents published on the English-language version of [kremlin.ru} \format{ A data frame with 24338 rows and 8 columns: \describe{ \item{doc_id}{the id ...
/man/kremlin_en.Rd
permissive
giocomai/tifkremlinen
R
false
true
1,592
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{kremlin_en} \alias{kremlin_en} \title{A dataset including all contents published on the English-language version of [kremlin.ru} \format{ A data frame with 24338 rows and 8 columns: \describe{ \item{doc_id}{the id ...
# Load app library(shiny) library(ggplot2) # Define UI for application that draws a histogram shinyUI(fluidPage( # Application title titlePanel("Correlation on Life Expectancy at Birth around the world (2015)"), # Sidebar sidebarLayout( sidebarPanel( radioButtons("radio", label = h3("Economic ...
/ui.R
no_license
jkosuke/ShinyApp
R
false
false
2,175
r
# Load app library(shiny) library(ggplot2) # Define UI for application that draws a histogram shinyUI(fluidPage( # Application title titlePanel("Correlation on Life Expectancy at Birth around the world (2015)"), # Sidebar sidebarLayout( sidebarPanel( radioButtons("radio", label = h3("Economic ...
dataset<-read.table("household_power_consumption.txt",header=TRUE,sep=";",dec=".") dataset$Date2<-as.Date(as.character(dataset$Date),"%d/%m/%Y") newdata<-subset(dataset,Date2 >= as.Date("2007-02-01")) newdata2<-subset(newdata,Date2 <= as.Date("2007-02-02")) newdata2$datetime<-strptime(paste(newdata2$Date,newdata2$Time)...
/plot4.R
no_license
gitjo-1997/ExData_Plotting1
R
false
false
1,112
r
dataset<-read.table("household_power_consumption.txt",header=TRUE,sep=";",dec=".") dataset$Date2<-as.Date(as.character(dataset$Date),"%d/%m/%Y") newdata<-subset(dataset,Date2 >= as.Date("2007-02-01")) newdata2<-subset(newdata,Date2 <= as.Date("2007-02-02")) newdata2$datetime<-strptime(paste(newdata2$Date,newdata2$Time)...
## ## intsurv: Integrative Survival Models ## Copyright (C) 2017-2019 Wenjie Wang <wjwang.stat@gmail.com> ## ## This file is part of the R package intsurv. ## ## The R package intsurv is free software: You can redistribute it and/or ## modify it under the terms of the GNU General Public License as published by ## the ...
/fuzzedpackages/intsurv/R/simData4cure.R
no_license
akhikolla/testpackages
R
false
false
7,942
r
## ## intsurv: Integrative Survival Models ## Copyright (C) 2017-2019 Wenjie Wang <wjwang.stat@gmail.com> ## ## This file is part of the R package intsurv. ## ## The R package intsurv is free software: You can redistribute it and/or ## modify it under the terms of the GNU General Public License as published by ## the ...
rm(list=ls()) library(ggplot2);library(cvTools);library(MASS);library(plyr);library(dplyr); library(ggeffects);library(tseries); library(plm); library(nlme); library(lme4); library(lattice); library(car); library(lmerTest); library(optimx) load("dataFS/Main/DaTS.RData") # load("Rcodes/DecemberNew/KEN11d_stepNice.RData"...
/ddplyNewbie2.R
no_license
MonikaNovackova/Rvarious
R
false
false
3,672
r
rm(list=ls()) library(ggplot2);library(cvTools);library(MASS);library(plyr);library(dplyr); library(ggeffects);library(tseries); library(plm); library(nlme); library(lme4); library(lattice); library(car); library(lmerTest); library(optimx) load("dataFS/Main/DaTS.RData") # load("Rcodes/DecemberNew/KEN11d_stepNice.RData"...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/temp.kalman.R \name{temp.kalman} \alias{temp.kalman} \title{Smooth temperature time series using a Kalman filter/ smoother} \usage{ temp.kalman(wtr, watts, ampH=1, ...) } \arguments{ \item{wtr}{Vector (regular time series) of water t...
/man/temp.kalman.Rd
no_license
cran/LakeMetabolizer
R
false
true
1,106
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/temp.kalman.R \name{temp.kalman} \alias{temp.kalman} \title{Smooth temperature time series using a Kalman filter/ smoother} \usage{ temp.kalman(wtr, watts, ampH=1, ...) } \arguments{ \item{wtr}{Vector (regular time series) of water t...
#' @title XXX #' #' @description XXX #' #' @export qtrend.f <- function(year,quarter,start.year=1958){ #Function to calculate 'trend' vector for time-series: nyear=year-start.year trend=quarter+nyear*4 trend }
/R/qtrend.r
no_license
einarhjorleifsson/datrasr
R
false
false
213
r
#' @title XXX #' #' @description XXX #' #' @export qtrend.f <- function(year,quarter,start.year=1958){ #Function to calculate 'trend' vector for time-series: nyear=year-start.year trend=quarter+nyear*4 trend }
# 1 library(ggplot2) z <- ggplot(Eggs, aes(x = Week, y = Cases)) z + geom_point(aes(color = factor(Easter))) # 2 df <- Eggs[,c(1,6:10)] g <- ggplot(df, aes(Week)) g <- g + geom_line(aes(y=Egg.Pr), colour="red") g <- g + geom_line(aes(y=Beef.Pr), colour="green") g <- g + geom_line(aes(y=Pork.Pr), colour="yellow") g <...
/SGH/R/h2/h2.R
no_license
Valkoiset/myrepo
R
false
false
498
r
# 1 library(ggplot2) z <- ggplot(Eggs, aes(x = Week, y = Cases)) z + geom_point(aes(color = factor(Easter))) # 2 df <- Eggs[,c(1,6:10)] g <- ggplot(df, aes(Week)) g <- g + geom_line(aes(y=Egg.Pr), colour="red") g <- g + geom_line(aes(y=Beef.Pr), colour="green") g <- g + geom_line(aes(y=Pork.Pr), colour="yellow") g <...
#!/usr/bin/Rscript # inverse_methods.R Author "Nathan Wycoff <nathanbrwycoff@gmail.com>" Date 10.03.2017 source("forward_methods.R") #TODO: Inverse methods may not work due to change of syntax for forward methods ################################################################################ ## Functions for inverse...
/dev/inverse_methods.R
permissive
NathanWycoff/mds.methods
R
false
false
4,003
r
#!/usr/bin/Rscript # inverse_methods.R Author "Nathan Wycoff <nathanbrwycoff@gmail.com>" Date 10.03.2017 source("forward_methods.R") #TODO: Inverse methods may not work due to change of syntax for forward methods ################################################################################ ## Functions for inverse...
testlist <- list(A = structure(c(1.38997190095789e-309, 3.81575932257023e-236, 3.81571422914747e-236), .Dim = c(1L, 3L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613125918-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
226
r
testlist <- list(A = structure(c(1.38997190095789e-309, 3.81575932257023e-236, 3.81571422914747e-236), .Dim = c(1L, 3L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
##################################### ## VARIOUS PACKAGES REQUIRED ##################################### ## Back End # Project Pursuit Package for Hyperplane SOlution library(PPCI) # JPEG package to read in Image library(jpeg) # Package to convert Data into Long Format library...
/server.R
no_license
JacobBradleyKenyon/hyper-planes-in-images
R
false
false
24,876
r
##################################### ## VARIOUS PACKAGES REQUIRED ##################################### ## Back End # Project Pursuit Package for Hyperplane SOlution library(PPCI) # JPEG package to read in Image library(jpeg) # Package to convert Data into Long Format library...
testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032927L, 1837701012L, 1632068659L), pts = c(1758370433L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,...
/IntervalSurgeon/inst/testfiles/rcpp_pile/AFL_rcpp_pile/rcpp_pile_valgrind_files/1609860670-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
728
r
testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032927L, 1837701012L, 1632068659L), pts = c(1758370433L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,...
\name{nonadditivity} \alias{nonadditivity} %- nonadditivity. \title{ Nonadditivity model test } \description{ The resistance for the transformable nonadditivity, due to J. W. Tukey, is based on the detection of a curvilinear relation between y-est(y) and est(y). A freedom degree for the transformable nona...
/man/nonadditivity.Rd
no_license
JeanLescut/agricolae
R
false
false
1,595
rd
\name{nonadditivity} \alias{nonadditivity} %- nonadditivity. \title{ Nonadditivity model test } \description{ The resistance for the transformable nonadditivity, due to J. W. Tukey, is based on the detection of a curvilinear relation between y-est(y) and est(y). A freedom degree for the transformable nona...
ca <- commandArgs(trailingOnly = TRUE) cat(" * compiling list of required packages\n") pkglib <- file.path("Installer", "iNZightVIT", ".library") if (!dir.exists(pkglib)) dir.create(pkglib) pkgversions <- installed.packages(pkglib)[, 'Version'] repos <- c('https://r.docker.stat.auckland.ac.nz', 'https://cran.stat.auc...
/bootstrap.R
no_license
iNZightVIT/iNZightVIT-osx-installer
R
false
false
2,871
r
ca <- commandArgs(trailingOnly = TRUE) cat(" * compiling list of required packages\n") pkglib <- file.path("Installer", "iNZightVIT", ".library") if (!dir.exists(pkglib)) dir.create(pkglib) pkgversions <- installed.packages(pkglib)[, 'Version'] repos <- c('https://r.docker.stat.auckland.ac.nz', 'https://cran.stat.auc...
## Downloading the data and unzipping it if(!file.exists("household_power_consumption.txt")) { download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", destfile = "data.zip") unzip("data.zip") } ## Reading data and keeping only certain dates data <- read.table("househo...
/plot3.R
no_license
vlavikainen/ExData_Plotting1
R
false
false
1,155
r
## Downloading the data and unzipping it if(!file.exists("household_power_consumption.txt")) { download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", destfile = "data.zip") unzip("data.zip") } ## Reading data and keeping only certain dates data <- read.table("househo...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scoring_matrices.R \name{make_scoring_matrix_aem} \alias{make_scoring_matrix_aem} \title{Make scoring matrix} \usage{ make_scoring_matrix_aem( responses, sequence = c("mae", "mea", "aem", "ame", "ema", "eam", "gpcm"), nMiddle = 2L, nE...
/man/make_scoring_matrix_aem.Rd
no_license
tzoltak/rstyles
R
false
true
5,857
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scoring_matrices.R \name{make_scoring_matrix_aem} \alias{make_scoring_matrix_aem} \title{Make scoring matrix} \usage{ make_scoring_matrix_aem( responses, sequence = c("mae", "mea", "aem", "ame", "ema", "eam", "gpcm"), nMiddle = 2L, nE...
mcia <- function (df.list, cia.nf = 2, cia.scan = FALSE, nsc = T, svd=TRUE) { df.list <- lapply (df.list, function(x) { if (inherits(x, "ExpressionSet")) { r <- made4:::getdata(x) } else { r <- x } return(r) }) for (i in names(df.list)) { df <- df.list[[i]] minn <- min(df) ...
/R/mcia.R
no_license
aedin/omicade4
R
false
false
4,234
r
mcia <- function (df.list, cia.nf = 2, cia.scan = FALSE, nsc = T, svd=TRUE) { df.list <- lapply (df.list, function(x) { if (inherits(x, "ExpressionSet")) { r <- made4:::getdata(x) } else { r <- x } return(r) }) for (i in names(df.list)) { df <- df.list[[i]] minn <- min(df) ...
### Utah DWQ Lake Dashboard ### Jake Vander Laan, Utah DWQ, jvander@utah.gov ### Version 3.0 2022 including 2022 IR data library(wqTools) library(leaflet) library(plotly) #heatmap_param_choices=c("Dissolved oxygen (DO)","Temperature, water","pH","DO-temperature habitat profile width") #names(heatmap_param_choices)=c...
/inst/lakeDashboard/app.r
permissive
utah-dwq/irTools
R
false
false
24,481
r
### Utah DWQ Lake Dashboard ### Jake Vander Laan, Utah DWQ, jvander@utah.gov ### Version 3.0 2022 including 2022 IR data library(wqTools) library(leaflet) library(plotly) #heatmap_param_choices=c("Dissolved oxygen (DO)","Temperature, water","pH","DO-temperature habitat profile width") #names(heatmap_param_choices)=c...
# This function calculates the number of characters from the beginning before the first mismatch between two strings # # .datatable.aware=TRUE #You have to declare this at https://github.com/tidyverse/dplyr/issues/548 firstmismatch <- function(a, b, verbose=T) { dt <- data.table::data.table(a = a, ...
/R/first_match.r
no_license
jelenavicic/MeasuringLandscape
R
false
false
2,303
r
# This function calculates the number of characters from the beginning before the first mismatch between two strings # # .datatable.aware=TRUE #You have to declare this at https://github.com/tidyverse/dplyr/issues/548 firstmismatch <- function(a, b, verbose=T) { dt <- data.table::data.table(a = a, ...
#'The function pareto() will take a vector of numbers (and also titles) and will #'display a pareto chart of the data. This chart includes a barplot of individual #'values represented in descending order, as well as the cumulative total #'represented by the line. The data used to represent this function is from Assignm...
/PackageZuyus/R/pareto.R
no_license
marissazuyus/Stat_PackageZuyus
R
false
false
1,203
r
#'The function pareto() will take a vector of numbers (and also titles) and will #'display a pareto chart of the data. This chart includes a barplot of individual #'values represented in descending order, as well as the cumulative total #'represented by the line. The data used to represent this function is from Assignm...
/PCA_RF.R
no_license
jgshim/PONV
R
false
false
4,498
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.r \name{get_request_type} \alias{get_request_type} \alias{is_get} \alias{is_post} \title{Retrieve or test request type} \usage{ get_request_type(har_resp_obj) is_get(har_resp_obj) is_post(har_resp_obj) } \arguments{ \item{har_resp_o...
/man/get_request_type.Rd
no_license
nikolayvoronchikhin/splashr
R
false
true
628
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.r \name{get_request_type} \alias{get_request_type} \alias{is_get} \alias{is_post} \title{Retrieve or test request type} \usage{ get_request_type(har_resp_obj) is_get(har_resp_obj) is_post(har_resp_obj) } \arguments{ \item{har_resp_o...
# D33 data raw_data <- read.table("data/D33/processed/mas5-original.tsv", sep = "\t", header = T, row.names = 1) yeoh_data <- read.table("data/GSE67684/processed/mas5_ordered.tsv", sep = "\t", header = T, row.names = 1) select_logvec <- rownames(raw_data) %in% rownames(ye...
/preprocess/process_data-d33_normal.R
no_license
dblux/relapse_prediction
R
false
false
923
r
# D33 data raw_data <- read.table("data/D33/processed/mas5-original.tsv", sep = "\t", header = T, row.names = 1) yeoh_data <- read.table("data/GSE67684/processed/mas5_ordered.tsv", sep = "\t", header = T, row.names = 1) select_logvec <- rownames(raw_data) %in% rownames(ye...
glPcaFast <- function(x, center=TRUE, scale=FALSE, nf=NULL, loadings=TRUE, alleleAsUnit=FALSE, returnDotProd=FALSE){ if(!inherits(x, "genlight")) stop("x is not a genlight object") # k...
/program_comparison_PCA/glPcaFast_script.R
no_license
mnr006/Ritter_Defense_2019
R
false
false
3,921
r
glPcaFast <- function(x, center=TRUE, scale=FALSE, nf=NULL, loadings=TRUE, alleleAsUnit=FALSE, returnDotProd=FALSE){ if(!inherits(x, "genlight")) stop("x is not a genlight object") # k...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fence.lmer.R \name{fence.lmer} \alias{fence.lmer} \title{Fence model selection (Linear Mixed Model)} \usage{ fence.lmer(full, data, B = 100, grid = 101, fence = c("adaptive", "nonadaptive"), cn = NA, REML = TRUE, bandwidth = NA, c...
/man/fence.lmer.Rd
no_license
cran/fence
R
false
true
3,413
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fence.lmer.R \name{fence.lmer} \alias{fence.lmer} \title{Fence model selection (Linear Mixed Model)} \usage{ fence.lmer(full, data, B = 100, grid = 101, fence = c("adaptive", "nonadaptive"), cn = NA, REML = TRUE, bandwidth = NA, c...
# Load activity labels from activity_labels.txt activity_labels <- read.table("activity_labels.txt") names(activity_labels) <- c("activity code", "activity") # Load features from features.txt features <- read.table("features.txt")[, 2] # Load training data from files in train subdirectory subject_train <- read.table(...
/run_analysis.R
no_license
mristic/getting_and_cleaning_data_project
R
false
false
2,116
r
# Load activity labels from activity_labels.txt activity_labels <- read.table("activity_labels.txt") names(activity_labels) <- c("activity code", "activity") # Load features from features.txt features <- read.table("features.txt")[, 2] # Load training data from files in train subdirectory subject_train <- read.table(...
library(ggplot2) qplot(factor(names(prob), levels = names(prob)), hebrew, geom = "histogram")
/Programming Language Detection/Experiment-2/Dataset/Train/R/probabilistic-choice-2.r
no_license
dlaststark/machine-learning-projects
R
false
false
94
r
library(ggplot2) qplot(factor(names(prob), levels = names(prob)), hebrew, geom = "histogram")
### ### Prune tree tips based on an imported .csv file ### Prune.Tree <- function(SPECIES_TO_REMOVE,TREE,SAVE_FILE){ PRUNED_TREE<-drop.tip(TREE,TREE$tip.label[SPECIES_TO_REMOVE]) write.tree(PRUNED_TREE,file=SAVE_FILE) return(PRUNED_TREE) }
/DNC_Toolbox/Prune_Tree.R
no_license
Gene-Weaver/Testing-Darwin-s-Naturalization-Conundrum
R
false
false
253
r
### ### Prune tree tips based on an imported .csv file ### Prune.Tree <- function(SPECIES_TO_REMOVE,TREE,SAVE_FILE){ PRUNED_TREE<-drop.tip(TREE,TREE$tip.label[SPECIES_TO_REMOVE]) write.tree(PRUNED_TREE,file=SAVE_FILE) return(PRUNED_TREE) }
library(tidyverse) library(plotly) library(htmlwidgets) library(argparser) library(methods) # Purpose: This script takes the RAW output from sambamba and produces summary tables and plots highlighting the uniformity of coverage # Usage: Rscript sambamba_exon_coverage.R --args "/path_to_folder/exon_coverage" # Functi...
/sambamba_exon_coverage.R
no_license
moka-guys/Coverage_Uniformity_Report
R
false
false
10,366
r
library(tidyverse) library(plotly) library(htmlwidgets) library(argparser) library(methods) # Purpose: This script takes the RAW output from sambamba and produces summary tables and plots highlighting the uniformity of coverage # Usage: Rscript sambamba_exon_coverage.R --args "/path_to_folder/exon_coverage" # Functi...
## This should be in base R! .FUNCall <- function(f) function(...) f(...)
/R/utils.R
no_license
cran/registry
R
false
false
74
r
## This should be in base R! .FUNCall <- function(f) function(...) f(...)
c44de1132ed6a6af2aba60c67446132b aim-100-6_0-yes1-3-90.qdimacs 822 2432
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1+A1/Database/Letombe/Abduction/aim-100-6_0-yes1-3-90/aim-100-6_0-yes1-3-90.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
71
r
c44de1132ed6a6af2aba60c67446132b aim-100-6_0-yes1-3-90.qdimacs 822 2432
## The first function makeCacheMatrix takes a matrix as and argument and returns ## a list of functions, get, set, getInv and setInv ## set caches the value of x and set the inverse to Null ## get retrives the x value ## setInv calculate the inverse of the matrix and cache it as I ## getInv retrive the value of I m...
/cachematrix.R
no_license
mha595/ProgrammingAssignment2
R
false
false
1,203
r
## The first function makeCacheMatrix takes a matrix as and argument and returns ## a list of functions, get, set, getInv and setInv ## set caches the value of x and set the inverse to Null ## get retrives the x value ## setInv calculate the inverse of the matrix and cache it as I ## getInv retrive the value of I m...
# # xts: eXtensible time-series # # Copyright (C) 2008 Jeffrey A. Ryan jeff.a.ryan @ gmail.com # # Contributions from Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundat...
/R/coredata.xts.R
no_license
DavisVaughan/xts
R
false
false
3,605
r
# # xts: eXtensible time-series # # Copyright (C) 2008 Jeffrey A. Ryan jeff.a.ryan @ gmail.com # # Contributions from Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundat...
############################ #fenetre 1kB test = read.csv("tables_w1Kb/train/all_stats_propre.csv",header=F) #fenetre 100kB avec id test = read.csv("tables_w100Kb/avec_id/all_stats_propre.csv") ##fenetre 20kB avec id test = read.csv("tables_w20Kb/avec_id/all_stats_propre.csv") test = read.csv("tables_w20Kb/avec_id/all...
/analysis_tables.R
no_license
Grelot/aker--beetGenomeEnvironmentAssociation
R
false
false
1,053
r
############################ #fenetre 1kB test = read.csv("tables_w1Kb/train/all_stats_propre.csv",header=F) #fenetre 100kB avec id test = read.csv("tables_w100Kb/avec_id/all_stats_propre.csv") ##fenetre 20kB avec id test = read.csv("tables_w20Kb/avec_id/all_stats_propre.csv") test = read.csv("tables_w20Kb/avec_id/all...
\name{GPW.logrank} \alias{GPW.logrank} \title{Generalized Piecewise Weighted Logrank Test} \description{ Compute the p-value based on the generalized piecewise weighted log-rank test when the treatment time-lag effect is present and the lag duration varies heterogeneously from individual to individual or from s...
/man/GPW.logrank.Rd
no_license
cran/DelayedEffect.Design
R
false
false
1,817
rd
\name{GPW.logrank} \alias{GPW.logrank} \title{Generalized Piecewise Weighted Logrank Test} \description{ Compute the p-value based on the generalized piecewise weighted log-rank test when the treatment time-lag effect is present and the lag duration varies heterogeneously from individual to individual or from s...
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(url,"//Txdf2fpw01cbtp/txcbt-redirected/smb001/Downloads/data.zip") unzip(zipfile="//Txdf2fpw01cbtp/txcbt-redirected/smb001/Downloads/data.zip", exdir = "//Txdf2fpw01cbtp/txcbt-redirected/smb001/Downloads") data ...
/plot4.R
no_license
brodo80/Exploratory-Data-Analysis-Project-1
R
false
false
1,517
r
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(url,"//Txdf2fpw01cbtp/txcbt-redirected/smb001/Downloads/data.zip") unzip(zipfile="//Txdf2fpw01cbtp/txcbt-redirected/smb001/Downloads/data.zip", exdir = "//Txdf2fpw01cbtp/txcbt-redirected/smb001/Downloads") data ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/all_classes.R \name{enriched_result} \alias{enriched_result} \title{creates enriched result} \usage{ enriched_result(features, universe, annotation, statistics) } \arguments{ \item{features}{the features that were differentially expressed (se...
/man/enriched_result_constructor.Rd
no_license
ehinderer/categoryCompare2
R
false
true
702
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/all_classes.R \name{enriched_result} \alias{enriched_result} \title{creates enriched result} \usage{ enriched_result(features, universe, annotation, statistics) } \arguments{ \item{features}{the features that were differentially expressed (se...
################### uniform ########################## ### CLT uniform ## my Central Limit Function ## Notice that I have assigned default values which can be changed when the function is called #' CLT Uniform #' #' @param n size of sample #' @param iter number of iterations or spales taken #' @param a lower limit of p...
/R/mycltu.R
no_license
lmtrevisi/MATH4753ouTrev0002
R
false
false
1,801
r
################### uniform ########################## ### CLT uniform ## my Central Limit Function ## Notice that I have assigned default values which can be changed when the function is called #' CLT Uniform #' #' @param n size of sample #' @param iter number of iterations or spales taken #' @param a lower limit of p...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{make_bar_plot} \alias{make_bar_plot} \title{Create a Barplot of Country Obesity Rankings} \usage{ make_bar_plot( .region = NULL, .year = 2016, .income = NULL, .sex = NULL, .ascending = TRUE, .n = 10 ) } \arguments{ \...
/man/make_bar_plot.Rd
permissive
UBC-MDS/obesity-explorer-R
R
false
true
992
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{make_bar_plot} \alias{make_bar_plot} \title{Create a Barplot of Country Obesity Rankings} \usage{ make_bar_plot( .region = NULL, .year = 2016, .income = NULL, .sex = NULL, .ascending = TRUE, .n = 10 ) } \arguments{ \...
# ===== CHURN RATE MIXPANEL - COHORT ANALYSIS ===== # READ THE DATA cw.churn = read.csv(file = 'D:/Audhi Aprilliant/IPB Works/Statistics Department/Data Science Practices/Projects/Cohort Analysis - Online Retail Data/Datasets/cohort2011 Wide Data.csv', header = TRUE, sep = ...
/R-Scripts/Total Customer/5 Churn Rate Mixpanel Customer - Cohort Analysis Online Retail Data.R
no_license
audhiaprilliant/Cohort-Analysis-Online-Retail-Data
R
false
false
2,737
r
# ===== CHURN RATE MIXPANEL - COHORT ANALYSIS ===== # READ THE DATA cw.churn = read.csv(file = 'D:/Audhi Aprilliant/IPB Works/Statistics Department/Data Science Practices/Projects/Cohort Analysis - Online Retail Data/Datasets/cohort2011 Wide Data.csv', header = TRUE, sep = ...
DEFF<-expand.grid(HH=1:100,Village=1:4) DEFF$Gender<-sample(c("Male","Female"),size = 400,replace=TRUE) DEFF$TimeToHospital<-abs(round(rnorm(mean=60*(DEFF$Village-1),sd=15,n=400)/10)*10) DEFF$Income<-round(with(DEFF,ifelse(Village==1,rnorm(100,mean=5000,sd=1500),ifelse(Village==2,rnorm(100,mean=6500,sd=2000), ...
/DEFF/calculation.R
no_license
sdumble1/ShinyLibrary
R
false
false
3,988
r
DEFF<-expand.grid(HH=1:100,Village=1:4) DEFF$Gender<-sample(c("Male","Female"),size = 400,replace=TRUE) DEFF$TimeToHospital<-abs(round(rnorm(mean=60*(DEFF$Village-1),sd=15,n=400)/10)*10) DEFF$Income<-round(with(DEFF,ifelse(Village==1,rnorm(100,mean=5000,sd=1500),ifelse(Village==2,rnorm(100,mean=6500,sd=2000), ...
# script to format the extra metadata rm(list = ls()) library(dplyr) source('paths.r') #load mapping file; this tells us which samples we want to look at map <- readRDS(emp_map_clean.path) #load the metadata files we need study_632 <- read.csv(emp_study632_metadata.path) study_722 <- read.csv(emp_study722_metadata...
/data_construction/EMP_data_construction/format_metadata.R
no_license
microbesatBU/NEFI_16S
R
false
false
4,657
r
# script to format the extra metadata rm(list = ls()) library(dplyr) source('paths.r') #load mapping file; this tells us which samples we want to look at map <- readRDS(emp_map_clean.path) #load the metadata files we need study_632 <- read.csv(emp_study632_metadata.path) study_722 <- read.csv(emp_study722_metadata...
## File Name: tam_calc_prob_helper_subtract_max.R ## File Version: 0.12 tam_calc_prob_helper_subtract_max <- function( rr0 ) { RR0 <- dim(rr0) rr0M <- matrix( rr0, nrow=RR0[1]*RR0[2], ncol=RR0[3] ) NI <- RR0[1] NK <- RR0[2] TP <- RR0[3] rr1M <- tam_rcpp_calc_prob_subtract_max( rr0M=rr...
/R/tam_calc_prob_helper_subtract_max.R
no_license
cran/TAM
R
false
false
402
r
## File Name: tam_calc_prob_helper_subtract_max.R ## File Version: 0.12 tam_calc_prob_helper_subtract_max <- function( rr0 ) { RR0 <- dim(rr0) rr0M <- matrix( rr0, nrow=RR0[1]*RR0[2], ncol=RR0[3] ) NI <- RR0[1] NK <- RR0[2] TP <- RR0[3] rr1M <- tam_rcpp_calc_prob_subtract_max( rr0M=rr...
\docType{methods} \name{split} \alias{split} \alias{split,ANY-method} \alias{split,hyperSpec-method} \alias{split-methods} \title{Split a hyperSpec object according to groups \code{split} divides the \code{hyperSpec} object into a list of \code{hyperSpec} objects according to the groups given by \code{f}.} \usage{ \S...
/man/split.Rd
no_license
fornasaros/hyperSpec
R
false
false
1,278
rd
\docType{methods} \name{split} \alias{split} \alias{split,ANY-method} \alias{split,hyperSpec-method} \alias{split-methods} \title{Split a hyperSpec object according to groups \code{split} divides the \code{hyperSpec} object into a list of \code{hyperSpec} objects according to the groups given by \code{f}.} \usage{ \S...
#====================================================================== # This script plots cumulative metrics, relative to the branch-based # algorithm, versus iterations for all input graphs given a single # algorithm and architecture. # ====================================================================== source (...
/rvplot/deprecated/plot-summary.R
no_license
ogreen/BranchlessGraphs
R
false
false
1,567
r
#====================================================================== # This script plots cumulative metrics, relative to the branch-based # algorithm, versus iterations for all input graphs given a single # algorithm and architecture. # ====================================================================== source (...
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ===== Hierarchical Multinomial Logit Model in STAN ===== ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### setwd("~/tennis_analytics/projects/roland_garros_tracking_data/stan_code/prototypes/") source('../src/he...
/projects/roland_garros_project/modelling/prototypes/stan_code/prototypes/OLD_test_hier_mnl_stan.R
no_license
petertea96/tennis_analytics
R
false
false
7,720
r
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ===== Hierarchical Multinomial Logit Model in STAN ===== ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### setwd("~/tennis_analytics/projects/roland_garros_tracking_data/stan_code/prototypes/") source('../src/he...
library(s2dverification) ### Name: CDORemap ### Title: Interpolates arrays with longitude and latitude dimensions using ### CDO ### Aliases: CDORemap ### Keywords: datagen ### ** Examples ## Not run: ##D # Interpolating only vectors of longitudes and latitudes ##D lon <- seq(0, 360 - 360/50, length.out = 50) #...
/data/genthat_extracted_code/s2dverification/examples/CDORemap.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
6,547
r
library(s2dverification) ### Name: CDORemap ### Title: Interpolates arrays with longitude and latitude dimensions using ### CDO ### Aliases: CDORemap ### Keywords: datagen ### ** Examples ## Not run: ##D # Interpolating only vectors of longitudes and latitudes ##D lon <- seq(0, 360 - 360/50, length.out = 50) #...
testlist <- list(m = NULL, repetitions = -304992360L, in_m = structure(c(2.31584307392677e+77, 9.53819811420581e+295, 1.22810536108214e+146), .Dim = c(3L, 1L ))) result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist) str(result)
/CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615786407-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
254
r
testlist <- list(m = NULL, repetitions = -304992360L, in_m = structure(c(2.31584307392677e+77, 9.53819811420581e+295, 1.22810536108214e+146), .Dim = c(3L, 1L ))) result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist) str(result)
%% File Name: data.raw1.Rd %% File Version: 0.05 %% File Last Change: 2017-01-18 18:08:37 \name{data.raw1} \alias{data.raw1} \docType{data} \title{ Dataset with Raw Item Responses } \description{ Dataset with raw item responses } \usage{data(data.raw1)} \format{ A data frame with raw item responses of 1200 persons on ...
/man/data.raw1.Rd
no_license
SanVerhavert/sirt
R
false
false
961
rd
%% File Name: data.raw1.Rd %% File Version: 0.05 %% File Last Change: 2017-01-18 18:08:37 \name{data.raw1} \alias{data.raw1} \docType{data} \title{ Dataset with Raw Item Responses } \description{ Dataset with raw item responses } \usage{data(data.raw1)} \format{ A data frame with raw item responses of 1200 persons on ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summary.BchronDensityRun.R \name{summary.BchronDensityRun} \alias{summary.BchronDensityRun} \title{Summarise a Bchron density object} \usage{ \method{summary}{BchronDensityRun}(object, prob = 0.95, ..., digits = max(3, getOption("digits") -...
/man/summary.BchronDensityRun.Rd
no_license
ercrema/Bchron
R
false
true
663
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summary.BchronDensityRun.R \name{summary.BchronDensityRun} \alias{summary.BchronDensityRun} \title{Summarise a Bchron density object} \usage{ \method{summary}{BchronDensityRun}(object, prob = 0.95, ..., digits = max(3, getOption("digits") -...
## makeCacheMatrix creates the matrix object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x setinverse <- function(inverse) i <<- inverse getinverse <- function() i ...
/cachematrix.R
no_license
Silva-M/ProgrammingAssignment2
R
false
false
841
r
## makeCacheMatrix creates the matrix object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x setinverse <- function(inverse) i <<- inverse getinverse <- function() i ...
#' Create an R Markdown Word Document Topic Guide #' #' This is a function called in the output of the yaml of the Rmd file to #' specify using the standard DLM topic guide word document formatting. #' #' @param ... Arguments to be passed to `[bookdown::word_document2]` #' #' @return A modified `word_document2` with th...
/R/render.R
no_license
esegui/ratlas
R
false
false
5,943
r
#' Create an R Markdown Word Document Topic Guide #' #' This is a function called in the output of the yaml of the Rmd file to #' specify using the standard DLM topic guide word document formatting. #' #' @param ... Arguments to be passed to `[bookdown::word_document2]` #' #' @return A modified `word_document2` with th...