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
# Matrix inversion is usually a costly computation and there may be some benefit # to caching the inverse of a matrix rather than compute it repeatedly. The # following two functions are used to cache the inverse of a matrix. makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { ...
/cachematrix.R
no_license
rakshith-p/ProgrammingAssignment2
R
false
false
1,092
r
# Matrix inversion is usually a costly computation and there may be some benefit # to caching the inverse of a matrix rather than compute it repeatedly. The # following two functions are used to cache the inverse of a matrix. makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/local_W.R \name{R.lw.tapered} \alias{R.lw.tapered} \title{Concentrated local Whittle likelihood for tapered estimate. Only for internal use. Cf. Velasco (1999).} \usage{ R.lw.tapered(d, peri, m, p, T) } \description{ Concentrated local Whittl...
/man/R.lw.tapered.Rd
no_license
ayotoasset/LongMemoryTS
R
false
true
419
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/local_W.R \name{R.lw.tapered} \alias{R.lw.tapered} \title{Concentrated local Whittle likelihood for tapered estimate. Only for internal use. Cf. Velasco (1999).} \usage{ R.lw.tapered(d, peri, m, p, T) } \description{ Concentrated local Whittl...
library(BiocParallel) #register(MulticoreParam(6)) register(bpstart(MulticoreParam(6))) bpparam() #q() #library(multtest) library(xcms) library(faahKO) options(width = 160) testing <- TRUE start_time <- Sys.time() # set path according to opsys opSys <- Sys.info()[1] isLinux <- grepl('Linux', opSys[1]) filepa...
/r_analysis/spore_gp5_pbqcs/dataExtractor.R
no_license
MetabolomicsAustralia-Bioinformatics/advance-XCMS
R
false
false
19,678
r
library(BiocParallel) #register(MulticoreParam(6)) register(bpstart(MulticoreParam(6))) bpparam() #q() #library(multtest) library(xcms) library(faahKO) options(width = 160) testing <- TRUE start_time <- Sys.time() # set path according to opsys opSys <- Sys.info()[1] isLinux <- grepl('Linux', opSys[1]) filepa...
## setting working directory, creating any needed folders, downdloading data set, ## and importing the data file. ## NOTE: SOME OF THESE STEPS MAY NOT NEED TO BE RAN AGAIN. setwd("C:/Users/bdfitzgerald/Desktop/Data Science Specialist") if(!file.exists("exploratory_data_analysis")){dir.create("explorato...
/plot4.R
no_license
BarrieFitzgerald/Exploratory_Data_Analysis
R
false
false
1,899
r
## setting working directory, creating any needed folders, downdloading data set, ## and importing the data file. ## NOTE: SOME OF THESE STEPS MAY NOT NEED TO BE RAN AGAIN. setwd("C:/Users/bdfitzgerald/Desktop/Data Science Specialist") if(!file.exists("exploratory_data_analysis")){dir.create("explorato...
setwd("C:/Users/enerc/OneDrive/Desktop/data science/sessions/r_training") getwd() customer <- read.csv("Customer_churn.csv") placement <- read.csv("Placement.csv") View(customer) library(dplyr) # Using customer churn dataset: # 1. Calculate the standard deviation of 'tenure' column and store it in sd_te...
/Module - 2/Assignment5.R
no_license
nitinsingh27/DataScience-With-R
R
false
false
1,199
r
setwd("C:/Users/enerc/OneDrive/Desktop/data science/sessions/r_training") getwd() customer <- read.csv("Customer_churn.csv") placement <- read.csv("Placement.csv") View(customer) library(dplyr) # Using customer churn dataset: # 1. Calculate the standard deviation of 'tenure' column and store it in sd_te...
#' #' sumGroups.Spectra2D #' #' @noRd #' @export #' sumGroups.Spectra2D <- function(spectra) { .chkArgs(mode = 21L) chkSpectra(spectra) gr.l <- levels(spectra$group) count <- length(gr.l) g.sum <- data.frame(group = NA, no. = NA, color = NA) for (n in 1:count) { gi <- match(gr.l[n], spectra$groups) ...
/R/sumGroups.Spectra2D.R
no_license
Tejasvigupta/ChemoSpecUtils
R
false
false
635
r
#' #' sumGroups.Spectra2D #' #' @noRd #' @export #' sumGroups.Spectra2D <- function(spectra) { .chkArgs(mode = 21L) chkSpectra(spectra) gr.l <- levels(spectra$group) count <- length(gr.l) g.sum <- data.frame(group = NA, no. = NA, color = NA) for (n in 1:count) { gi <- match(gr.l[n], spectra$groups) ...
#### CREATE STRATA PILOT BENCHMARKING APP #### ## R script that renders a Shiny app to do cost benchmarking for Strata ## Winter 2018 ## Civis Analytics ## R version 3.4.2 #### PREPARE WORKSPACE #### install.packages(c('devtools', 'shiny', 'shinythemes', 'shiny...
/CostBenchmarkingForChildren/app.R
no_license
lmebrennan/benchwarmers
R
false
false
90,677
r
#### CREATE STRATA PILOT BENCHMARKING APP #### ## R script that renders a Shiny app to do cost benchmarking for Strata ## Winter 2018 ## Civis Analytics ## R version 3.4.2 #### PREPARE WORKSPACE #### install.packages(c('devtools', 'shiny', 'shinythemes', 'shiny...
###################################################################################### # Modified based on the supplemental materials of Yu, Downes, Carter, and O'Boyle (2018) ###################################################################################### library(metaSEM);require('matrixcalc');library(OpenMx...
/CFA/FIMASEM/FIMASEM_CorrelatedTraits.R
no_license
zijunke/Compare-3-MASEM-Approches
R
false
false
4,675
r
###################################################################################### # Modified based on the supplemental materials of Yu, Downes, Carter, and O'Boyle (2018) ###################################################################################### library(metaSEM);require('matrixcalc');library(OpenMx...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/future_modify.R \name{future_modify} \alias{future_modify} \alias{future_modify_at} \alias{future_modify_if} \title{Modify elements selectively via futures} \usage{ future_modify(.x, .f, ..., .progress = FALSE, future.globals = TRUE, future...
/man/future_modify.Rd
no_license
NanaAkwasiAbayieBoateng/furrr
R
false
true
6,991
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/future_modify.R \name{future_modify} \alias{future_modify} \alias{future_modify_at} \alias{future_modify_if} \title{Modify elements selectively via futures} \usage{ future_modify(.x, .f, ..., .progress = FALSE, future.globals = TRUE, future...
context("test-HurdlePoisson") test_that("print.HurdlePoisson works", { expect_output(print(HurdlePoisson(1, 0.7)), regexp = "HurdlePoisson distribution") }) test_that("random.HurdlePoisson work correctly", { p <- HurdlePoisson(1, 0.7) expect_length(random(p), 1) expect_length(random(p, 100), 100) expect_le...
/tests/testthat/test-HurdlePoisson.R
permissive
alexpghayes/distributions3
R
false
false
5,155
r
context("test-HurdlePoisson") test_that("print.HurdlePoisson works", { expect_output(print(HurdlePoisson(1, 0.7)), regexp = "HurdlePoisson distribution") }) test_that("random.HurdlePoisson work correctly", { p <- HurdlePoisson(1, 0.7) expect_length(random(p), 1) expect_length(random(p, 100), 100) expect_le...
#' #' Ports Class. Create an object that characterizes world ports, defined as polygons enveloping AIS-based anchorages #' #' @field polygons Object of class polygonsClass #' @field clusters Object of class clustersClass #' @field anchorages Object of class points2MatrixClass #' @field earthGeo Object of class earthGe...
/R/05ports.R
permissive
rtlemos/portsModel
R
false
false
6,209
r
#' #' Ports Class. Create an object that characterizes world ports, defined as polygons enveloping AIS-based anchorages #' #' @field polygons Object of class polygonsClass #' @field clusters Object of class clustersClass #' @field anchorages Object of class points2MatrixClass #' @field earthGeo Object of class earthGe...
#' @importFrom dplyr select distinct left_join arrange %>% mutate #' @importFrom readr write_tsv WebGestaltRGsea <- function(organism="hsapiens", enrichDatabase=NULL, enrichDatabaseFile=NULL, enrichDatabaseType=NULL, enrichDatabaseDescriptionFile=NULL, interestGeneFile=NULL, interestGene=NULL, interestGeneType=NULL, c...
/R/WebGestaltRGsea.R
no_license
sailepradh/WebGestaltR
R
false
false
8,001
r
#' @importFrom dplyr select distinct left_join arrange %>% mutate #' @importFrom readr write_tsv WebGestaltRGsea <- function(organism="hsapiens", enrichDatabase=NULL, enrichDatabaseFile=NULL, enrichDatabaseType=NULL, enrichDatabaseDescriptionFile=NULL, interestGeneFile=NULL, interestGene=NULL, interestGeneType=NULL, c...
setwd("C:\\Users\\a552344\\Desktop\\scripts") if(!file.exists("household_power_consumption.txt")) { download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",zptmp) tdf<- unzip(zptmp) } elecpwr <- read.table(tdf, header=T, sep=";") elecpwr$Date <- as.Date(e...
/dataload.R
no_license
Deepthisri/ExData_Plotting1
R
false
false
1,068
r
setwd("C:\\Users\\a552344\\Desktop\\scripts") if(!file.exists("household_power_consumption.txt")) { download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",zptmp) tdf<- unzip(zptmp) } elecpwr <- read.table(tdf, header=T, sep=";") elecpwr$Date <- as.Date(e...
filepath= system.file("extdata", "simple_plant.mtg", package = "XploRer") MTG_file = readLines(filepath) MTG_file = strip_comments(MTG_file) MTG_file = strip_empty_lines(MTG_file) test_that("Check the sections", { expect_null(check_sections(MTG_file)) }) test_that("Parse code", { expect_equal(parse_MTG_code(MTG_f...
/tests/testthat/test-read_MTG.R
permissive
VEZY/XploRer
R
false
false
1,944
r
filepath= system.file("extdata", "simple_plant.mtg", package = "XploRer") MTG_file = readLines(filepath) MTG_file = strip_comments(MTG_file) MTG_file = strip_empty_lines(MTG_file) test_that("Check the sections", { expect_null(check_sections(MTG_file)) }) test_that("Parse code", { expect_equal(parse_MTG_code(MTG_f...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y){ x <<- y inv <<- NULL } get <- function() x setInverse <- function(solveMatrix) ...
/cachematrix.R
no_license
codejay411/ProgrammingAssignment2
R
false
false
710
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y){ x <<- y inv <<- NULL } get <- function() x setInverse <- function(solveMatrix) ...
## Script para extraer las tablas de UP library(data.table) library(tidyverse) carpetaSujetos <- "~/Dropbox/MOOCs/R/P48/SUJETOS/" uFisicas <- list.files(path = carpetaSujetos, pattern = "export_unidades-fisicas") sujMercado <- list.files(path = carpetaSujetos, pattern = "export_sujetos-del-mercado") uProg <- list.fi...
/R/tablasUP.R
no_license
rucoma/P48
R
false
false
1,157
r
## Script para extraer las tablas de UP library(data.table) library(tidyverse) carpetaSujetos <- "~/Dropbox/MOOCs/R/P48/SUJETOS/" uFisicas <- list.files(path = carpetaSujetos, pattern = "export_unidades-fisicas") sujMercado <- list.files(path = carpetaSujetos, pattern = "export_sujetos-del-mercado") uProg <- list.fi...
#MNIST sapply(paste("functions/",list.files("functions/"), sep = ""), source) #' Parameters and more N <- 5000 # Number of observations m <- 100 # Number of inducing points D <- 28*28 # Ambient dimension / data dimension d <- 2 # Latent dimension float_type = tf$float64 swiss <- subtrain$x #################### A <- "...
/model_mnist.R
no_license
JorgensenMart/ISOGP
R
false
false
3,247
r
#MNIST sapply(paste("functions/",list.files("functions/"), sep = ""), source) #' Parameters and more N <- 5000 # Number of observations m <- 100 # Number of inducing points D <- 28*28 # Ambient dimension / data dimension d <- 2 # Latent dimension float_type = tf$float64 swiss <- subtrain$x #################### A <- "...
new.charts.TimeSeries <- function (R, space = 0, main = "Returns", ...) { R = checkData(R) columns = NCOL(R) columnnames = colnames(R) ymax = max(R, na.rm=TRUE) ymin = min(R, na.rm=TRUE) op <- par(oma = c(2,0,4,0), mar=c(0,4,0,4)) layout(matrix(c(1:columns), ncol = 1, byrow = TRUE), wid...
/new.charts.TimeSeries.R
no_license
Shubham-Khanve/xtsModPerf
R
false
false
1,145
r
new.charts.TimeSeries <- function (R, space = 0, main = "Returns", ...) { R = checkData(R) columns = NCOL(R) columnnames = colnames(R) ymax = max(R, na.rm=TRUE) ymin = min(R, na.rm=TRUE) op <- par(oma = c(2,0,4,0), mar=c(0,4,0,4)) layout(matrix(c(1:columns), ncol = 1, byrow = TRUE), wid...
parse_args <- function(args){ ExecName <- 'MBA' lop <- read.MBA.opts.batch(args, verb = 0) lop['outFN'] <- lop['prefix'] lop['prefix'] <- NULL lop <- process.MBA.opts(lop, verb = lop$verb) lop } get_eoiq <- function(qVars, EOI) { EOIq <- strsplit(qVars, ",")[[1]] if (!("Intercept" %in% EOIq)) EOIq <- c...
/R/MBAfuncs.R
no_license
afni/afnistats
R
false
false
28,720
r
parse_args <- function(args){ ExecName <- 'MBA' lop <- read.MBA.opts.batch(args, verb = 0) lop['outFN'] <- lop['prefix'] lop['prefix'] <- NULL lop <- process.MBA.opts(lop, verb = lop$verb) lop } get_eoiq <- function(qVars, EOI) { EOIq <- strsplit(qVars, ",")[[1]] if (!("Intercept" %in% EOIq)) EOIq <- c...
context("use_cassette: works as expected") test_that("use_cassette works as expected", { skip_on_cran() library(crul) mydir <- file.path(tempdir(), "asdfasdfsd") invisible(vcr_configure(dir = mydir)) unlink(file.path(vcr_c$dir, "testing1.yml")) aa <- use_cassette(name = "testing1", { res <- crul::HttpC...
/data/genthat_extracted_code/vcr/tests/test-ause_cassette.R
no_license
surayaaramli/typeRrh
R
false
false
2,789
r
context("use_cassette: works as expected") test_that("use_cassette works as expected", { skip_on_cran() library(crul) mydir <- file.path(tempdir(), "asdfasdfsd") invisible(vcr_configure(dir = mydir)) unlink(file.path(vcr_c$dir, "testing1.yml")) aa <- use_cassette(name = "testing1", { res <- crul::HttpC...
#----------------------------------------------------------------------------- ## LOANDING DATA airb <- read_csv("1.data/AB_NYC_2019.csv") set.seed(1) #----------------------------------------------------------------------------- ## 1. VARIABLE MODIFICATION ### 1.1 CHANGE TYPE IN VALUES AND REMOVING UNNECESSARY VARI...
/scripts/modeling/2variable_modifications.R
no_license
natalia-kozlowska/arbnb_raport_modeling
R
false
false
1,894
r
#----------------------------------------------------------------------------- ## LOANDING DATA airb <- read_csv("1.data/AB_NYC_2019.csv") set.seed(1) #----------------------------------------------------------------------------- ## 1. VARIABLE MODIFICATION ### 1.1 CHANGE TYPE IN VALUES AND REMOVING UNNECESSARY VARI...
\alias{pango-Bidirectional-Text} \alias{PangoDirection} \alias{PangoBidiType} \name{pango-Bidirectional-Text} \title{Bidirectional Text} \description{Types and functions to help with handling bidirectional text} \section{Methods and Functions}{ \code{\link{pangoUnicharDirection}(ch)}\cr \code{\link{pangoFindBaseDir}(te...
/RGtk2/man/pango-Bidirectional-Text.Rd
no_license
hjy1210/RGtk2
R
false
false
3,380
rd
\alias{pango-Bidirectional-Text} \alias{PangoDirection} \alias{PangoBidiType} \name{pango-Bidirectional-Text} \title{Bidirectional Text} \description{Types and functions to help with handling bidirectional text} \section{Methods and Functions}{ \code{\link{pangoUnicharDirection}(ch)}\cr \code{\link{pangoFindBaseDir}(te...
setwd('~/docking/covid19-docking/') require(data.table) require(parallel) source('scripts/dock_helpers.r') df = fread('quercetin/smiles.txt') mclapply(1:nrow(df), function(i){ name = df$V1[i] smiles = df$V2[i] path = generate_ligand_pdbqt(smiles, name, out_dir = 'quercetin/pdbqt') if(is.na(path)){ u...
/quercetin/run_docking.r
no_license
Ridhanya/covid19-docking
R
false
false
966
r
setwd('~/docking/covid19-docking/') require(data.table) require(parallel) source('scripts/dock_helpers.r') df = fread('quercetin/smiles.txt') mclapply(1:nrow(df), function(i){ name = df$V1[i] smiles = df$V2[i] path = generate_ligand_pdbqt(smiles, name, out_dir = 'quercetin/pdbqt') if(is.na(path)){ u...
# Linear Programming in R library(lpSolve) solve <- function(obj,constr,constr_dir,rhs){ prod.sol = lp(direction = "max",objective.in = obj.fun,const.mat = constr,const.dir = constr_dir,const.rhs = rhs, compute.sens = TRUE) } obj.fun <- c(20,60) constr <- matrix(c(30,20,5,10,1,1),ncol = 2,byr...
/Lectures/Review Phase/Block 4/Operations Research/Lab/03122020/lpPlayground.R
no_license
yusufbrima/AIMS
R
false
false
730
r
# Linear Programming in R library(lpSolve) solve <- function(obj,constr,constr_dir,rhs){ prod.sol = lp(direction = "max",objective.in = obj.fun,const.mat = constr,const.dir = constr_dir,const.rhs = rhs, compute.sens = TRUE) } obj.fun <- c(20,60) constr <- matrix(c(30,20,5,10,1,1),ncol = 2,byr...
library(quantmod) library(dplyr) library(PerformanceAnalytics) library(IntroCompFinR) library(readxl) # Set Workspace rm(list = ls()) # Part 1 periodicity = "weekly" from = "2018-01-01" to = "2018-12-31" ticker = "KIMBERA.MX" try(getSymbols(ticker, from = from, to = to, periodicity...
/part1.R
no_license
crcz25/prografinanciera
R
false
false
3,196
r
library(quantmod) library(dplyr) library(PerformanceAnalytics) library(IntroCompFinR) library(readxl) # Set Workspace rm(list = ls()) # Part 1 periodicity = "weekly" from = "2018-01-01" to = "2018-12-31" ticker = "KIMBERA.MX" try(getSymbols(ticker, from = from, to = to, periodicity...
library(mschart) ### Name: chart_data_line_width ### Title: Modify line width ### Aliases: chart_data_line_width ### ** Examples my_scatter <- ms_scatterchart(data = iris, x = "Sepal.Length", y = "Sepal.Width", group = "Species") my_scatter <- chart_settings(my_scatter, scatterstyle = "lineMarker") my_scatter <-...
/data/genthat_extracted_code/mschart/examples/chart_data_line_width.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
887
r
library(mschart) ### Name: chart_data_line_width ### Title: Modify line width ### Aliases: chart_data_line_width ### ** Examples my_scatter <- ms_scatterchart(data = iris, x = "Sepal.Length", y = "Sepal.Width", group = "Species") my_scatter <- chart_settings(my_scatter, scatterstyle = "lineMarker") my_scatter <-...
##### Load libraries library(gdsfmt) library(SNPRelate) library(ggplot2) library(RColorBrewer) ##### Set working directory? todaysdate=format(Sys.Date(),format="%Y%m%d") calldate=20200410 setwd("/u/home/d/dechavez/project-rwayne/Clup/SNPRelate") plotoutdir=paste("/u/home/d/dechavez/project-rwayne/Clup/SNPRelate",call...
/4-Demography/PCA/snprelate_PCA_cluster_JR.R
no_license
dechavezv/2nd.paper
R
false
false
6,343
r
##### Load libraries library(gdsfmt) library(SNPRelate) library(ggplot2) library(RColorBrewer) ##### Set working directory? todaysdate=format(Sys.Date(),format="%Y%m%d") calldate=20200410 setwd("/u/home/d/dechavez/project-rwayne/Clup/SNPRelate") plotoutdir=paste("/u/home/d/dechavez/project-rwayne/Clup/SNPRelate",call...
### Graficos Estadisticos options(repos = c(CRAN = "http://cran.rstudio.com")) install.packages("aplpack") # permite hacer caritas de Chernov install.packages("corrplot") # permite personalizar colores y estilos de fuente para graficos install.packages("ggplot2") # permite realizar graficos con movimiento install.pac...
/AID/labs/lab3/resources/AID20_Clase3_CO.R
no_license
dhruszecki/cdatos-uba
R
false
false
23,688
r
### Graficos Estadisticos options(repos = c(CRAN = "http://cran.rstudio.com")) install.packages("aplpack") # permite hacer caritas de Chernov install.packages("corrplot") # permite personalizar colores y estilos de fuente para graficos install.packages("ggplot2") # permite realizar graficos con movimiento install.pac...
Create_Weg <- function(Weg_DF){ setkey(Weg_DF, Baan, HmStart, Strook, Datum_tijd) # Define and determine the amount of unique Banen from the given Weg. UniqueBanen <- unique(Weg_DF$Baan) Current_Weg <- Weg.template Current_Weg@wegID <- unique(Weg_DF$Weg) Banen_List.length <- length(UniqueBanen) # De...
/Create_Weg.R
no_license
liyongg/asphalt
R
false
false
3,903
r
Create_Weg <- function(Weg_DF){ setkey(Weg_DF, Baan, HmStart, Strook, Datum_tijd) # Define and determine the amount of unique Banen from the given Weg. UniqueBanen <- unique(Weg_DF$Baan) Current_Weg <- Weg.template Current_Weg@wegID <- unique(Weg_DF$Weg) Banen_List.length <- length(UniqueBanen) # De...
library(tidyverse) library(stringr) # Load data --------------------------------------------------------------- seats_raw <- read_delim(here::here("2020", "raw_data", "day_11.txt"), delim = "\t", col_names = "layout") # Main ------------------------------------------...
/2020/scripts/day_11.R
no_license
dzhang32/advent_of_code
R
false
false
5,846
r
library(tidyverse) library(stringr) # Load data --------------------------------------------------------------- seats_raw <- read_delim(here::here("2020", "raw_data", "day_11.txt"), delim = "\t", col_names = "layout") # Main ------------------------------------------...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classError.R \name{classError} \alias{classError} \title{Classification Error} \usage{ classError(true, estimated, estimated.prob = NULL, trace = 0) } \arguments{ \item{true}{Vector, factor: True values} \item{estimated}{Vector, factor: Esti...
/man/classError.Rd
no_license
zeta1999/rtemis
R
false
true
541
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classError.R \name{classError} \alias{classError} \title{Classification Error} \usage{ classError(true, estimated, estimated.prob = NULL, trace = 0) } \arguments{ \item{true}{Vector, factor: True values} \item{estimated}{Vector, factor: Esti...
##################### # Perf for classes # ##################### # change case of d or nd perftable = function (list_predict, list_real){ nb_value = length (list_real) i = 1 tp = 0 fp = 0 tn = 0 fn = 0 while(i <= nb_value ){ if (list_predict[i]==1){ if (list_predict[i] == list_real[i]){ ...
/Rscripts/performance.R
no_license
ABorrel/MDQSAR-imatinib
R
false
false
9,923
r
##################### # Perf for classes # ##################### # change case of d or nd perftable = function (list_predict, list_real){ nb_value = length (list_real) i = 1 tp = 0 fp = 0 tn = 0 fn = 0 while(i <= nb_value ){ if (list_predict[i]==1){ if (list_predict[i] == list_real[i]){ ...
library(beepr) library(data.table) library(tau) library(plyr) source('~/makeNgrams.R') badwords <- readLines("./CapstoneprojectData/final/en_US/profanity-words.txt") badwords <- c(badwords, "fucking") en_Twitter <- readLines("./CapstoneprojectData/final/en_US/en_US.twitter.txt", encoding = "UTF-8") badwordI...
/Capstone create skip n-grams M.R
no_license
mveerara/JHU-Coursera-Capstone-final-project
R
false
false
5,853
r
library(beepr) library(data.table) library(tau) library(plyr) source('~/makeNgrams.R') badwords <- readLines("./CapstoneprojectData/final/en_US/profanity-words.txt") badwords <- c(badwords, "fucking") en_Twitter <- readLines("./CapstoneprojectData/final/en_US/en_US.twitter.txt", encoding = "UTF-8") badwordI...
# Get the main polygons, will determine by area. getSmallPolys <- function(poly, minarea=0.01) { # Get the areas areas <- lapply(poly@polygons, function(x) sapply(x@Polygons, function(y) y@area)) # Quick summary of the areas print(quantile(unlist(areas))) # Which are the ...
/reduce_shape_file.R
permissive
lucyokell/pdmc_model
R
false
false
759
r
# Get the main polygons, will determine by area. getSmallPolys <- function(poly, minarea=0.01) { # Get the areas areas <- lapply(poly@polygons, function(x) sapply(x@Polygons, function(y) y@area)) # Quick summary of the areas print(quantile(unlist(areas))) # Which are the ...
#Function that generates a new X #New X is chosen by first selecting k photos from the first capture occasion. #These photos are then randomly assigned to a different individual #This is repeated for each capture occasion new_X<-function(X,k){ prev.ind<-nrow(X.MH[[i-1]]) #Computes the number of individuals in...
/Code/new_X.R
no_license
AmandaEllis/Sampler_Project
R
false
false
2,176
r
#Function that generates a new X #New X is chosen by first selecting k photos from the first capture occasion. #These photos are then randomly assigned to a different individual #This is repeated for each capture occasion new_X<-function(X,k){ prev.ind<-nrow(X.MH[[i-1]]) #Computes the number of individuals in...
################################ USER INPUTS ################################################# Gridmet <- read.csv("data/park-specific/input/GridMet.csv",header=T) file <- list.files(path = './data/park-specific/output', pattern = 'Final_Environment.RData', full.names = TRUE) load(file) colors3<-c("white",colors2)...
/scripts/Additional-tables-plots/RSS_MACA_drought_char.R
no_license
Janelle88/CCRP_Climate_Futures_v1.0
R
false
false
19,783
r
################################ USER INPUTS ################################################# Gridmet <- read.csv("data/park-specific/input/GridMet.csv",header=T) file <- list.files(path = './data/park-specific/output', pattern = 'Final_Environment.RData', full.names = TRUE) load(file) colors3<-c("white",colors2)...
library(haven) library(dplyr) library(ggplot2) library(forcats) library(rstanarm) library(tidyr) library(stringr) library(lme4) "%ni%" <- Negate("%in%") ######load datasets #IAT df <- rbind(read_sav('/Users/travis/Documents/gits/Data/iat_race/Race IAT.public.2013.sav'), read_sav('/Users/travis/Documents/gi...
/iat_analysis.R
no_license
riddlet/educational_disparities
R
false
false
16,865
r
library(haven) library(dplyr) library(ggplot2) library(forcats) library(rstanarm) library(tidyr) library(stringr) library(lme4) "%ni%" <- Negate("%in%") ######load datasets #IAT df <- rbind(read_sav('/Users/travis/Documents/gits/Data/iat_race/Race IAT.public.2013.sav'), read_sav('/Users/travis/Documents/gi...
####################### ## NHS Analysis ## ####################### ## 11/21/2018 ## Fit models to NHS data ## prepare dataframes for JMMICS pack ## then fit: ## Conditional: ## joint conditional (no 0s) ## joint conditional ## outcome-only glmm ## Marginal: ## GEE-Exch ## IEE ## WGEE ## JMM ## ma...
/Data Analysis/analysis_run.R
no_license
glenmcgee/InformativeEmptiness
R
false
false
12,461
r
####################### ## NHS Analysis ## ####################### ## 11/21/2018 ## Fit models to NHS data ## prepare dataframes for JMMICS pack ## then fit: ## Conditional: ## joint conditional (no 0s) ## joint conditional ## outcome-only glmm ## Marginal: ## GEE-Exch ## IEE ## WGEE ## JMM ## ma...
\name{prepareForPredictBC} \alias{prepareForPredictBC} \title{ Convert node predictions into probabilities for binary classification models. } \description{ This method can only be aplied for a binary classification model. Its primary purpose is to process a \code{\link[randomForest]{randomForest}} object as requir...
/eyeBot/pkg/man/prepareForPredictBC.rd
no_license
wildoctopus/eyeBot
R
false
false
2,084
rd
\name{prepareForPredictBC} \alias{prepareForPredictBC} \title{ Convert node predictions into probabilities for binary classification models. } \description{ This method can only be aplied for a binary classification model. Its primary purpose is to process a \code{\link[randomForest]{randomForest}} object as requir...
#Necesita para correr en Google Cloud #40 GB de memoria RAM #256 GB de espacio en el disco local #8 vCPU #clase_binaria2 1={BAJA+2,BAJA+1} 0={CONTINUA} #Entrena en a union de ONCE meses de [202001, 202011] #No usa variables historicas #Optimizacion Bayesiana de hiperparametros de lightgbm #usa el interminable ...
/clasesGustavo/TareasHogar/Tarea20210924/721_lgb_bin2_hist.r
no_license
gerbeldo/labo2021
R
false
false
11,955
r
#Necesita para correr en Google Cloud #40 GB de memoria RAM #256 GB de espacio en el disco local #8 vCPU #clase_binaria2 1={BAJA+2,BAJA+1} 0={CONTINUA} #Entrena en a union de ONCE meses de [202001, 202011] #No usa variables historicas #Optimizacion Bayesiana de hiperparametros de lightgbm #usa el interminable ...
################### # # read_dist.R # # reads triangle matrices into R # ################### library(tidyverse) read_dist <- function(dist_file_name){ # read in the first row to determine the matrix dimensions matrix_dim <- as.numeric(read.table(dist_file_name, nrow = 1, as.is = TRUE)) # read in all the data...
/code/read_dist.R
permissive
SchlossLab/Lesniak_Clearance_mSphere_2021
R
false
false
855
r
################### # # read_dist.R # # reads triangle matrices into R # ################### library(tidyverse) read_dist <- function(dist_file_name){ # read in the first row to determine the matrix dimensions matrix_dim <- as.numeric(read.table(dist_file_name, nrow = 1, as.is = TRUE)) # read in all the data...
# This is the R script for the Plot 3.png library(data.table) library(dplyr) fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" # download and unzip the data fileName <- "power_consumption.zip" if (!file.exists(fileName)) { download.file(fileUrl, destfile = fileName) }...
/plot3.R
no_license
fanzhaom/ExData_Plotting1
R
false
false
1,681
r
# This is the R script for the Plot 3.png library(data.table) library(dplyr) fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" # download and unzip the data fileName <- "power_consumption.zip" if (!file.exists(fileName)) { download.file(fileUrl, destfile = fileName) }...
helpers.installPackages("quantmod")
/init.R
permissive
bridgecrew-perf7/deployR4
R
false
false
35
r
helpers.installPackages("quantmod")
#' @title Split samples into groups given metadata. #' @description The function returns two groups situated in the low and high quantile of the given metadata item. #' When two metadata items are provided, three splitting modi are available: congruent, complementary and inverse. #' For groups with low and high values ...
/R/selectSamplesGivenMetadata.R
permissive
hallucigenia-sparsa/seqgroup
R
false
false
8,056
r
#' @title Split samples into groups given metadata. #' @description The function returns two groups situated in the low and high quantile of the given metadata item. #' When two metadata items are provided, three splitting modi are available: congruent, complementary and inverse. #' For groups with low and high values ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pairt.R \name{pairt} \alias{pairt} \title{Compute power for a Paired t-test Takes means, sd, and sample sizes. Alpha is .05 by default, alternative values may be entered by user. correlation (r) defaults to .50.} \usage{ pairt(m1 = NU...
/man/pairt.Rd
permissive
chrisaberson/pwr2ppl
R
false
true
916
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pairt.R \name{pairt} \alias{pairt} \title{Compute power for a Paired t-test Takes means, sd, and sample sizes. Alpha is .05 by default, alternative values may be entered by user. correlation (r) defaults to .50.} \usage{ pairt(m1 = NU...
#' @title fun_name #' #' @description kolejna funkcja podmieniona #' #' @param param fun_name #' #' #' #' @export format.packageInfo<- function(params){ rap <- c("Czesc czesc tu Sebol nawija, Mordo nie ma gandy a ja wbijam klina", "Tutaj start, mega bujanka. Zaczynamy tutaj strefe jaranka", ...
/R/format.packageInfo.R
no_license
granatb/RapeR
R
false
false
691
r
#' @title fun_name #' #' @description kolejna funkcja podmieniona #' #' @param param fun_name #' #' #' #' @export format.packageInfo<- function(params){ rap <- c("Czesc czesc tu Sebol nawija, Mordo nie ma gandy a ja wbijam klina", "Tutaj start, mega bujanka. Zaczynamy tutaj strefe jaranka", ...
\name{Main.Rainfed.Growing.Season.Daily.ET.Calc} \alias{Main.Rainfed.Growing.Season.Daily.ET.Calc} %- Also NEED an '\alias' for EACH other topic documented here. \title{ ~~function to do ... ~~ } \description{ ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ Main.Rainfed.Growing.Season.Dai...
/man/Main.Rainfed.Growing.Season.Daily.ET.Calc.Rd
no_license
DDorch/CropWatR
R
false
false
17,081
rd
\name{Main.Rainfed.Growing.Season.Daily.ET.Calc} \alias{Main.Rainfed.Growing.Season.Daily.ET.Calc} %- Also NEED an '\alias' for EACH other topic documented here. \title{ ~~function to do ... ~~ } \description{ ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ Main.Rainfed.Growing.Season.Dai...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.R \name{pal_23b} \alias{pal_23b} \title{Generate a color palette (n=23)} \usage{ pal_23b() } \description{ Generate a color palette (n=23) }
/man/pal_23b.Rd
permissive
orionzhou/rmaize
R
false
true
224
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.R \name{pal_23b} \alias{pal_23b} \title{Generate a color palette (n=23)} \usage{ pal_23b() } \description{ Generate a color palette (n=23) }
# Exploratory Data Analysis plot3.R read_power <- read.csv("household_power_consumption.txt", header = T, sep=";", na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"') read_power$Date <- as.Date(read_power$Date, format="%d/%m/%Y") datetime <- paste(read_power$Date, read_pow...
/Explore-Data-Plotting/plot3.R
no_license
rosida/ProgrammingAssignment2
R
false
false
809
r
# Exploratory Data Analysis plot3.R read_power <- read.csv("household_power_consumption.txt", header = T, sep=";", na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"') read_power$Date <- as.Date(read_power$Date, format="%d/%m/%Y") datetime <- paste(read_power$Date, read_pow...
## R-Programming Iteration 031 T.Debus / Aug 2015 ## ## Helper functions to determine whether a matrix has been inverted ## before: If so it will retun the cached values from the environment ## if NOT, then it will inverse the matrix and store the results in the ## new enviroment variable usin...
/PA2_MtrxInvCch_Func.R
no_license
tomthebuzz/ProgrammingAssignment2
R
false
false
1,018
r
## R-Programming Iteration 031 T.Debus / Aug 2015 ## ## Helper functions to determine whether a matrix has been inverted ## before: If so it will retun the cached values from the environment ## if NOT, then it will inverse the matrix and store the results in the ## new enviroment variable usin...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/indicies.R \name{msci_indicies} \alias{msci_indicies} \title{MSCI indicies} \usage{ msci_indicies() } \value{ \code{tibble} } \description{ Returns all MSCI indicies. This function can be used to find indicies to search with \code{\link{msci...
/man/msci_indicies.Rd
permissive
CerebralMastication/fundManageR
R
false
true
548
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/indicies.R \name{msci_indicies} \alias{msci_indicies} \title{MSCI indicies} \usage{ msci_indicies() } \value{ \code{tibble} } \description{ Returns all MSCI indicies. This function can be used to find indicies to search with \code{\link{msci...
library(ape) testtree <- read.tree("4440_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="4440_0_unrooted.txt")
/codeml_files/newick_trees_processed/4440_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("4440_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="4440_0_unrooted.txt")
#' Geometric mean geomean <- function(x, na.rm=TRUE){ exp(sum(log(x[x > 0]), na.rm=na.rm) / length(x)) }
/utility_functions/geomean.R
no_license
Pennycuick-Lab/cis_immunology
R
false
false
107
r
#' Geometric mean geomean <- function(x, na.rm=TRUE){ exp(sum(log(x[x > 0]), na.rm=na.rm) / length(x)) }
# VAR_PREFIX, e.g., SMQ01, CQ12 # QUERY_NAME, non NULL # QUERY_ID, could be NULL # QUERY_SCOPE, ‘BROAD’, ‘NARROW’, or NULL # TERM_LEVEL, e.g., AEDECOD, AELLT, ... # TERM_NAME, non NULL queries <- tibble::tribble( ~VAR_PREFIX, ~QUERY_NAME, ~QUERY_ID, ~QUERY_SCOPE, ~QUERY_SCOPE_NUM, ~TERM_LEVEL, ~TERM_NAME, ~TERM_ID...
/inst/example_scripts/example_query_source.R
no_license
rajkboddu/admiral
R
false
false
2,801
r
# VAR_PREFIX, e.g., SMQ01, CQ12 # QUERY_NAME, non NULL # QUERY_ID, could be NULL # QUERY_SCOPE, ‘BROAD’, ‘NARROW’, or NULL # TERM_LEVEL, e.g., AEDECOD, AELLT, ... # TERM_NAME, non NULL queries <- tibble::tribble( ~VAR_PREFIX, ~QUERY_NAME, ~QUERY_ID, ~QUERY_SCOPE, ~QUERY_SCOPE_NUM, ~TERM_LEVEL, ~TERM_NAME, ~TERM_ID...
install.packages('shiny') library('cdsw') library('shiny') library('parallel') mcparallel(runApp(host="0.0.0.0", port=8080, launch.browser=FALSE, appDir="/home/cdsw/app", display.mode="auto")) service.url <- paste("http://", Sys.getenv("CDSW_ENGINE_ID"), ".", Sys.getenv("CDSW_DOMAIN"), sep="") Sys.sleep(5) iframe...
/Example14-Shiny-Demo/shiny_test.R
permissive
joyer7/CDSW-Demos-KOLON
R
false
false
369
r
install.packages('shiny') library('cdsw') library('shiny') library('parallel') mcparallel(runApp(host="0.0.0.0", port=8080, launch.browser=FALSE, appDir="/home/cdsw/app", display.mode="auto")) service.url <- paste("http://", Sys.getenv("CDSW_ENGINE_ID"), ".", Sys.getenv("CDSW_DOMAIN"), sep="") Sys.sleep(5) iframe...
#' tidy_functional_beta_multi #' #' @param x matris de abundancia. #' @param traits traits info data.frame #' @param index.family "jaccard" o "sorensen". #' @param warning.time progres bar. #' @return data_frame #' @export #' #' @examples tidy_functional_beta_multi <- function (x, traits, index.family = "sorensen", war...
/R/tidy_functional_beta_multi.R
no_license
PaulESantos/betapart.tidy
R
false
false
1,853
r
#' tidy_functional_beta_multi #' #' @param x matris de abundancia. #' @param traits traits info data.frame #' @param index.family "jaccard" o "sorensen". #' @param warning.time progres bar. #' @return data_frame #' @export #' #' @examples tidy_functional_beta_multi <- function (x, traits, index.family = "sorensen", war...
setwd("/Users/JHY/Documents/2018SpringCourse/Applied Data Science/Spring2018-Project3-Group1") img_dir <- "./data/train/images/" #source("http://bioconductor.org/biocLite.R") #biocLite("EBImage") feature_HOG<-function(img_dir){ ### HOG: calculate the Histogram of Oriented Gradient for an image ### Input: a dire...
/lib/feature_HOG.R
no_license
TZstatsADS/Spring2018-Project3-Group1
R
false
false
883
r
setwd("/Users/JHY/Documents/2018SpringCourse/Applied Data Science/Spring2018-Project3-Group1") img_dir <- "./data/train/images/" #source("http://bioconductor.org/biocLite.R") #biocLite("EBImage") feature_HOG<-function(img_dir){ ### HOG: calculate the Histogram of Oriented Gradient for an image ### Input: a dire...
## Copyright (C) 2012 Marius Hofert, Ivan Kojadinovic, Martin Maechler, and Jun Yan ## ## 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 ## Foundation; either version 3 of the License, or (at your option) any...
/copula/R/estimation.R
no_license
ingted/R-Examples
R
false
false
28,354
r
## Copyright (C) 2012 Marius Hofert, Ivan Kojadinovic, Martin Maechler, and Jun Yan ## ## 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 ## Foundation; either version 3 of the License, or (at your option) any...
#' Arm-level changes #' #' Get the altered chromosome arms in sample. Does not include the acrocentric p arms of chromosomes 12, 14, 15, 31, and 22. #' #' @param segs FACETS segmentation output. #' @param ploidy Sample ploidy. #' @param genome Genome build. #' @param algorithm Choice between FACETS \code{em} and \code{...
/R/arm-level-changes.R
permissive
rptashkin/facets-suite
R
false
false
12,337
r
#' Arm-level changes #' #' Get the altered chromosome arms in sample. Does not include the acrocentric p arms of chromosomes 12, 14, 15, 31, and 22. #' #' @param segs FACETS segmentation output. #' @param ploidy Sample ploidy. #' @param genome Genome build. #' @param algorithm Choice between FACETS \code{em} and \code{...
params <- list(id = "410886026") ## ----setup, include=FALSE---------------------------------------------------------------------------------------------- knitr::opts_chunk$set(echo = TRUE) ## ---------------------------------------------------------------------------------------------------------------------...
/2020-09-30.R
no_license
kkqq123123123/109-1-inclass-practice
R
false
false
503
r
params <- list(id = "410886026") ## ----setup, include=FALSE---------------------------------------------------------------------------------------------- knitr::opts_chunk$set(echo = TRUE) ## ---------------------------------------------------------------------------------------------------------------------...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bb-lm.R, R/bb-point.R \name{bb_lm} \alias{bb_lm} \alias{bb_point} \title{layer} \usage{ bb_lm(mapping = NULL, data = NULL, ...) bb_point(mapping = NULL, data = NULL, position = "identity", ...) } \arguments{ \item{mapping}{aesthetic mapping}...
/man/layer.Rd
no_license
nemochina2008/plotbb
R
false
true
551
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bb-lm.R, R/bb-point.R \name{bb_lm} \alias{bb_lm} \alias{bb_point} \title{layer} \usage{ bb_lm(mapping = NULL, data = NULL, ...) bb_point(mapping = NULL, data = NULL, position = "identity", ...) } \arguments{ \item{mapping}{aesthetic mapping}...
## working directory and packages setting wd <- 'C:/Users/mdlyz/Desktop/UCI HAR Dataset' setwd(wd) library(data.table) ## Merges the training data and the test sets to create one data set y_test <- data.table(read.table('./test/y_test.txt', header=F)) x_test <- data.table(read.table('./test/X_test.txt', header=F)) sub...
/run_analysis.R
no_license
posleo511/Coursera_c3_final_assignment
R
false
false
2,859
r
## working directory and packages setting wd <- 'C:/Users/mdlyz/Desktop/UCI HAR Dataset' setwd(wd) library(data.table) ## Merges the training data and the test sets to create one data set y_test <- data.table(read.table('./test/y_test.txt', header=F)) x_test <- data.table(read.table('./test/X_test.txt', header=F)) sub...
# Test Methods run_tests <- function(){ q_artist <- 'slayer' artist_id <- 2683 album_id <- 10392458 track_id <- 13886643 # search_artist tryCatch(expr=search_artist(q_artist), error=function(e) { print(e) return(1) }) tryCatch(expr=search_artist(q_art...
/R/testing.R
no_license
kraigrs/musixmatch
R
false
false
2,686
r
# Test Methods run_tests <- function(){ q_artist <- 'slayer' artist_id <- 2683 album_id <- 10392458 track_id <- 13886643 # search_artist tryCatch(expr=search_artist(q_artist), error=function(e) { print(e) return(1) }) tryCatch(expr=search_artist(q_art...
#' Plots vaf distribution of genes #' @description Plots vaf distribution of genes as a boxplot. #' #' @param maf an \code{\link{MAF}} object generated by \code{\link{read.maf}} #' @param vafCol manually specify column name for vafs. Default looks for column 't_vaf' #' @param genes specify genes for which plots has to ...
/R/plot_vaf.R
permissive
AxelitoMartin/maftools
R
false
false
5,228
r
#' Plots vaf distribution of genes #' @description Plots vaf distribution of genes as a boxplot. #' #' @param maf an \code{\link{MAF}} object generated by \code{\link{read.maf}} #' @param vafCol manually specify column name for vafs. Default looks for column 't_vaf' #' @param genes specify genes for which plots has to ...
##################################### ### Bayesian Copula Deconvolution ### ##################################### # Codes accompanying "Bayesian Copula Density Deconvolution for Zero-Inflated Data with Applications in Nutritional Epidemiology" by Sarkar, Pati, Mallick and Carroll. # Codes written by Abhra Sarkar (abh...
/Bayes_Copula_Decon_Univariate_Regular.R
no_license
jasa-acs/Bayesian-Copula-Density-Deconvolution-for-Zero-Inflated-Data-in-Nutritional-Epidemiology
R
false
false
14,409
r
##################################### ### Bayesian Copula Deconvolution ### ##################################### # Codes accompanying "Bayesian Copula Density Deconvolution for Zero-Inflated Data with Applications in Nutritional Epidemiology" by Sarkar, Pati, Mallick and Carroll. # Codes written by Abhra Sarkar (abh...
\name{fastnureal} \alias{fastnureal} \title{Fast Algorithm for Spectral Estimation of Irregularly Sampled Data over a Logarithmic Frequency Range.} \description{ The function \code{fastnureal} computes a spectrum of irregularly sampled data. The resulting coefficients are represented as complex numbers, which stems fro...
/man/fastnureal.Rd
no_license
nickmckay/nuspectral
R
false
false
1,639
rd
\name{fastnureal} \alias{fastnureal} \title{Fast Algorithm for Spectral Estimation of Irregularly Sampled Data over a Logarithmic Frequency Range.} \description{ The function \code{fastnureal} computes a spectrum of irregularly sampled data. The resulting coefficients are represented as complex numbers, which stems fro...
# Dean Attali # November 21 2014 # This is the server portion of a shiny app shows cancer data in the United # States source("helpers.R") # have the helper functions avaiable library(shiny) library(magrittr) library(plyr) library(dplyr) library(tidyr) library(ggplot2) # Get the raw data cDatRaw <- getData() # Get...
/hw/hw11_shiny-app/cancer-data/server.R
no_license
abhatia2014/UBC-STAT545
R
false
false
6,658
r
# Dean Attali # November 21 2014 # This is the server portion of a shiny app shows cancer data in the United # States source("helpers.R") # have the helper functions avaiable library(shiny) library(magrittr) library(plyr) library(dplyr) library(tidyr) library(ggplot2) # Get the raw data cDatRaw <- getData() # Get...
# nombre del archivo a mandar por correo: # nombre_apellido_inferencia_profesor.R # ejemplo: # juan_perez_inferencia_beltran.R # No olvide ejecutar las líneas 6 y 11 antes de empezar el resto del trabajo library(readxl) # 1. Use la función read_excel para cargar los datos que se encuentran en el archivo excel misda...
/2019_2/sol1/sol1_estadistica_R_mayer/elisa_magna_estadistica_mayer.R
no_license
ricardomayerb/ico8305
R
false
false
1,173
r
# nombre del archivo a mandar por correo: # nombre_apellido_inferencia_profesor.R # ejemplo: # juan_perez_inferencia_beltran.R # No olvide ejecutar las líneas 6 y 11 antes de empezar el resto del trabajo library(readxl) # 1. Use la función read_excel para cargar los datos que se encuentran en el archivo excel misda...
files <- matrix(c( 'nan-random-t5000-model-b10-k0.9-20130528-0703', 'coherence-20130531-0456.txt', 'eval-20130601-1256.txt', 'nan-random-t5000-model-b100-k0.9-20130528-0907', 'coherence-20130529-2149.txt', 'eval-20130530-0258.txt', 'nan-random-t5000-model-b1000-k0.9-20130528-0808', 'coherence-20130529-1044.txt', 'eval-...
/src/main/r/plot-hdpa-data.R
no_license
jesterhazy/hdpa
R
false
false
3,816
r
files <- matrix(c( 'nan-random-t5000-model-b10-k0.9-20130528-0703', 'coherence-20130531-0456.txt', 'eval-20130601-1256.txt', 'nan-random-t5000-model-b100-k0.9-20130528-0907', 'coherence-20130529-2149.txt', 'eval-20130530-0258.txt', 'nan-random-t5000-model-b1000-k0.9-20130528-0808', 'coherence-20130529-1044.txt', 'eval-...
testlist <- list(testX = c(-3.15282414831747e-172, 2.1657079772533e+121, -4.28180735645116e-215, 3.57880847663814e-219, 8.57112108438856e+243, -2.21286571415676e-53, -8.84274383342004e+106, -4.44218759342859e-266, -1.09369605054127e+143, -1.88529048712039e-22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
/dann/inst/testfiles/calc_distance_C/AFL_calc_distance_C/calc_distance_C_valgrind_files/1609866593-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
1,130
r
testlist <- list(testX = c(-3.15282414831747e-172, 2.1657079772533e+121, -4.28180735645116e-215, 3.57880847663814e-219, 8.57112108438856e+243, -2.21286571415676e-53, -8.84274383342004e+106, -4.44218759342859e-266, -1.09369605054127e+143, -1.88529048712039e-22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
#week3.R #q1 fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv" download.file(fileUrl, destfile = "./data.csv", method="curl") dateDownloaded <- date() dat <- read.csv("data.csv") head(dat) df <- tbl_df(dat) head(df) # Create a logical vector that identifies the households on gre...
/getcleandata/week3/week3.R
no_license
theoneandoney/datasciencecoursera
R
false
false
2,170
r
#week3.R #q1 fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv" download.file(fileUrl, destfile = "./data.csv", method="curl") dateDownloaded <- date() dat <- read.csv("data.csv") head(dat) df <- tbl_df(dat) head(df) # Create a logical vector that identifies the households on gre...
/Talleres/MetodoAitkenPolares.R
no_license
DivaLover/Clase_Analisis_Numerico
R
false
false
788
r
dataSet <- "household_power_consumption.txt" data <- read.table(dataSet, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") Sample<- data[data$Date %in% c("1/2/2007","2/2/2007") ,] datetime <- strptime(paste(Sample$Date, Sample$Time, sep=" "), "%d/%m/%Y %H:%M:%S") GAP <- as.numeric(Sample$Global_active_power) SM1...
/plot3.r
no_license
sean1211/ExploratoryDataAnalysis
R
false
false
767
r
dataSet <- "household_power_consumption.txt" data <- read.table(dataSet, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") Sample<- data[data$Date %in% c("1/2/2007","2/2/2007") ,] datetime <- strptime(paste(Sample$Date, Sample$Time, sep=" "), "%d/%m/%Y %H:%M:%S") GAP <- as.numeric(Sample$Global_active_power) SM1...
require(shiny) require(ggplot2) require(rCharts) Auto <- read.csv('../../../data_sets/Auto.csv') ui <- fluidPage(navbarPage( title = h2('Auto'), tabPanel(h4('Boxplot'), fluidRow( column(2, selectInput('cat', 'Categ...
/ch02_Statistical_Learning/shiny/auto_All/App.R
no_license
GucciTheCarpenter/ISLR_labs
R
false
false
3,939
r
require(shiny) require(ggplot2) require(rCharts) Auto <- read.csv('../../../data_sets/Auto.csv') ui <- fluidPage(navbarPage( title = h2('Auto'), tabPanel(h4('Boxplot'), fluidRow( column(2, selectInput('cat', 'Categ...
#' @rdname newSlingshotDataSet #' @export setMethod( f = "newSlingshotDataSet", signature = signature("data.frame","ANY"), definition = function(reducedDim, clusterLabels, ...){ RD <- as.matrix(reducedDim) rownames(RD) <- rownames(reducedDim) if(missing(clusterLabels)){ m...
/R/AllHelperFunctions.R
no_license
tangbozeng/slingshot
R
false
false
21,776
r
#' @rdname newSlingshotDataSet #' @export setMethod( f = "newSlingshotDataSet", signature = signature("data.frame","ANY"), definition = function(reducedDim, clusterLabels, ...){ RD <- as.matrix(reducedDim) rownames(RD) <- rownames(reducedDim) if(missing(clusterLabels)){ m...
# ------------------------------------- # Post Processing for the TZA 2010 # data. Here we make some changes to # the data to make it possible to # perform further analysis. This file # is separate from the raw data processing # file in order to make transparent any # changes that were made to the data # --------------...
/TZA/TZA_2010PP.R
no_license
tom13878/pro-gap
R
false
false
1,881
r
# ------------------------------------- # Post Processing for the TZA 2010 # data. Here we make some changes to # the data to make it possible to # perform further analysis. This file # is separate from the raw data processing # file in order to make transparent any # changes that were made to the data # --------------...
library(tsne) # For 2D spatial arrangement of points library(rjson) # For saving/loading xy coordinates in json # using the development version of ggvis from github. # install with devtools package and `devtools::install_github("rstudio/ggvis")` library(ggvis) # Data import -------------------------------------------...
/R/ggvis.R
permissive
lwasser/TopicViz
R
false
false
4,721
r
library(tsne) # For 2D spatial arrangement of points library(rjson) # For saving/loading xy coordinates in json # using the development version of ggvis from github. # install with devtools package and `devtools::install_github("rstudio/ggvis")` library(ggvis) # Data import -------------------------------------------...
# Install packages if we need it if (!require("corrplot")) install.packages("corrplot") if (!require("ggplot2")) install.packages("ggplot2") if (!require("dplyr")) install.packages("dplyr") if (!require("stringr")) install.packages("stringr") if (!require("tidyr")) install.packages("tidyr") if (!require(...
/hard_drive.R
no_license
MiG-Kharkov/Hard_Drive
R
false
false
3,226
r
# Install packages if we need it if (!require("corrplot")) install.packages("corrplot") if (!require("ggplot2")) install.packages("ggplot2") if (!require("dplyr")) install.packages("dplyr") if (!require("stringr")) install.packages("stringr") if (!require("tidyr")) install.packages("tidyr") if (!require(...
# Copyright (C) 2009 # Sebastien Dejean, Institut de Mathematiques, Universite de Toulouse et CNRS (UMR 5219), France # Ignacio Gonzalez, Genopole Toulouse Midi-Pyrenees, France # Kim-Anh Le Cao, French National Institute for Agricultural Research and # ARC Centre of Excellence ins Bioinformatics, Institute for Molec...
/mixOmics/R/nipals.R
no_license
ingted/R-Examples
R
false
false
4,887
r
# Copyright (C) 2009 # Sebastien Dejean, Institut de Mathematiques, Universite de Toulouse et CNRS (UMR 5219), France # Ignacio Gonzalez, Genopole Toulouse Midi-Pyrenees, France # Kim-Anh Le Cao, French National Institute for Agricultural Research and # ARC Centre of Excellence ins Bioinformatics, Institute for Molec...
#install.packages('vars') library("DataCombine") library('ggplot2') library("corrplot") library("tidyverse") library("dplyr") library("openxlsx") library("tseries") library('fpp2') # For forecasting library('dynlm') # To estimate ARDL models library('urca') # For the Dickey Fuller test library('corrplot')# F...
/forecasting.R
no_license
yannickpichardo/dynamicecon-report
R
false
false
15,353
r
#install.packages('vars') library("DataCombine") library('ggplot2') library("corrplot") library("tidyverse") library("dplyr") library("openxlsx") library("tseries") library('fpp2') # For forecasting library('dynlm') # To estimate ARDL models library('urca') # For the Dickey Fuller test library('corrplot')# F...
## set the working directory and read the household data setwd("~/GitHub/datasciencecoursera/datasciencecoursera/ExData_Plotting1") temp <- tempfile() download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp) data <- read.table(unz(temp, "household_power_consumption.txt...
/plot1.R
no_license
candjmail/ExData_Plotting1
R
false
false
1,181
r
## set the working directory and read the household data setwd("~/GitHub/datasciencecoursera/datasciencecoursera/ExData_Plotting1") temp <- tempfile() download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp) data <- read.table(unz(temp, "household_power_consumption.txt...
% Generated by roxygen2 (4.0.2): do not edit by hand \name{stri_opts_collator} \alias{stri_opts_collator} \title{Generate a List with Collator Settings} \usage{ stri_opts_collator(locale = NULL, strength = 3L, alternate_shifted = FALSE, french = FALSE, uppercase_first = NA, case_level = FALSE, normalization = FALSE...
/stringi/man/stri_opts_collator.Rd
permissive
jackieli123723/clearlinux
R
false
false
5,229
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \name{stri_opts_collator} \alias{stri_opts_collator} \title{Generate a List with Collator Settings} \usage{ stri_opts_collator(locale = NULL, strength = 3L, alternate_shifted = FALSE, french = FALSE, uppercase_first = NA, case_level = FALSE, normalization = FALSE...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/doubleclickbidmanager_functions.R \name{queries.listqueries} \alias{queries.listqueries} \title{Retrieves stored queries.} \usage{ queries.listqueries() } \description{ Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} } \d...
/googledoubleclickbidmanagerv1.auto/man/queries.listqueries.Rd
permissive
Phippsy/autoGoogleAPI
R
false
true
696
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/doubleclickbidmanager_functions.R \name{queries.listqueries} \alias{queries.listqueries} \title{Retrieves stored queries.} \usage{ queries.listqueries() } \description{ Autogenerated via \code{\link[googleAuthR]{gar_create_api_skeleton}} } \d...
# Copyright 2015-2015 Steven E. Pav. All Rights Reserved. # Author: Steven E. Pav # # This file is part of PDQutils. # # PDQutils is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the ...
/R/gram_charlier.r
no_license
cran/PDQutils
R
false
false
12,255
r
# Copyright 2015-2015 Steven E. Pav. All Rights Reserved. # Author: Steven E. Pav # # This file is part of PDQutils. # # PDQutils is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the ...
## 1. makeCacheMatrix: This function creates a special "matrix" object ## that can cache its inverse. ## 2. cacheSolve: This function computes the inverse of the special "matrix" ## returned by makeCacheMatrix above. If the inverse has already been calculated ## (and the matrix has not changed), then the ca...
/cachematrix.R
no_license
edtsech/ProgrammingAssignment2
R
false
false
1,315
r
## 1. makeCacheMatrix: This function creates a special "matrix" object ## that can cache its inverse. ## 2. cacheSolve: This function computes the inverse of the special "matrix" ## returned by makeCacheMatrix above. If the inverse has already been calculated ## (and the matrix has not changed), then the ca...
generateUsersBehaviourBrowsing <- function(){ gev = rgev(1, xi = -1.324516e+00, mu = 4.783323e+08, beta = 1.839221e+07) gevcel = ceiling(gev) gevmin = pmin(492361442, gevcel) total_instructions = pmax(400742607, gevmin) # instruction arrivals in cpu percentage instruction_arrivals <- rgpd(1337, xi = 0.87049, mu...
/WebApp/rubisGenerateUsersBehavior.R
no_license
tabash7/ECommerceApp-1
R
false
false
2,317
r
generateUsersBehaviourBrowsing <- function(){ gev = rgev(1, xi = -1.324516e+00, mu = 4.783323e+08, beta = 1.839221e+07) gevcel = ceiling(gev) gevmin = pmin(492361442, gevcel) total_instructions = pmax(400742607, gevmin) # instruction arrivals in cpu percentage instruction_arrivals <- rgpd(1337, xi = 0.87049, mu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/np_oauth.R \name{get_pngs_and_show} \alias{get_pngs_and_show} \title{Download PNG for the icons in a list from get_icon_by_term()} \usage{ get_pngs_and_show(icon_lists) } \arguments{ \item{icon_lists}{List of details about icons from Noun Pro...
/man/get_pngs_and_show.Rd
no_license
isabelletot/nounprojectR
R
false
true
667
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/np_oauth.R \name{get_pngs_and_show} \alias{get_pngs_and_show} \title{Download PNG for the icons in a list from get_icon_by_term()} \usage{ get_pngs_and_show(icon_lists) } \arguments{ \item{icon_lists}{List of details about icons from Noun Pro...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllGenerics.R, R/rearlist-utils.R \name{linkedTo} \alias{linkedTo} \alias{linkedTo,GRanges-method} \alias{linkedTo,Rearrangement-method} \alias{linkedTo,RearrangementList-method} \title{A region linked by improperly paired reads} \usage{ link...
/man/linkedTo.Rd
no_license
cancer-genomics/trellis
R
false
true
590
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllGenerics.R, R/rearlist-utils.R \name{linkedTo} \alias{linkedTo} \alias{linkedTo,GRanges-method} \alias{linkedTo,Rearrangement-method} \alias{linkedTo,RearrangementList-method} \title{A region linked by improperly paired reads} \usage{ link...
perInst <- function(inst, sub.est, real, suffix) { save_file <- paste0(new_df_dir, "/", inst, "-", suffix) if (file.exists(save_file)) return() dat <- lapply(sub.est, function(sub) { sub[[inst]] }) dat <- ML.dataframe(dat) dat <- cbind(dat, real) assign(inst, dat) save(list = inst, file = save_file) ...
/addsim/instsplit.R
no_license
bamonroe/code-ch4
R
false
false
1,057
r
perInst <- function(inst, sub.est, real, suffix) { save_file <- paste0(new_df_dir, "/", inst, "-", suffix) if (file.exists(save_file)) return() dat <- lapply(sub.est, function(sub) { sub[[inst]] }) dat <- ML.dataframe(dat) dat <- cbind(dat, real) assign(inst, dat) save(list = inst, file = save_file) ...
#' @title goggles data from textbook #' @docType data #' @keywords datasets #' @name goggles #' @usage data(goggles) #' @format A data frame with 48 rows and 3 variables: #' \describe{ #' \item{gender}{Gender of participant} #' \item{alcohol}{Amount alcohol consumed } #' \item{attractiveness}{Perceived attractive...
/R/data-goggles.R
no_license
pa0/apaTables
R
false
false
560
r
#' @title goggles data from textbook #' @docType data #' @keywords datasets #' @name goggles #' @usage data(goggles) #' @format A data frame with 48 rows and 3 variables: #' \describe{ #' \item{gender}{Gender of participant} #' \item{alcohol}{Amount alcohol consumed } #' \item{attractiveness}{Perceived attractive...
context("prcomp") library(h2o) conn <- h2o.init(ip=Sys.getenv("H2O_IP"), port=as.integer(Sys.getenv("H2O_PORT"), startH2O=FALSE)) ausPath <- system.file("extdata", "australia.csv", package="h2o") australia.hex <- h2o.importFile(conn, path = ausPath) model <- tryCatch({ h2o.prcomp(data = australia.hex, standardize =...
/h2o-r/src/test/R/acceptance/test-prcomp.R
permissive
mrgloom/h2o-3
R
false
false
578
r
context("prcomp") library(h2o) conn <- h2o.init(ip=Sys.getenv("H2O_IP"), port=as.integer(Sys.getenv("H2O_PORT"), startH2O=FALSE)) ausPath <- system.file("extdata", "australia.csv", package="h2o") australia.hex <- h2o.importFile(conn, path = ausPath) model <- tryCatch({ h2o.prcomp(data = australia.hex, standardize =...
library(PharmacoGx) getCCLErawData <- function(path.data=file.path("data", "CCLE"), result.type=c("array", "list")){ ccle.raw.drug.sensitivity <- read.csv("/pfs/downloadCCLESensRaw/CCLE_NP24.2009_Drug_data_2015.02.24.csv", stringsAsFactors=FALSE) ccle.raw.drug.sensitivity.list <...
/downloadSensData.R
no_license
BHKLAB-DataProcessing/downloadCCLESensRaw
R
false
false
4,728
r
library(PharmacoGx) getCCLErawData <- function(path.data=file.path("data", "CCLE"), result.type=c("array", "list")){ ccle.raw.drug.sensitivity <- read.csv("/pfs/downloadCCLESensRaw/CCLE_NP24.2009_Drug_data_2015.02.24.csv", stringsAsFactors=FALSE) ccle.raw.drug.sensitivity.list <...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{list_merge} \alias{list_merge} \title{Merge two lists and overwrite latter entries with former entries if names are the same.} \usage{ list_merge(list1, list2) } \arguments{ \item{list1}{list} \item{list2}{list} } \value{ the m...
/man/list_merge.Rd
permissive
syberia/mungebits2
R
false
true
662
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{list_merge} \alias{list_merge} \title{Merge two lists and overwrite latter entries with former entries if names are the same.} \usage{ list_merge(list1, list2) } \arguments{ \item{list1}{list} \item{list2}{list} } \value{ the m...
library(AMCP) ### Name: chapter_15_table_1 ### Title: The data used in Chapter 15, Table 1 ### Aliases: chapter_15_table_1 C15T1 Chapter_15_Table_1 c15t1 ### Keywords: datasets ### ** Examples # Load the data data(chapter_15_table_1) # Or, alternatively load the data as data(C15T1) # View the structure str(chapte...
/data/genthat_extracted_code/AMCP/examples/chapter_15_table_1.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
338
r
library(AMCP) ### Name: chapter_15_table_1 ### Title: The data used in Chapter 15, Table 1 ### Aliases: chapter_15_table_1 C15T1 Chapter_15_Table_1 c15t1 ### Keywords: datasets ### ** Examples # Load the data data(chapter_15_table_1) # Or, alternatively load the data as data(C15T1) # View the structure str(chapte...
Footnotes <- setRefClass( "Footnotes", fields=list( .notes="list"), methods=list( initialize=function() { .notes <<- list() }, clear=function() { .notes <<- list() }, addNote=function(message) { # adds a footno...
/R/table.R
no_license
dcaunce/silkyR-old
R
false
false
18,657
r
Footnotes <- setRefClass( "Footnotes", fields=list( .notes="list"), methods=list( initialize=function() { .notes <<- list() }, clear=function() { .notes <<- list() }, addNote=function(message) { # adds a footno...
library(shiny) library(dplyr) library(quanteda) library(data.table) shinyServer( function(input,output) { #Display text user provided txtReturn <- eventReactive(input$button1, { input$impText }) output$inputText <- renderText({txtReturn()}) #Get a table of predicted words and scor...
/server.R
no_license
j-p-courneya/wordPredictionApp
R
false
false
500
r
library(shiny) library(dplyr) library(quanteda) library(data.table) shinyServer( function(input,output) { #Display text user provided txtReturn <- eventReactive(input$button1, { input$impText }) output$inputText <- renderText({txtReturn()}) #Get a table of predicted words and scor...
## function to calculate probabilities of getting a specific unit on n rolls #big assumption #how it works -> one roll decides which COST of unit you got, and an independent roll decides which specific unit you got (correct me if wrong) #assumption 1 : probabilities are based off the probability of getting t...
/main.R
no_license
adria-n/tft-roller
R
false
false
1,948
r
## function to calculate probabilities of getting a specific unit on n rolls #big assumption #how it works -> one roll decides which COST of unit you got, and an independent roll decides which specific unit you got (correct me if wrong) #assumption 1 : probabilities are based off the probability of getting t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/matrix.R \name{plotmatrix} \alias{plotmatrix} \title{Make charts with matrices} \usage{ plotmatrix(matrix, title = "", subtitle = "", low_color = "#132B43", high_color = "#56B1F7", legend_position = "top", xlabel = "", ylabel = "", title_...
/man/plotmatrix.Rd
no_license
adhok/plotmatrix
R
false
true
2,014
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/matrix.R \name{plotmatrix} \alias{plotmatrix} \title{Make charts with matrices} \usage{ plotmatrix(matrix, title = "", subtitle = "", low_color = "#132B43", high_color = "#56B1F7", legend_position = "top", xlabel = "", ylabel = "", title_...
#' @title delete_points #' @description Delete groups from scatterplots #' @param raw_data data delete_group <- function(raw_data){ ids <- unique(raw_data$id) remove <- utils::menu(ids) raw_data <- subset(raw_data, raw_data$id != ids[remove]) raw_data$id <- droplevels(raw_data$id) return(raw_data) } #' @titl...
/R/S_extract.R
no_license
devanmcg/metaDigitise
R
false
false
3,815
r
#' @title delete_points #' @description Delete groups from scatterplots #' @param raw_data data delete_group <- function(raw_data){ ids <- unique(raw_data$id) remove <- utils::menu(ids) raw_data <- subset(raw_data, raw_data$id != ids[remove]) raw_data$id <- droplevels(raw_data$id) return(raw_data) } #' @titl...
library(testthat) library(vdiffr) library(dplyr) ## Plotting tests. # Since it is difficult to test specific output of plots, these tests instead # use vdiffr to ensure that plots match a saved reference version. The tests # below simple build simple graphs of each type, thus exercising the different # plotting option...
/R-packages/covidcast/tests/testthat/test-plot.R
no_license
yelselmiao/covidcast
R
false
false
3,972
r
library(testthat) library(vdiffr) library(dplyr) ## Plotting tests. # Since it is difficult to test specific output of plots, these tests instead # use vdiffr to ensure that plots match a saved reference version. The tests # below simple build simple graphs of each type, thus exercising the different # plotting option...