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
#' Crawford-Howell (1998) t-test for case-control comparisons. #' #' Computes Crawford-Howell t-test comparing a single case to a set of controls. #' #' @param case single case score #' @param control vector of control scores #' @return Returns a data frame with three values: t, df, and p. #' @export #' @examples #' Cr...
/R/Crawford_Howell.R
no_license
dmirman/gazer
R
false
false
866
r
#' Crawford-Howell (1998) t-test for case-control comparisons. #' #' Computes Crawford-Howell t-test comparing a single case to a set of controls. #' #' @param case single case score #' @param control vector of control scores #' @return Returns a data frame with three values: t, df, and p. #' @export #' @examples #' Cr...
# Reading the store data superstore <- read.csv("F:/DSP Projects/Project 5/Data Set/Super Store.csv") summary(superstore) #View(superstore) str(superstore) head(superstore$Order.Date) tail(superstore$Order.Date) s <- superstore['Sales'] s1 <- s$Sales[1:530] s2 <- s$Sales[531:1060] s3 <- s$Sales[1061:1...
/Furniture_sales.R
no_license
nithin316/Sales-Forecast
R
false
false
4,016
r
# Reading the store data superstore <- read.csv("F:/DSP Projects/Project 5/Data Set/Super Store.csv") summary(superstore) #View(superstore) str(superstore) head(superstore$Order.Date) tail(superstore$Order.Date) s <- superstore['Sales'] s1 <- s$Sales[1:530] s2 <- s$Sales[531:1060] s3 <- s$Sales[1061:1...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nullmodel.R \name{tidy.nullmodel} \alias{tidy.nullmodel} \title{Tidy method for null models} \usage{ \method{tidy}{nullmodel}(x, ...) } \arguments{ \item{x}{A \code{nullmodel} object.} \item{...}{Not used.} } \value{ A tibble with column \co...
/man/tidy.nullmodel.Rd
no_license
kwiscion/parsnip
R
false
true
462
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nullmodel.R \name{tidy.nullmodel} \alias{tidy.nullmodel} \title{Tidy method for null models} \usage{ \method{tidy}{nullmodel}(x, ...) } \arguments{ \item{x}{A \code{nullmodel} object.} \item{...}{Not used.} } \value{ A tibble with column \co...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/apigateway_operations.R \name{apigateway_create_usage_plan} \alias{apigateway_create_usage_plan} \title{Creates a usage plan with the throttle and quota limits, as well as the associated API stages, specified in the payload} \usage{ apigatewa...
/paws/man/apigateway_create_usage_plan.Rd
permissive
peoplecure/paws
R
false
true
1,567
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/apigateway_operations.R \name{apigateway_create_usage_plan} \alias{apigateway_create_usage_plan} \title{Creates a usage plan with the throttle and quota limits, as well as the associated API stages, specified in the payload} \usage{ apigatewa...
## Note: For elevation and rainfall standard deviation (sd) calculations where more than one ## watershed polygon is used to describe one StationID the sd of the watershed is reported as ## the average of all individual watershed standard deviations. For the most accurate results ## you must dissolve all polygons by St...
/ProbMonOrganization/landcoverAnalysis_20212022.R
no_license
EmmaVJones/LandcoverAnalysis
R
false
false
28,642
r
## Note: For elevation and rainfall standard deviation (sd) calculations where more than one ## watershed polygon is used to describe one StationID the sd of the watershed is reported as ## the average of all individual watershed standard deviations. For the most accurate results ## you must dissolve all polygons by St...
################################################################################ # pairwiseDiffMatrix function - (matrix) # # Author: Heidi Lischer # Date: 10.2008 ################################################################################ pairwiseDiffMatrix <- function(xmlText, Labels=NULL, timeAttr,o...
/code/tools/arlequin/arlecore_linux/Rfunctions/pairwiseDiffMatrix.r
permissive
kibet-gilbert/co1_metaanalysis
R
false
false
8,059
r
################################################################################ # pairwiseDiffMatrix function - (matrix) # # Author: Heidi Lischer # Date: 10.2008 ################################################################################ pairwiseDiffMatrix <- function(xmlText, Labels=NULL, timeAttr,o...
#' Ladder sizes #' #' Finds the sizes and positions of ladders in the tree. #' A ladder is here defined to be a series of consecutive nodes in the tree, #' each of which has exactly one tip child (as counted by \code{\link{ILnumber}}). #' The size of the ladder is given by the number of nodes in the chain. #' ...
/phyloTop/R/ladderSizes.R
no_license
ingted/R-Examples
R
false
false
3,699
r
#' Ladder sizes #' #' Finds the sizes and positions of ladders in the tree. #' A ladder is here defined to be a series of consecutive nodes in the tree, #' each of which has exactly one tip child (as counted by \code{\link{ILnumber}}). #' The size of the ladder is given by the number of nodes in the chain. #' ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dgm.R \name{rmRecipLow} \alias{rmRecipLow} \title{Removes reciprocal connections in the lower diagnoal of the network matrix.} \usage{ rmRecipLow(M) } \arguments{ \item{M}{adjacency matrix} } \value{ M adjacency matrix without reciprocal conn...
/man/rmRecipLow.Rd
no_license
schw4b/DGM
R
false
true
423
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dgm.R \name{rmRecipLow} \alias{rmRecipLow} \title{Removes reciprocal connections in the lower diagnoal of the network matrix.} \usage{ rmRecipLow(M) } \arguments{ \item{M}{adjacency matrix} } \value{ M adjacency matrix without reciprocal conn...
tbl <- read.table("household_power_consumption.txt", header=T, sep=';', na.strings="?", colClasses=c("character","character","numeric","numeric","numeric","numeric","numeric","numeric","numeric")) tbl <- tbl[(tbl$Date == "1/2/2007") | (tbl$Date == "2/2/2007"),] tbl$DateTime <- strptime(paste(tbl$Date, tbl$Time), "%d/%m...
/plot3.R
no_license
srinivas-w/Exploratory-Data-Analysis
R
false
false
762
r
tbl <- read.table("household_power_consumption.txt", header=T, sep=';', na.strings="?", colClasses=c("character","character","numeric","numeric","numeric","numeric","numeric","numeric","numeric")) tbl <- tbl[(tbl$Date == "1/2/2007") | (tbl$Date == "2/2/2007"),] tbl$DateTime <- strptime(paste(tbl$Date, tbl$Time), "%d/%m...
#5- gen.graph -> garde article gen.graph <- function(gen, pro = gen.pro(gen), ancestors = gen.founder(gen), indVarAffected = gen.genout(gen)$ind, varAffected = gen.genout(gen)$ind, cex = 1, col = 0, symbolsize = 1, width = 1, packed = F, align = T, ...) { num.max = max(gen.genout(gen)$ind) + 1 #On divi...
/GENLIB/R/fonctionsGraph.R
no_license
ingted/R-Examples
R
false
false
3,253
r
#5- gen.graph -> garde article gen.graph <- function(gen, pro = gen.pro(gen), ancestors = gen.founder(gen), indVarAffected = gen.genout(gen)$ind, varAffected = gen.genout(gen)$ind, cex = 1, col = 0, symbolsize = 1, width = 1, packed = F, align = T, ...) { num.max = max(gen.genout(gen)$ind) + 1 #On divi...
##################################### # Likelihood method for multiply imputing # censored observations below the minimum # detection limit (MDL) ###################################### ########################################## #run likelihood method MCMC #arguments #dat: logged data matrix N_days by N_con...
/R/lhood.R
no_license
kralljr/handles
R
false
false
11,442
r
##################################### # Likelihood method for multiply imputing # censored observations below the minimum # detection limit (MDL) ###################################### ########################################## #run likelihood method MCMC #arguments #dat: logged data matrix N_days by N_con...
library(lme4) library(coefplot2) library(ggplot2) library(stats) library(reshape2) library(caret) library(lmtest) library(lars) library(plyr) library(scales) source('R/LM_FUNCS.R') # CONSTANTS pattern_prefix = 'NSFA_' to_factor = c('SCRNO','APOE4BIN','Sex','PTGroup', 'Diag_closest_AV45_BL','Diag_closest...
/R/DOD_AV1451_LM_TILEPLOT.R
no_license
catfishy/jagust
R
false
false
7,918
r
library(lme4) library(coefplot2) library(ggplot2) library(stats) library(reshape2) library(caret) library(lmtest) library(lars) library(plyr) library(scales) source('R/LM_FUNCS.R') # CONSTANTS pattern_prefix = 'NSFA_' to_factor = c('SCRNO','APOE4BIN','Sex','PTGroup', 'Diag_closest_AV45_BL','Diag_closest...
library(igraph) data = read.table("Internet_AS.dat") wdata = t(as.matrix(data)) graph = graph(data) # getting DPF and CDF xmax = max(degree(graph)) degree_range = as.numeric(1:xmax) degree_dist = degree.distribution(graph, cumulative = FALSE)[degree_range] # deleting zero values nonzero.position = which(degree_dist >...
/Social Network Analysis/hw_1_krotov/SocialNetworks HW1/HW1.R
no_license
ankerok1/HSE_R_Labs
R
false
false
937
r
library(igraph) data = read.table("Internet_AS.dat") wdata = t(as.matrix(data)) graph = graph(data) # getting DPF and CDF xmax = max(degree(graph)) degree_range = as.numeric(1:xmax) degree_dist = degree.distribution(graph, cumulative = FALSE)[degree_range] # deleting zero values nonzero.position = which(degree_dist >...
#' Produce Plots from Library Hits #' #' This function works to generate plots which summarize the 4 different types of tags, including the GNPS Tags, NCBI taxonomy tags, UBERON tags, and lifestyle tags contribtued by users. #' @param path Path to the downloaded table of "View all Library Hits" from molecular networ...
/R/plots_libraryhits.R
no_license
alan-jarmusch/GNPStags
R
false
false
758
r
#' Produce Plots from Library Hits #' #' This function works to generate plots which summarize the 4 different types of tags, including the GNPS Tags, NCBI taxonomy tags, UBERON tags, and lifestyle tags contribtued by users. #' @param path Path to the downloaded table of "View all Library Hits" from molecular networ...
## This script consists of two functions that helps to calculate the inverse of matrix and ## cache the value for later use. So that recomputation is neglected if ## the inverse has already been calculated. ## This function has inner functions such as setMat, getMat, setInverse, getInverse. ## setMat - get the y as m...
/cachematrix.R
no_license
karthyuom/ProgrammingAssignment2
R
false
false
2,935
r
## This script consists of two functions that helps to calculate the inverse of matrix and ## cache the value for later use. So that recomputation is neglected if ## the inverse has already been calculated. ## This function has inner functions such as setMat, getMat, setInverse, getInverse. ## setMat - get the y as m...
#' Create a gauge component for a dashboard. #' #' A gauge displays a numeric value on a meter that runs between #' specified minimum and maximum values. #' #' @param value Numeric value to display #' @param min Minimum numeric value #' @param max Maximum numeric value #' @param hideMinMax hide in and max text ...
/R/gaugebuilder.R
no_license
hyedd77/gaugebuilder
R
false
false
5,627
r
#' Create a gauge component for a dashboard. #' #' A gauge displays a numeric value on a meter that runs between #' specified minimum and maximum values. #' #' @param value Numeric value to display #' @param min Minimum numeric value #' @param max Maximum numeric value #' @param hideMinMax hide in and max text ...
gen_character <- function(n, min = 5, max = 25, values = c(letters, LETTERS, 0:9)) { gen_character_(n, min, max, paste(values, collapse = "")) #replicate(n, paste(sample(values, sample.int(max - min) + min, replace = TRUE), collapse = ""), simplify = "vector") } gen_double <- function(n, f = rnorm, ...) { f(n, ....
/R/generator.R
permissive
djrondon/vroom
R
false
false
1,956
r
gen_character <- function(n, min = 5, max = 25, values = c(letters, LETTERS, 0:9)) { gen_character_(n, min, max, paste(values, collapse = "")) #replicate(n, paste(sample(values, sample.int(max - min) + min, replace = TRUE), collapse = ""), simplify = "vector") } gen_double <- function(n, f = rnorm, ...) { f(n, ....
source("rankhospital.R") rankall <- function(outcome, num = "best") { ## Read outcome data outcome_data <- read.csv2("outcome-of-care-measures.csv",sep=",",colClasses="character") hospitalranks<-data.frame() ## For each state, find the hospital of the given rank # for(state in unique(outcome_data$Stat...
/ProgAssignment3-data/rankall.R
permissive
krishnaiitd/Rprogramming
R
false
false
674
r
source("rankhospital.R") rankall <- function(outcome, num = "best") { ## Read outcome data outcome_data <- read.csv2("outcome-of-care-measures.csv",sep=",",colClasses="character") hospitalranks<-data.frame() ## For each state, find the hospital of the given rank # for(state in unique(outcome_data$Stat...
\name{subtract_dates} \alias{subtract_dates} \title{Subtracting date-time objects} \usage{ subtract_dates(e1, e2) } \arguments{ \item{e1}{a numeric or date-time object} \item{e2}{a numeric or date-time object} } \description{ subtract_dates subtracts two objects, both of which can be date-time objects. Lubri...
/man/subtract_dates.Rd
no_license
Vald/lubridate
R
false
false
432
rd
\name{subtract_dates} \alias{subtract_dates} \title{Subtracting date-time objects} \usage{ subtract_dates(e1, e2) } \arguments{ \item{e1}{a numeric or date-time object} \item{e2}{a numeric or date-time object} } \description{ subtract_dates subtracts two objects, both of which can be date-time objects. Lubri...
# This is a copy of the file 'io.R' downloaded from https://github.com/cmap/cmapR GitHub repository on Oct 1, 2019. # BSD 3-Clause License # # Copyright (c) 2017, Connectivity Map (CMap) at the Broad Institute, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modific...
/R/ptm_io.R
permissive
CogDisResLab/creedenzymatic
R
false
false
37,295
r
# This is a copy of the file 'io.R' downloaded from https://github.com/cmap/cmapR GitHub repository on Oct 1, 2019. # BSD 3-Clause License # # Copyright (c) 2017, Connectivity Map (CMap) at the Broad Institute, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modific...
# # This test file has been generated by kwb.test::create_test_files() # test_that("plot_total_infectionProb() works", { expect_error(kwb.qmra:::plot_total_infectionProb()) })
/tests/testthat/test-function-plot_total_infectionProb.R
permissive
KWB-R/kwb.qmra
R
false
false
181
r
# # This test file has been generated by kwb.test::create_test_files() # test_that("plot_total_infectionProb() works", { expect_error(kwb.qmra:::plot_total_infectionProb()) })
rm(list=ls()) library(data.table) library(xgboost) library(lubridate) library(magrittr) #读取数据--------------------------------------------------------------- product_info = fread("./data/product_info.txt") product_quantity= fread("./data/product_quantity.txt") prediction = fread("./data/prediction_lilei_20170320.txt") ...
/Ctrip-出行产品未来14个月销量预测方案/model11.R
no_license
feedlove/Notes
R
false
false
8,470
r
rm(list=ls()) library(data.table) library(xgboost) library(lubridate) library(magrittr) #读取数据--------------------------------------------------------------- product_info = fread("./data/product_info.txt") product_quantity= fread("./data/product_quantity.txt") prediction = fread("./data/prediction_lilei_20170320.txt") ...
# flatten lists of lists to single list flatten_list <- function (x) { x2 <- list () for (i in x) x2 <- c (x2, i) return (x2) } #' dodgr_fundamental_cycles #' #' Calculate fundamental cycles in a graph. #' #' @param graph `data.frame` or equivalent object representing the contracted #' network grap...
/R/fund-cycles.R
no_license
polettif/dodgr
R
false
false
14,613
r
# flatten lists of lists to single list flatten_list <- function (x) { x2 <- list () for (i in x) x2 <- c (x2, i) return (x2) } #' dodgr_fundamental_cycles #' #' Calculate fundamental cycles in a graph. #' #' @param graph `data.frame` or equivalent object representing the contracted #' network grap...
context("Mutate") test_that("repeated outputs applied progressively (data frame)", { df <- data.frame(x = 1) out <- mutate(df, z = x + 1, z = z + 1) expect_equal(nrow(out), 1) expect_equal(ncol(out), 2) expect_equal(out$z, 3) }) test_that("repeated outputs applied progressively (grouped_df)", { df <- da...
/tests/testthat/test-mutate.r
permissive
dirkschumacher/dplyr
R
false
false
26,813
r
context("Mutate") test_that("repeated outputs applied progressively (data frame)", { df <- data.frame(x = 1) out <- mutate(df, z = x + 1, z = z + 1) expect_equal(nrow(out), 1) expect_equal(ncol(out), 2) expect_equal(out$z, 3) }) test_that("repeated outputs applied progressively (grouped_df)", { df <- da...
#' Calendar: iso-year-week-day #' #' `iso_year_week_day()` constructs a calendar from the ISO year, week number, #' and week day. #' #' @details #' Fields are recycled against each other. #' #' Fields are collected in order until the first `NULL` field is located. No #' fields after the first `NULL` field are used. #' ...
/R/iso-year-week-day.R
permissive
isabella232/clock-2
R
false
false
29,614
r
#' Calendar: iso-year-week-day #' #' `iso_year_week_day()` constructs a calendar from the ISO year, week number, #' and week day. #' #' @details #' Fields are recycled against each other. #' #' Fields are collected in order until the first `NULL` field is located. No #' fields after the first `NULL` field are used. #' ...
library(ltmle) source("fcn_err_spending_boundry.R") source("fcn_compcov.R") source("fcn_trialresults.R") simtrials.unadjonly <- function(dt, v){ # parameters set-up nsim <- v$nsim nmax <- v$nmax K <- v$K enrollrate <- v$enrollrate randomA <- v$randomA A_to_L1 <- v$A_to_L1 L1_to_Y <...
/auxiliary_code_determine_nmax/unadj/fcn_nmax_unadj.R
no_license
tqian/gst_tmle
R
false
false
6,666
r
library(ltmle) source("fcn_err_spending_boundry.R") source("fcn_compcov.R") source("fcn_trialresults.R") simtrials.unadjonly <- function(dt, v){ # parameters set-up nsim <- v$nsim nmax <- v$nmax K <- v$K enrollrate <- v$enrollrate randomA <- v$randomA A_to_L1 <- v$A_to_L1 L1_to_Y <...
# Processing the labels of the raw data (6.8 in "Deep Learning with R") group1_dir <- "/Users/sofia/comp150_project1/data/data1" train_dir <- file.path(group1_dir, "train") labels <- c() texts <- c() for (label_type in c("male", "female")) { label <- switch(label_type, male = 0, female = 1) dir_name <- file.path...
/word_plots_R/Plots_Words.R
no_license
bowen1993/comp150_project1
R
false
false
5,339
r
# Processing the labels of the raw data (6.8 in "Deep Learning with R") group1_dir <- "/Users/sofia/comp150_project1/data/data1" train_dir <- file.path(group1_dir, "train") labels <- c() texts <- c() for (label_type in c("male", "female")) { label <- switch(label_type, male = 0, female = 1) dir_name <- file.path...
library(tm) tw.cleantext = function(twit.dat){ # Not sure if necessary. twit.dat$text.clean = gsub('<.*?>', '', twit.dat$text) # Removing punctuation twit.dat$text.clean = gsub('[[:punct:]]', '', twit.dat$text.clean) # Removing Emojis and making everything text twit.dat$text.clean = sapply(twit.dat$text.cl...
/r_files/tw.cleantext.R
no_license
themaninorange/primaryPredict
R
false
false
637
r
library(tm) tw.cleantext = function(twit.dat){ # Not sure if necessary. twit.dat$text.clean = gsub('<.*?>', '', twit.dat$text) # Removing punctuation twit.dat$text.clean = gsub('[[:punct:]]', '', twit.dat$text.clean) # Removing Emojis and making everything text twit.dat$text.clean = sapply(twit.dat$text.cl...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/veg_data.R \docType{data} \name{species_list} \alias{species_list} \title{Useful information about plants identified} \format{ A data frame with 268 rows and 10 columns: \describe{ \item{full_name}{Scientific name - the genus and species} ...
/man/species_list.Rd
no_license
lydiaPenglish/STRIPS2veg
R
false
true
1,337
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/veg_data.R \docType{data} \name{species_list} \alias{species_list} \title{Useful information about plants identified} \format{ A data frame with 268 rows and 10 columns: \describe{ \item{full_name}{Scientific name - the genus and species} ...
#This is designed to work on the problem of having a dataset with groups of questions and stacking those questions on top of each other. library(tidyverse) library(likert) #Two datasets with very simple likert scales so I can play with joining together #the data after setting the factor levels. Q1 <- c("One", "Two...
/StackGatherLikert.R
no_license
bduckles/LikertScripts
R
false
false
1,355
r
#This is designed to work on the problem of having a dataset with groups of questions and stacking those questions on top of each other. library(tidyverse) library(likert) #Two datasets with very simple likert scales so I can play with joining together #the data after setting the factor levels. Q1 <- c("One", "Two...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_agg_degree_out.R \name{get_agg_degree_out} \alias{get_agg_degree_out} \title{Get an aggregate value from the outdegree of nodes} \usage{ get_agg_degree_out(graph, agg, conditions = NULL) } \arguments{ \item{graph}{a graph object of class ...
/man/get_agg_degree_out.Rd
permissive
lionel-/DiagrammeR
R
false
true
1,642
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_agg_degree_out.R \name{get_agg_degree_out} \alias{get_agg_degree_out} \title{Get an aggregate value from the outdegree of nodes} \usage{ get_agg_degree_out(graph, agg, conditions = NULL) } \arguments{ \item{graph}{a graph object of class ...
##################################### # deaths ~ f(age; race; gender) # imputed model visuals, .R # last edit: 3/25 (M.E) ##################################### sim = dfs[[1]] %>% mutate(age_group = fct_relevel(age, '5-9', after = 2)) # ... plot it out # ... year effects dfs[[1]] %>% data_grid( year, ...
/imputed_visuals.r
no_license
f-edwards/police-mort-age-spec
R
false
false
3,261
r
##################################### # deaths ~ f(age; race; gender) # imputed model visuals, .R # last edit: 3/25 (M.E) ##################################### sim = dfs[[1]] %>% mutate(age_group = fct_relevel(age, '5-9', after = 2)) # ... plot it out # ... year effects dfs[[1]] %>% data_grid( year, ...
#' filter by date range #' #' @param dt data.table or vector #' @param date_range date ranges: c(date_start, date_end) #' @param DateName the name of the Date column in data table #' #' @return #' @export #' @examples filter_date <- function(dt, date_range, DateName = 'Date'){ if(is.list(dt)){ if(is.data.tabl...
/R/date.R
no_license
xuzhenwu/xu
R
false
false
1,591
r
#' filter by date range #' #' @param dt data.table or vector #' @param date_range date ranges: c(date_start, date_end) #' @param DateName the name of the Date column in data table #' #' @return #' @export #' @examples filter_date <- function(dt, date_range, DateName = 'Date'){ if(is.list(dt)){ if(is.data.tabl...
devtools::load_all('./') library(magrittr) library(parallel) NCORES = 6 NSAMPLING = 60 load('data_container.Rdata') # DATASET_PREFIXES = c('rat1', 'rat2', 'rbm1', 'rbm2', 'rnor1', 'rnor2', # 'mpreg1a', 'mpreg1b', 'mpreg2a', 'mpreg2b', # 'dmelA', 'dmelAC', 'dmelAV', # ...
/scripts/cdev-random_vs_ground.R
no_license
ttdtrang/cdev-paper
R
false
false
2,115
r
devtools::load_all('./') library(magrittr) library(parallel) NCORES = 6 NSAMPLING = 60 load('data_container.Rdata') # DATASET_PREFIXES = c('rat1', 'rat2', 'rbm1', 'rbm2', 'rnor1', 'rnor2', # 'mpreg1a', 'mpreg1b', 'mpreg2a', 'mpreg2b', # 'dmelA', 'dmelAC', 'dmelAV', # ...
test_that("forecast_comparison", { # simple time series A = c(1:100) + rnorm(100) date = seq.Date(from = as.Date('2000-01-01'), by = 'month', length.out = 100) Data = data.frame(date = date, A) # create forecasts forecast.uni = forecast_univariate( Data = Data, forecast.dates = tail(Data$d...
/tests/testthat/test-forecast_metrics.R
permissive
tylerJPike/OOS
R
false
false
3,555
r
test_that("forecast_comparison", { # simple time series A = c(1:100) + rnorm(100) date = seq.Date(from = as.Date('2000-01-01'), by = 'month', length.out = 100) Data = data.frame(date = date, A) # create forecasts forecast.uni = forecast_univariate( Data = Data, forecast.dates = tail(Data$d...
#' Check Row Bind #' #' Checks whether a data frame has the same columns of the same classes as a second data frame which means they can be \code{\link{rbind}}ed without a problem. #' #' @param x The first data frame. #' @param y The second data frame. #' @param exclusive A flag indicating whether other columns are no...
/R/rbind.R
permissive
cran/checkr
R
false
false
2,244
r
#' Check Row Bind #' #' Checks whether a data frame has the same columns of the same classes as a second data frame which means they can be \code{\link{rbind}}ed without a problem. #' #' @param x The first data frame. #' @param y The second data frame. #' @param exclusive A flag indicating whether other columns are no...
### Data Ingest ### #Load in subsetted NHES 2012 survey data for analysis NHES = read.csv('./processed_NHES_data.csv') #Removes the row ID column read in from the .csv NHES = NHES[-1] ### Dataset Transformation ### #Replaces all the -1 values from the NHES survey with NA bceause -1 represents a #valid skip NHES[NH...
/proj_analysis.R
no_license
cdo03c/Stat504Proj
R
false
false
39,147
r
### Data Ingest ### #Load in subsetted NHES 2012 survey data for analysis NHES = read.csv('./processed_NHES_data.csv') #Removes the row ID column read in from the .csv NHES = NHES[-1] ### Dataset Transformation ### #Replaces all the -1 values from the NHES survey with NA bceause -1 represents a #valid skip NHES[NH...
#' Labels to represent niches of tips and ancestors #' #' @description niche_labels helps in adding bar-type labels that represent #' species ecological niches in one environmental variable. #' #' @param tree an object of class "phylo". #' @param whole_rec_table matrix of environmental bins for all tips and nodes #' de...
/R/plotting_helpers.R
no_license
spiritu-santi/nichevol
R
false
false
23,144
r
#' Labels to represent niches of tips and ancestors #' #' @description niche_labels helps in adding bar-type labels that represent #' species ecological niches in one environmental variable. #' #' @param tree an object of class "phylo". #' @param whole_rec_table matrix of environmental bins for all tips and nodes #' de...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wrapperFunctions.R \name{analyzeEvolution} \alias{analyzeEvolution} \title{Analysis of repeated measures of the same patient over time} \usage{ analyzeEvolution(data, fileExtension = "txt") } \arguments{ \item{data}{Either 1) the pat...
/man/analyzeEvolution.Rd
no_license
cran/rPACI
R
false
true
2,594
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wrapperFunctions.R \name{analyzeEvolution} \alias{analyzeEvolution} \title{Analysis of repeated measures of the same patient over time} \usage{ analyzeEvolution(data, fileExtension = "txt") } \arguments{ \item{data}{Either 1) the pat...
#' Import Market Type related Data to R from the Sandbox #' #' @description Function imports file from the MetaTrader sandbox. Function performs necessary cleansing of the data column types #' #' `r lifecycle::badge('stable')` #' #' @param path_sbxm - String, Path to the sandbox with the log file (master terminal...
/R/mt_import_data.R
permissive
cran/lazytrade
R
false
false
1,907
r
#' Import Market Type related Data to R from the Sandbox #' #' @description Function imports file from the MetaTrader sandbox. Function performs necessary cleansing of the data column types #' #' `r lifecycle::badge('stable')` #' #' @param path_sbxm - String, Path to the sandbox with the log file (master terminal...
#' @title Acquisition Function SMS-EGO #' #' @include AcqFunction.R #' @name mlr_acqfunctions_smsego #' #' @description #' S-Metric Selection Evolutionary Multi-Objective Optimization Algorithm Acquisition Function. #' #' @section Parameters: #' * `"lambda"` (`numeric(1)`)\cr #' \eqn{\lambda} value used for the confi...
/R/AcqFunctionSmsEgo.R
no_license
mlr-org/mlr3mbo
R
false
false
6,712
r
#' @title Acquisition Function SMS-EGO #' #' @include AcqFunction.R #' @name mlr_acqfunctions_smsego #' #' @description #' S-Metric Selection Evolutionary Multi-Objective Optimization Algorithm Acquisition Function. #' #' @section Parameters: #' * `"lambda"` (`numeric(1)`)\cr #' \eqn{\lambda} value used for the confi...
.isInteger <- function(x){ is.numeric(x) && all(is.finite(x)) && !any(is.na(x)) && all(trunc(x) == x) } .isPoint <- function(M){ is.numeric(M) && length(M) == 2L && !any(is.na(M)) && all(is.finite(M)) } .toCplx <- function(M){ if(isTRUE(all.equal(M, Inf, check.attributes = FALSE))){ Inf }else{ ...
/R/internal.R
no_license
cran/PlaneGeometry
R
false
false
7,290
r
.isInteger <- function(x){ is.numeric(x) && all(is.finite(x)) && !any(is.na(x)) && all(trunc(x) == x) } .isPoint <- function(M){ is.numeric(M) && length(M) == 2L && !any(is.na(M)) && all(is.finite(M)) } .toCplx <- function(M){ if(isTRUE(all.equal(M, Inf, check.attributes = FALSE))){ Inf }else{ ...
library(testthat) library(kage) test_check("kage")
/tests/testthat.R
no_license
nhk2120/kage
R
false
false
52
r
library(testthat) library(kage) test_check("kage")
data_dir <- here::here("ignore", "materials", "data") data_dir_task <- here::here("ignore", "materials", "data", "task_data") stats_dir <- here::here("ignore", "data_R")
/R/paths.R
no_license
nar2160/art-muse-nicotine
R
false
false
170
r
data_dir <- here::here("ignore", "materials", "data") data_dir_task <- here::here("ignore", "materials", "data", "task_data") stats_dir <- here::here("ignore", "data_R")
library(tidyr, warn.conflicts = F, quietly = T) library(dplyr, warn.conflicts = F, quietly = T) library(purrr, warn.conflicts = F, quietly = T) library(MASS, warn.conflicts = F, quietly = T) library(bin2mi) library(m2imp) alpha <- 0.025 power <- 0.85 cor_xl <- 0.4 pc <- 0.8 pt <- 0.8 m1 <- 0.23 n_obs <- 500 #rate of...
/pgms_simrun/old/mdsur_obs3_sc9.R
no_license
yuliasidi/ch2sim
R
false
false
3,208
r
library(tidyr, warn.conflicts = F, quietly = T) library(dplyr, warn.conflicts = F, quietly = T) library(purrr, warn.conflicts = F, quietly = T) library(MASS, warn.conflicts = F, quietly = T) library(bin2mi) library(m2imp) alpha <- 0.025 power <- 0.85 cor_xl <- 0.4 pc <- 0.8 pt <- 0.8 m1 <- 0.23 n_obs <- 500 #rate of...
setwd("~/RSimpactHelp/R/Projects_2017/Report_1/Prepare_Seeds_Sequences/") ## Load required packages pacman::p_load(devtools, Rcpp, ape, expoTree, data.table, phylosim, RSimpactCyan, RSimpactHelper, readr, phangorn, Biostrings, phyclust, DECIPHER,treedater,geiger,picante) # From unique ...
/Projects_2017/Report_1/Prepare_Seeds_Sequences/prepare.pol.A.B.C.D.G.sequences.R
no_license
niyongabirejunior/arteta
R
false
false
5,672
r
setwd("~/RSimpactHelp/R/Projects_2017/Report_1/Prepare_Seeds_Sequences/") ## Load required packages pacman::p_load(devtools, Rcpp, ape, expoTree, data.table, phylosim, RSimpactCyan, RSimpactHelper, readr, phangorn, Biostrings, phyclust, DECIPHER,treedater,geiger,picante) # From unique ...
########## # Import and process data #http://stackoverflow.com/questions/11433432/importing-multiple-csv-files-into-r listFiles = list.files(getwd(),pattern ="stockPrices*") #get list of fileNames myfiles = lapply(listFiles, function(filename) read.csv(filename,header = T, stringsAsFactors = F)) n = nrow...
/msia_statistical_methods/hw_01_data_processing (not used).R
no_license
Ajay20202020/courses
R
false
false
1,693
r
########## # Import and process data #http://stackoverflow.com/questions/11433432/importing-multiple-csv-files-into-r listFiles = list.files(getwd(),pattern ="stockPrices*") #get list of fileNames myfiles = lapply(listFiles, function(filename) read.csv(filename,header = T, stringsAsFactors = F)) n = nrow...
###clean every thing### rm(list=ls()) ls() ###import libraries### library(raster) library(rgdal) library(maptools) library(RColorBrewer) library(plotrix) library(sp) library(lattice) library(rgeos) require(RgoogleMaps) library(shapefiles) library(xts) require(plyr) require(tseries) require(ggplot2...
/time series analysis/rawalpindi/script_senstivity_single_model.R
no_license
ChunaraLab/dengue-containment
R
false
false
8,278
r
###clean every thing### rm(list=ls()) ls() ###import libraries### library(raster) library(rgdal) library(maptools) library(RColorBrewer) library(plotrix) library(sp) library(lattice) library(rgeos) require(RgoogleMaps) library(shapefiles) library(xts) require(plyr) require(tseries) require(ggplot2...
#' List of available cell type references #' #' @return a list with reference globals #' #' @details ORIGINAL AUTHOR: Matthew Suderman #' The original meffil.list.cell.type.references and get.cell.type.reference function from meffil v1.0.0 #' at githug : https://github.com/perishky/meffil #' #' @export meffil....
/R/meffil.list.cell.type.references.R
permissive
das2000sidd/methylclock
R
false
false
932
r
#' List of available cell type references #' #' @return a list with reference globals #' #' @details ORIGINAL AUTHOR: Matthew Suderman #' The original meffil.list.cell.type.references and get.cell.type.reference function from meffil v1.0.0 #' at githug : https://github.com/perishky/meffil #' #' @export meffil....
\name{GO_enrichment-ConsensusPartitionList-method} \alias{GO_enrichment,ConsensusPartitionList-method} \title{ Perform Gene Ontology Enrichment on Signature Genes } \description{ Perform Gene Ontology Enrichment on Signature Genes } \usage{ \S4method{GO_enrichment}{ConsensusPartitionList}(object, cutoff = 0.05, id_...
/man/GO_enrichment-ConsensusPartitionList-method.rd
permissive
liangdp1984/cola
R
false
false
1,456
rd
\name{GO_enrichment-ConsensusPartitionList-method} \alias{GO_enrichment,ConsensusPartitionList-method} \title{ Perform Gene Ontology Enrichment on Signature Genes } \description{ Perform Gene Ontology Enrichment on Signature Genes } \usage{ \S4method{GO_enrichment}{ConsensusPartitionList}(object, cutoff = 0.05, id_...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sffm_fit_simulate_earthquake.R \name{sffm_fit_parameters} \alias{sffm_fit_parameters} \title{Fit SFFM parameters} \usage{ sffm_fit_parameters(m1, default_seed = 1, NumRandSf = 400, sffm_pars = .sffm_default_model_parameters, reg_par_start...
/R/rptha/man/sffm_fit_parameters.Rd
permissive
Carol-Matthews/ptha
R
false
true
3,952
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sffm_fit_simulate_earthquake.R \name{sffm_fit_parameters} \alias{sffm_fit_parameters} \title{Fit SFFM parameters} \usage{ sffm_fit_parameters(m1, default_seed = 1, NumRandSf = 400, sffm_pars = .sffm_default_model_parameters, reg_par_start...
library(RNeo4j) library(ggmap) graph = startGraph("http://jsc-na-vocab:7474/db/data/") #Function to remove whitespace trim <- function (x) gsub("^\\s+|\\s+$", "", x) #Dataframe of principal investigators investigators <- data.frame(data$'_id',data$'Experiment Details - Principal Investigator(s)',vector(length = ...
/R/Location.R
permissive
davidmeza1/KA_Interns
R
false
false
1,405
r
library(RNeo4j) library(ggmap) graph = startGraph("http://jsc-na-vocab:7474/db/data/") #Function to remove whitespace trim <- function (x) gsub("^\\s+|\\s+$", "", x) #Dataframe of principal investigators investigators <- data.frame(data$'_id',data$'Experiment Details - Principal Investigator(s)',vector(length = ...
testlist <- list(b = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), p1 = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.79989986622834e+41, 2.68298522855314e-211, 1444042902784.06, ...
/metacoder/inst/testfiles/intersect_line_rectangle/AFL_intersect_line_rectangle/intersect_line_rectangle_valgrind_files/1615769911-test.R
permissive
akhikolla/updatedatatype-list3
R
false
false
727
r
testlist <- list(b = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), p1 = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.79989986622834e+41, 2.68298522855314e-211, 1444042902784.06, ...
#To visualize the data to get a first impression # To do # plan wt to do next #produce a linear predictor for each store # learn how to use predict() #submit a base line submission by this # any better visualization method other than simple plot # how to plot the data against # brainstorm how to clearly organize plotte...
/observe.R
no_license
melvincheung/rossmann
R
false
false
1,927
r
#To visualize the data to get a first impression # To do # plan wt to do next #produce a linear predictor for each store # learn how to use predict() #submit a base line submission by this # any better visualization method other than simple plot # how to plot the data against # brainstorm how to clearly organize plotte...
testlist <- list(x = structure(c(3.02668741796475e+267, 3.02668741796475e+267, 3.02668741796475e+267, 3.02668741796475e+267, 3.02668741796475e+267, 3.02668741796475e+267, 3.02668766397106e+267, 3.02668741796475e+267, 3.02668741796475e+267), .Dim = c(3L, 3L))) result <- do.call(bravo:::colSumSq_matrix,testlist) str(r...
/bravo/inst/testfiles/colSumSq_matrix/libFuzzer_colSumSq_matrix/colSumSq_matrix_valgrind_files/1609959246-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
326
r
testlist <- list(x = structure(c(3.02668741796475e+267, 3.02668741796475e+267, 3.02668741796475e+267, 3.02668741796475e+267, 3.02668741796475e+267, 3.02668741796475e+267, 3.02668766397106e+267, 3.02668741796475e+267, 3.02668741796475e+267), .Dim = c(3L, 3L))) result <- do.call(bravo:::colSumSq_matrix,testlist) str(r...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fun_extract_row.r \name{fun_extract_row} \alias{fun_extract_row} \title{Extracts a single row of image frame} \usage{ fun_extract_row(x, row = NULL) } \arguments{ \item{x}{tibble containing 3 columns with pixel coordinates i and j and pixel i...
/man/fun_extract_row.Rd
permissive
wolfinstitute/sunxplrr
R
false
true
605
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fun_extract_row.r \name{fun_extract_row} \alias{fun_extract_row} \title{Extracts a single row of image frame} \usage{ fun_extract_row(x, row = NULL) } \arguments{ \item{x}{tibble containing 3 columns with pixel coordinates i and j and pixel i...
IRF_mult <- function(data,tab_y,tab_r,std_y=0,fspecs=fspecs,empirical_changes=NULL,start_combis,downgrade = 2,conf_lvls=NULL,periods=120,diff_to_benchmark=TRUE){ #DESCRIPTION: # Calculates IRFs based on bootstrap coefficient draws for a given downgrade scenario using IRF_yshock_bs.R # IRFs are calculated for diff...
/Replication Codes/IRF_mult.R
no_license
gvschweinitz/ES_18_The-Joint-Dynamics-of-Sovereign-Ratings-and-Government-Bond-Yields
R
false
false
5,992
r
IRF_mult <- function(data,tab_y,tab_r,std_y=0,fspecs=fspecs,empirical_changes=NULL,start_combis,downgrade = 2,conf_lvls=NULL,periods=120,diff_to_benchmark=TRUE){ #DESCRIPTION: # Calculates IRFs based on bootstrap coefficient draws for a given downgrade scenario using IRF_yshock_bs.R # IRFs are calculated for diff...
## Download zip file fileurl1 <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(fileurl1, "file1.zip", mode = "wb") ## Read dataframe, specifying seperator and header hpc <- read.table(unz("file1.zip", "household_power_consumption.txt"), sep=";", header = T) ## C...
/plot4.R
no_license
scholma/ExData_Plotting1
R
false
false
1,952
r
## Download zip file fileurl1 <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(fileurl1, "file1.zip", mode = "wb") ## Read dataframe, specifying seperator and header hpc <- read.table(unz("file1.zip", "household_power_consumption.txt"), sep=";", header = T) ## C...
#' @useDynLib AirPolModChem #' @export R.star = 8.314462 # J/mol/K #' @export k.b = 1.38065E-23 # J/K #' @export N.A = 6.02214E23 # molecules/mol #' @export R.air = 287.058 # J/kg/K #' @export R.h2o = 461.527 # J/kg/K #' @export mu.h2o = 18.015 # g/mol #' @export mu.air = 28.9644 # g/mol #' @export ...
/R/constants.R
no_license
ayanu/airpolmodchem
R
false
false
507
r
#' @useDynLib AirPolModChem #' @export R.star = 8.314462 # J/mol/K #' @export k.b = 1.38065E-23 # J/K #' @export N.A = 6.02214E23 # molecules/mol #' @export R.air = 287.058 # J/kg/K #' @export R.h2o = 461.527 # J/kg/K #' @export mu.h2o = 18.015 # g/mol #' @export mu.air = 28.9644 # g/mol #' @export ...
# This mini-project is based on the K-Means exercise from 'R in Action' # Go here for the original blog post and solutions # http://www.r-bloggers.com/k-means-clustering-from-r-in-action/ # Exercise 0: Install these packages if you don't have them already # install.packages(c("cluster", "rattle","NbClust")) # Now lo...
/Machine-Learning/K-Means-Clustering/clustering.R
no_license
anxin16/Foundations-of-Data-Science
R
false
false
2,896
r
# This mini-project is based on the K-Means exercise from 'R in Action' # Go here for the original blog post and solutions # http://www.r-bloggers.com/k-means-clustering-from-r-in-action/ # Exercise 0: Install these packages if you don't have them already # install.packages(c("cluster", "rattle","NbClust")) # Now lo...
library(shiny) library(shinyWidgets) library(shinyjs) library(shinyBS) source('helper_scripts/definitions.R') shinyUI(fluidPage(theme="custom.css", useShinyjs(), navbarPage(title = 'Explore Dataset', tabPanel( "Load Dataset", tabsetPanel(type='tabs', tabPanel(...
/shiny-explore-time_series/ui.R
no_license
shane-kercheval/shiny-explore-time-series
R
false
false
30,808
r
library(shiny) library(shinyWidgets) library(shinyjs) library(shinyBS) source('helper_scripts/definitions.R') shinyUI(fluidPage(theme="custom.css", useShinyjs(), navbarPage(title = 'Explore Dataset', tabPanel( "Load Dataset", tabsetPanel(type='tabs', tabPanel(...
load('data_dir/dosages/pruned_dosages/GRM.RData') library(MASS) truehist(GRM[lower.tri(GRM,diag=F)],ylim=c(0,0.01),proba=TRUE, nbins = 10) #heavy right tail. #based on distribution, will use 0.3 as cutoff to define close pairs close_pairs=NULL for (i in 1:dim(GRM)[1]) { w=which(GRM[i,]>0.3) w=w[w>i] if (length(w)!...
/CFW_GWAS/code_dir/create_input/dealw_close_pairs.R
no_license
limix/SGE
R
false
false
2,154
r
load('data_dir/dosages/pruned_dosages/GRM.RData') library(MASS) truehist(GRM[lower.tri(GRM,diag=F)],ylim=c(0,0.01),proba=TRUE, nbins = 10) #heavy right tail. #based on distribution, will use 0.3 as cutoff to define close pairs close_pairs=NULL for (i in 1:dim(GRM)[1]) { w=which(GRM[i,]>0.3) w=w[w>i] if (length(w)!...
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554...
/DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615831738-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
2,048
r
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554...
library(ape) testtree <- read.tree("2461_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="2461_0_unrooted.txt")
/codeml_files/newick_trees_processed/2461_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("2461_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="2461_0_unrooted.txt")
testlist <- list(rates = numeric(0), thresholds = c(0, 0, 0, 0, 0), x = numeric(0)) result <- do.call(grattan::IncomeTax,testlist) str(result)
/grattan/inst/testfiles/IncomeTax/libFuzzer_IncomeTax/IncomeTax_valgrind_files/1610382170-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
142
r
testlist <- list(rates = numeric(0), thresholds = c(0, 0, 0, 0, 0), x = numeric(0)) result <- do.call(grattan::IncomeTax,testlist) str(result)
#' Basic predicates for validation #' #' @description The following predicate functions augment predicates from the #' \pkg{base} and \pkg{rlang} packages to enable them to produce informative #' error messages when used as checks in [fasten()], [firmly()], #' [validator()], [validate()]. #' #' - [Boolean predica...
/R/predicates.R
permissive
egnha/valaddin
R
false
false
16,555
r
#' Basic predicates for validation #' #' @description The following predicate functions augment predicates from the #' \pkg{base} and \pkg{rlang} packages to enable them to produce informative #' error messages when used as checks in [fasten()], [firmly()], #' [validator()], [validate()]. #' #' - [Boolean predica...
setwd("C:/Users/Eric/Desktop/Steph/rhw/household") fh <- file("household_power_consumption.txt") ba <- read.table(text=grep("^[1,2]/2/2007",readLines(fh),value=TRUE), col.names=c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_mete...
/plot4.R
no_license
stephyjan/ExData_Plotting1
R
false
false
1,469
r
setwd("C:/Users/Eric/Desktop/Steph/rhw/household") fh <- file("household_power_consumption.txt") ba <- read.table(text=grep("^[1,2]/2/2007",readLines(fh),value=TRUE), col.names=c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_mete...
server = function(input, output, session) { input_data = reactiveValues() observeEvent(input$upload, { if (input$upload == 'go_to_upload') { output$main = renderUI({ list(fileInput("file", label = ""), textOutput('summary_text'), ...
/codes/server.R
no_license
signal-integration/DrugSynergy
R
false
false
29,885
r
server = function(input, output, session) { input_data = reactiveValues() observeEvent(input$upload, { if (input$upload == 'go_to_upload') { output$main = renderUI({ list(fileInput("file", label = ""), textOutput('summary_text'), ...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53817542601559e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L))) result <- do.call(CNull:::communities_individual_based_sampling_beta,testlist) str(result)
/CNull/inst/testfiles/communities_individual_based_sampling_beta/AFL_communities_individual_based_sampling_beta/communities_individual_based_sampling_beta_valgrind_files/1615834332-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
270
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53817542601559e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L))) result <- do.call(CNull:::communities_individual_based_sampling_beta,testlist) str(result)
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/rdateutils.R \name{start.of.this.week.date} \alias{start.of.this.week.date} \title{start.of.this.week.date()} \usage{ \method{start}{of.this.week.date}() } \description{ This function generates the date of Monday of this week as a dat...
/man/start.of.this.week.date.Rd
no_license
Caelainn/rdateutils
R
false
false
371
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/rdateutils.R \name{start.of.this.week.date} \alias{start.of.this.week.date} \title{start.of.this.week.date()} \usage{ \method{start}{of.this.week.date}() } \description{ This function generates the date of Monday of this week as a dat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/read_probs.R \name{read_probs} \alias{read_probs} \title{Read genotype probability object from file} \usage{ read_probs( chr = NULL, start_val = NULL, end_val = NULL, datapath, allele = TRUE, method, probdir = "genoprob" ) } \ar...
/man/read_probs.Rd
no_license
byandell/qtl2pattern
R
false
true
1,018
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/read_probs.R \name{read_probs} \alias{read_probs} \title{Read genotype probability object from file} \usage{ read_probs( chr = NULL, start_val = NULL, end_val = NULL, datapath, allele = TRUE, method, probdir = "genoprob" ) } \ar...
test_that("match_evaluate returns matches that are correct number", { corp_data1 <- copy(fedmatch::corp_data1) corp_data2 <- copy(fedmatch::corp_data2) # setnames(corp_data1, "unique_key_1", "id1") # setnames(corp_data2, "unique_key_2", "id2") tier_list <- list( a = list(match_type = "exact"), b = li...
/tests/testthat/test_evaluate.R
permissive
seunglee98/fedmatch
R
false
false
3,720
r
test_that("match_evaluate returns matches that are correct number", { corp_data1 <- copy(fedmatch::corp_data1) corp_data2 <- copy(fedmatch::corp_data2) # setnames(corp_data1, "unique_key_1", "id1") # setnames(corp_data2, "unique_key_2", "id2") tier_list <- list( a = list(match_type = "exact"), b = li...
#library(gtools) library(MASS) library(boot) #library(ResourceSelection) #library(car) setwd("/home/tanjinxu/Project/noncoding") source("noncoding_loaddata.R") ## Load the data load(file="train_test.rda") train_data <- datlist$train test_data <- datlist$test ## TO-DO: try what we get if the data is normalized/standa...
/source/backup/noncoding_glm_regr.R
no_license
tjx711/noncoding-recurrence
R
false
false
3,762
r
#library(gtools) library(MASS) library(boot) #library(ResourceSelection) #library(car) setwd("/home/tanjinxu/Project/noncoding") source("noncoding_loaddata.R") ## Load the data load(file="train_test.rda") train_data <- datlist$train test_data <- datlist$test ## TO-DO: try what we get if the data is normalized/standa...
# Load function source("plot_ts.R") # Load file co2 <- read.csv("co2_mm_mlo.csv") # Make plot plot_ts(co2$decdate, co2$interpolated, main = "Mauna Loa CO2 record")
/plot_climate.R
no_license
westonmccool/my-r-repo
R
false
false
166
r
# Load function source("plot_ts.R") # Load file co2 <- read.csv("co2_mm_mlo.csv") # Make plot plot_ts(co2$decdate, co2$interpolated, main = "Mauna Loa CO2 record")
% Generated by roxygen2 (4.0.2): do not edit by hand \name{Findalphabeta_gamma} \alias{Findalphabeta_gamma} \title{Quantile difference when tuning Gamma distribution hyper-parameters} \usage{ Findalphabeta_gamma(pars, p5, p95) } \arguments{ \item{pars}{the shape and rate parameters (in that order) of the Gamma distribu...
/man/Findalphabeta_gamma.Rd
no_license
shazhe/mvst0
R
false
false
1,737
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \name{Findalphabeta_gamma} \alias{Findalphabeta_gamma} \title{Quantile difference when tuning Gamma distribution hyper-parameters} \usage{ Findalphabeta_gamma(pars, p5, p95) } \arguments{ \item{pars}{the shape and rate parameters (in that order) of the Gamma distribu...
directory<-"C:/Users/ma/Desktop/research10-14/drafts/exdata-data-household_power_consumption/household_power_consumption2.txt"; data<-read.table(directory,header=T,sep=";",na.strings="?",colClasses=c("character","character","numeric","numeric","numeric","numeric","numeric","numeric","numeric")); data<-data[(data$Date=...
/plot1.R
no_license
JanetMa/exdata016janet
R
false
false
615
r
directory<-"C:/Users/ma/Desktop/research10-14/drafts/exdata-data-household_power_consumption/household_power_consumption2.txt"; data<-read.table(directory,header=T,sep=";",na.strings="?",colClasses=c("character","character","numeric","numeric","numeric","numeric","numeric","numeric","numeric")); data<-data[(data$Date=...
\name{print.nb.data} \alias{print.nb.data} \title{Print summary of the nb counts} \usage{ \method{print}{nb.data}(x, ...) } \arguments{ \item{x}{output from \code{\link{prepare.nb.data}}} \item{...}{additional parameters, currently not used} } \description{ Print summary of the nb counts }
/man/print.nb.data.Rd
no_license
cran/NBPSeq
R
false
false
297
rd
\name{print.nb.data} \alias{print.nb.data} \title{Print summary of the nb counts} \usage{ \method{print}{nb.data}(x, ...) } \arguments{ \item{x}{output from \code{\link{prepare.nb.data}}} \item{...}{additional parameters, currently not used} } \description{ Print summary of the nb counts }
#creating a function that creates a matrix that can cache its inverse makeCacheMatrix <- function(x = matrix()){ inv <- NULL set <- function(y){ x <<- y inv <<- NULL } get <- function() {x} #gets matrix setInverse <- function(inverse) {inv <<- inverse} #sets matrix getInverse <- fun...
/cachematrix.R
no_license
donskyl15/ProgrammingAssigment2
R
false
false
797
r
#creating a function that creates a matrix that can cache its inverse makeCacheMatrix <- function(x = matrix()){ inv <- NULL set <- function(y){ x <<- y inv <<- NULL } get <- function() {x} #gets matrix setInverse <- function(inverse) {inv <<- inverse} #sets matrix getInverse <- fun...
# 2015-07-10 # Michael C. Saul # msaul [at] illinois.edu # MRSB orthology annotation load("~/Desktop/mrsb/orthology/OrthoDB/three_species_OrthoDB_parse_2015-04-07.Rdata") stopifnot(require("biomaRt")) # Setting biomaRt to generate annotations from Ensembl gene IDs (the row names) mm_maRt = useMart(biomart = "ENSEMB...
/mrsb_annotate_orthology_2015-07-10.R
no_license
msaul/three_species_orthology
R
false
false
4,706
r
# 2015-07-10 # Michael C. Saul # msaul [at] illinois.edu # MRSB orthology annotation load("~/Desktop/mrsb/orthology/OrthoDB/three_species_OrthoDB_parse_2015-04-07.Rdata") stopifnot(require("biomaRt")) # Setting biomaRt to generate annotations from Ensembl gene IDs (the row names) mm_maRt = useMart(biomart = "ENSEMB...
# --- # jupyter: # jupytext: # formats: r:light # text_representation: # extension: .r # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: R # language: R # name: ir # --- library(dplyr) library(fs) # + data_dir="/data" ...
/bioinformatics/setup/common_config.r
no_license
natkurilenko/2021-mic
R
false
false
1,007
r
# --- # jupyter: # jupytext: # formats: r:light # text_representation: # extension: .r # format_name: light # format_version: '1.5' # jupytext_version: 1.11.2 # kernelspec: # display_name: R # language: R # name: ir # --- library(dplyr) library(fs) # + data_dir="/data" ...
## Sets the value of the matrix, gets the value of the matrix, sets the value of the inverse, ## gets the value of the inverse makeCacheMatrix <- function(x = matrix()) { v <- NULL set <- function(y) { x <<-y v <<- NULL } get <- function() x setinverse <- function(inverse) v <...
/cachematrix.R
no_license
MaxDyer/ProgrammingAssignment2
R
false
false
939
r
## Sets the value of the matrix, gets the value of the matrix, sets the value of the inverse, ## gets the value of the inverse makeCacheMatrix <- function(x = matrix()) { v <- NULL set <- function(y) { x <<-y v <<- NULL } get <- function() x setinverse <- function(inverse) v <...
# $LastChangeDate: $ # $LastChangedBy: fgochez $ # $Rev: 13953 $ # # Author: fgochez # Tests importNmMod # Note that most of the functions that importNmMod makes use of have their own unit tests, so there is no need to # test this routine very thoroughly #######################################################...
/inst/unittests/runit.importNmMod.R
permissive
adamjdeacon/RNMImport
R
false
false
2,526
r
# $LastChangeDate: $ # $LastChangedBy: fgochez $ # $Rev: 13953 $ # # Author: fgochez # Tests importNmMod # Note that most of the functions that importNmMod makes use of have their own unit tests, so there is no need to # test this routine very thoroughly #######################################################...
testlist <- list(id = integer(0), x = c(-2.46295110678333e+255, 0, 7.2911220195564e-304, 2.12199579096527e-314, 2.11396577759614e-314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), y = numeric(0)) result <- do.call(ggforce:::enclose_points,testlist) str(result)
/ggforce/inst/testfiles/enclose_points/libFuzzer_enclose_points/enclose_points_valgrind_files/1610029862-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
257
r
testlist <- list(id = integer(0), x = c(-2.46295110678333e+255, 0, 7.2911220195564e-304, 2.12199579096527e-314, 2.11396577759614e-314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), y = numeric(0)) result <- do.call(ggforce:::enclose_points,testlist) str(result)
pow <- function(x,y) {result <- x^y print(paste(x,"raised to the power of",y,"is",result ))} pow(2,8)
/Exercise/power.R
no_license
avijandiran/My-shiny-dashboards
R
false
false
106
r
pow <- function(x,y) {result <- x^y print(paste(x,"raised to the power of",y,"is",result ))} pow(2,8)
## Export: inla.qsample ##! \name{qsample} ##! \alias{inla.qsample} ##! \alias{qsample} ##! ##! \title{Generate samples from a GMRF using the GMRFLib implementation} ##! ##! \description{This function generate samples from a GMRF using the GMRFLib implementation} ##! \usage{ ##! inla.qsample( ##! n = 1L, ##! ...
/R/qsample.R
no_license
inbo/INLA
R
false
false
9,388
r
## Export: inla.qsample ##! \name{qsample} ##! \alias{inla.qsample} ##! \alias{qsample} ##! ##! \title{Generate samples from a GMRF using the GMRFLib implementation} ##! ##! \description{This function generate samples from a GMRF using the GMRFLib implementation} ##! \usage{ ##! inla.qsample( ##! n = 1L, ##! ...
function(input, output, session) { # Delete all the files at the start of the session removeFiles(session) output$currentTime <- renderText({ # The below function runs every 1 and half min invalidateLater(1500 * 60, session) # Run the main function fetch_tweetdata(query = query, st...
/crypto_app/server.R
no_license
rajaramana/Crypto_Tweet
R
false
false
1,940
r
function(input, output, session) { # Delete all the files at the start of the session removeFiles(session) output$currentTime <- renderText({ # The below function runs every 1 and half min invalidateLater(1500 * 60, session) # Run the main function fetch_tweetdata(query = query, st...
# Load the readr, ggplot2, and dplyr packages library(readr) library(ggplot2) library(dplyr) # Read datasets/confirmed_cases_worldwide.csv into confirmed_cases_worldwide confirmed_cases_worldwide <- read_csv("datasets/confirmed_cases_worldwide.csv") # See the result confirmed_cases_worldwide # Draw a line...
/Covid-19.R
no_license
GargiPy/Visualizing-COVID-19
R
false
false
3,590
r
# Load the readr, ggplot2, and dplyr packages library(readr) library(ggplot2) library(dplyr) # Read datasets/confirmed_cases_worldwide.csv into confirmed_cases_worldwide confirmed_cases_worldwide <- read_csv("datasets/confirmed_cases_worldwide.csv") # See the result confirmed_cases_worldwide # Draw a line...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gamesManagement_objects.R \name{Player.name} \alias{Player.name} \title{Player.name Object} \usage{ Player.name(familyName = NULL, givenName = NULL) } \arguments{ \item{familyName}{The family name of this player} \item{givenName}{The given n...
/googlegamesManagementv1management.auto/man/Player.name.Rd
permissive
Phippsy/autoGoogleAPI
R
false
true
671
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gamesManagement_objects.R \name{Player.name} \alias{Player.name} \title{Player.name Object} \usage{ Player.name(familyName = NULL, givenName = NULL) } \arguments{ \item{familyName}{The family name of this player} \item{givenName}{The given n...
##################### ## P-plot function ## ##################### plot.colocal <- function(x, ...){ UseMethod("plot") } plot.colocal <- function(x = NULL, ...){ # get the membership for all observations in the data data.color.rgb <- x[["post.data"]]$membership if (length(unique(data.color.rgb)) >...
/R/plot.R
no_license
cran/colocalization
R
false
false
3,180
r
##################### ## P-plot function ## ##################### plot.colocal <- function(x, ...){ UseMethod("plot") } plot.colocal <- function(x = NULL, ...){ # get the membership for all observations in the data data.color.rgb <- x[["post.data"]]$membership if (length(unique(data.color.rgb)) >...
testlist <- list(lims = structure(0, .Dim = c(1L, 1L)), points = structure(1.08645307151063e-311, .Dim = c(1L, 1L))) result <- do.call(palm:::pbc_distances,testlist) str(result)
/palm/inst/testfiles/pbc_distances/libFuzzer_pbc_distances/pbc_distances_valgrind_files/1612988994-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
178
r
testlist <- list(lims = structure(0, .Dim = c(1L, 1L)), points = structure(1.08645307151063e-311, .Dim = c(1L, 1L))) result <- do.call(palm:::pbc_distances,testlist) str(result)
################################# ##### MAP FOR WHOLE OF JUNE ##### ################################# # Subset # Generate Map Background bbox <- c(103.6, 1.22, 104.05, 1.48) #bounding box of sg map map <- get_map(location = bbox, maptype = "toner-hybrid", source = "stamen") # Open PDF De...
/MispricedTrips/Code/LATEST_Mispriced_Trips.R
no_license
jasminetpm/grab-internship
R
false
false
7,259
r
################################# ##### MAP FOR WHOLE OF JUNE ##### ################################# # Subset # Generate Map Background bbox <- c(103.6, 1.22, 104.05, 1.48) #bounding box of sg map map <- get_map(location = bbox, maptype = "toner-hybrid", source = "stamen") # Open PDF De...
process_inherit_params <- function(topics) { # Currently no topological sort, so @inheritParams will only traverse # one-level - you can't inherit params that have been inherited from # another function (and you can't currently use multiple inherit tags) inherit_index <- get_values(topics, "inheritParams") ...
/R/inherit-params.R
no_license
eibanez/roxygen
R
false
false
2,097
r
process_inherit_params <- function(topics) { # Currently no topological sort, so @inheritParams will only traverse # one-level - you can't inherit params that have been inherited from # another function (and you can't currently use multiple inherit tags) inherit_index <- get_values(topics, "inheritParams") ...
##################################################################### 'Library vibe' ##################################################################### library(clusterProfiler) library(DOSE) library(enrichplot) library(ggplot2) library(forcats) library(enrichplot) rm(GO_enrichall) #salmon <- GO_enrichall #skyblue3...
/functions/cluster_profiler_graphs.R
no_license
alecstansell/code-masters
R
false
false
6,429
r
##################################################################### 'Library vibe' ##################################################################### library(clusterProfiler) library(DOSE) library(enrichplot) library(ggplot2) library(forcats) library(enrichplot) rm(GO_enrichall) #salmon <- GO_enrichall #skyblue3...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/expect-logical.R \name{logical-expectations} \alias{logical-expectations} \alias{expect_true} \alias{expect_false} \title{Expectation: is the object true/false?} \usage{ expect_true(object, info = NULL, label = NULL) expect_false(object, inf...
/man/logical-expectations.Rd
permissive
stufield/testthat
R
false
true
1,811
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/expect-logical.R \name{logical-expectations} \alias{logical-expectations} \alias{expect_true} \alias{expect_false} \title{Expectation: is the object true/false?} \usage{ expect_true(object, info = NULL, label = NULL) expect_false(object, inf...
################################################################## ## ## FUNCTION NAME: gibbs.cntry.cnst ## ## PLACE: ## ## IMPORTED: covariates matrices whocov from make.mortality.data() ## environments with globals, including countries and age groups ## ## DESCRIPTION: It calculates basic buildi...
/R/gibbs.cntry.R
no_license
cran/YourCast
R
false
false
22,878
r
################################################################## ## ## FUNCTION NAME: gibbs.cntry.cnst ## ## PLACE: ## ## IMPORTED: covariates matrices whocov from make.mortality.data() ## environments with globals, including countries and age groups ## ## DESCRIPTION: It calculates basic buildi...
\name{generateUnitTestFile} \alias{generateUnitTestFile} \title{ Generate Testthat Unit Test File } \description{ Generate one \bold{\code{testthat}} unit test file from an instrumented offensive programming object. One test file per function is created. It holds all the related tests, organized by evaluation mode. See...
/man/generateUnitTestFile.Rd
no_license
cran/wyz.code.testthat
R
false
false
2,043
rd
\name{generateUnitTestFile} \alias{generateUnitTestFile} \title{ Generate Testthat Unit Test File } \description{ Generate one \bold{\code{testthat}} unit test file from an instrumented offensive programming object. One test file per function is created. It holds all the related tests, organized by evaluation mode. See...
#Benchmarking for Paper setwd(dir = "/Users/clairegreen/Documents/PhD/TDP-43/TDP-43_Code/Results/GeneExpression/FoldChangeResults/") up_filter <- read.table("Filtered_up_genes.txt") up_filter <- up_filter$V1 setwd(dir = "/Users/clairegreen/Documents/PhD/TDP-43/TDP-43_Code/Results/GeneExpression/FoldChangeResults/") d...
/Benchmarking4Paper.R
no_license
zerland/PhD_Code
R
false
false
3,532
r
#Benchmarking for Paper setwd(dir = "/Users/clairegreen/Documents/PhD/TDP-43/TDP-43_Code/Results/GeneExpression/FoldChangeResults/") up_filter <- read.table("Filtered_up_genes.txt") up_filter <- up_filter$V1 setwd(dir = "/Users/clairegreen/Documents/PhD/TDP-43/TDP-43_Code/Results/GeneExpression/FoldChangeResults/") d...
ttest<- function(rma, alfa) { #wielokrotny test t p_val=alfa/nrow(rma) #0.05/iloœæ sond t_rma=rowttests(rma, tstatOnly = FALSE) mnt=t(t_rma[3]<p_val) #wybranie genów ró¿nicuj¹cych gen=which(mnt==TRUE) roz=mnt[1,gen] return(roz) }
/ttest.R
no_license
BIOgr4/projekt_wsp
R
false
false
257
r
ttest<- function(rma, alfa) { #wielokrotny test t p_val=alfa/nrow(rma) #0.05/iloœæ sond t_rma=rowttests(rma, tstatOnly = FALSE) mnt=t(t_rma[3]<p_val) #wybranie genów ró¿nicuj¹cych gen=which(mnt==TRUE) roz=mnt[1,gen] return(roz) }
# Print title cat("\nTesting des_duplicates()\n") # Get data data(psyo_rounds2) tracks <- psyo_rounds2 # Calculations descriptive <- des_duplicates(tracks, "time") # Check results if (NROW(descriptive) != 9) { stop("Wrong number of observations") } if (NCOL(descriptive) != 2) { stop("Wrong number of va...
/tests/testthat/test_des_duplicates.R
no_license
cran/psyosphere
R
false
false
420
r
# Print title cat("\nTesting des_duplicates()\n") # Get data data(psyo_rounds2) tracks <- psyo_rounds2 # Calculations descriptive <- des_duplicates(tracks, "time") # Check results if (NROW(descriptive) != 9) { stop("Wrong number of observations") } if (NCOL(descriptive) != 2) { stop("Wrong number of va...
library(FlowshopSolveR) library(tidyverse) library(here) library(wrapr) library(irace) library(furrr) plan(sequential) # NCORES <- 48 # options(parallelly.debug = TRUE) # plan(multisession) # plan(remote, workers = rep("linode2", NCORES), persistent = TRUE) all_problems <- all_problems_df() %>% filter( no_jobs ...
/reports/setup/setup.R
permissive
lucasmpavelski/Adaptive-IG
R
false
false
2,265
r
library(FlowshopSolveR) library(tidyverse) library(here) library(wrapr) library(irace) library(furrr) plan(sequential) # NCORES <- 48 # options(parallelly.debug = TRUE) # plan(multisession) # plan(remote, workers = rep("linode2", NCORES), persistent = TRUE) all_problems <- all_problems_df() %>% filter( no_jobs ...