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
library(parallel) # set vars and get functions setwd('~/github/ohi-webapps') source('create_init.R') source('create_functions.R') source('ohi-travis-functions.R') log = file.path(dir_github, 'ohi-webapps/tmp/create_parallels_log.txt') results = file.path(dir_github, 'ohi-webapps/tmp/create_parallels_results.Rdata...
/create_parallels.R
no_license
OHI-Science/ohi-webapps
R
false
false
5,556
r
library(parallel) # set vars and get functions setwd('~/github/ohi-webapps') source('create_init.R') source('create_functions.R') source('ohi-travis-functions.R') log = file.path(dir_github, 'ohi-webapps/tmp/create_parallels_log.txt') results = file.path(dir_github, 'ohi-webapps/tmp/create_parallels_results.Rdata...
constructor("SwapCache", function() { this <- extend(RObject(), "SwapCache", .last.swap.update = as.POSIXlt("1970/01/01"), .live.swap.tenors = c(2:10, 20, 30), .live.swap.string.tenors = c("2y","3y","4y","5y","6y","7y","8y","9y","10y","20y","30y"), .listeners = list() ) failU...
/R/src/Live/R/SwapCache.R
no_license
rsheftel/ratel
R
false
false
2,048
r
constructor("SwapCache", function() { this <- extend(RObject(), "SwapCache", .last.swap.update = as.POSIXlt("1970/01/01"), .live.swap.tenors = c(2:10, 20, 30), .live.swap.string.tenors = c("2y","3y","4y","5y","6y","7y","8y","9y","10y","20y","30y"), .listeners = list() ) failU...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summ.R \name{summ} \alias{summ} \title{summ} \usage{ summ(vec) } \arguments{ \item{vec}{numeric vector} } \value{ None } \description{ no details } \examples{ #building } \author{ Pablo Carhuapoma Ramos }
/man/summ.Rd
no_license
pabcarh/ilcym
R
false
true
285
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summ.R \name{summ} \alias{summ} \title{summ} \usage{ summ(vec) } \arguments{ \item{vec}{numeric vector} } \value{ None } \description{ no details } \examples{ #building } \author{ Pablo Carhuapoma Ramos }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{setOpencl} \alias{setOpencl} \title{Enables or disables OpenCL computation.} \usage{ setOpencl(deviceType) } \arguments{ \item{deviceType}{The type of OpenCL device, including three options: \'none\', \'cpu\' and \'gpu\'} } \val...
/man/setOpencl.Rd
permissive
csclab/RMut
R
false
true
921
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{setOpencl} \alias{setOpencl} \title{Enables or disables OpenCL computation.} \usage{ setOpencl(deviceType) } \arguments{ \item{deviceType}{The type of OpenCL device, including three options: \'none\', \'cpu\' and \'gpu\'} } \val...
#' Multiplicative component description of origin-destination migration flow tables #' #' Multiplicative component descriptions of *n*-dimension flow tables based on total reference coding system. #' #' @param m \code{matrix} or \code{array} of migration flows #' #' @return \code{matrix} or \code{array} of multi...
/R/multi_comp.R
no_license
cran/migest
R
false
false
3,702
r
#' Multiplicative component description of origin-destination migration flow tables #' #' Multiplicative component descriptions of *n*-dimension flow tables based on total reference coding system. #' #' @param m \code{matrix} or \code{array} of migration flows #' #' @return \code{matrix} or \code{array} of multi...
# # pickoption.R # # $Revision: 1.7 $ $Date: 2019/06/30 07:49:10 $ # pickoption <- function(what="option", key, keymap, ..., exact=FALSE, list.on.err=TRUE, die=TRUE, multi=FALSE, allow.all=TRUE) { keyname <- short.deparse(substitute(key)) if(!is.character(key)) ...
/R/pickoption.R
no_license
rubak/spatstat
R
false
false
1,342
r
# # pickoption.R # # $Revision: 1.7 $ $Date: 2019/06/30 07:49:10 $ # pickoption <- function(what="option", key, keymap, ..., exact=FALSE, list.on.err=TRUE, die=TRUE, multi=FALSE, allow.all=TRUE) { keyname <- short.deparse(substitute(key)) if(!is.character(key)) ...
#' @title Title #' #' @description Description #' #' @param x A number. #' @param y A number. #' @return return value here. #' @details #' Additional details here #' @examples #' example function call here #' @export initialize_evonet_misc <- function(dat) { #Description: # Miscellaneous internal bookkeeping for m...
/R/initialize_evonet_misc.R
no_license
EvoNetHIV/RoleSPVL
R
false
false
3,902
r
#' @title Title #' #' @description Description #' #' @param x A number. #' @param y A number. #' @return return value here. #' @details #' Additional details here #' @examples #' example function call here #' @export initialize_evonet_misc <- function(dat) { #Description: # Miscellaneous internal bookkeeping for m...
# k-means plotting #' fortify.kmeans #' #' Fortify a kmeans model with its data #' #' Prepares a kmeans object to be plotted using \code{\link{cmdscale}} to compute the projected x/y coordinates. If \code{data} is not provided, then just the center points are calculated. #' #' @aliases fortify.kmeans #' @...
/useful/R/kmeansPlotting.r
no_license
ingted/R-Examples
R
false
false
3,471
r
# k-means plotting #' fortify.kmeans #' #' Fortify a kmeans model with its data #' #' Prepares a kmeans object to be plotted using \code{\link{cmdscale}} to compute the projected x/y coordinates. If \code{data} is not provided, then just the center points are calculated. #' #' @aliases fortify.kmeans #' @...
library(tidyverse) library(sf) library(leaflet) library(htmltools) library(tidytuesdayR) #------------------ # # Import data # #------------------ tt_data <- tt_load("2020-05-12") volcanos_raw <- tt_data$volcano volcanos <- volcanos_raw %>% select(volcano_number, volcano_name, primary_volcano_typ...
/repos_and_volcanoes.R
no_license
tts/reposundervolcanoes
R
false
false
7,338
r
library(tidyverse) library(sf) library(leaflet) library(htmltools) library(tidytuesdayR) #------------------ # # Import data # #------------------ tt_data <- tt_load("2020-05-12") volcanos_raw <- tt_data$volcano volcanos <- volcanos_raw %>% select(volcano_number, volcano_name, primary_volcano_typ...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/signs.R \name{overlaps_sign} \alias{overlaps_sign} \title{Get the sign of overlapping paths.} \usage{ overlaps_sign(overlaps) } \arguments{ \item{overlaps}{Data frame representing path overlaps, typically generated ...
/man/overlaps_sign.Rd
no_license
digideskio/admixturegraph
R
false
false
425
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/signs.R \name{overlaps_sign} \alias{overlaps_sign} \title{Get the sign of overlapping paths.} \usage{ overlaps_sign(overlaps) } \arguments{ \item{overlaps}{Data frame representing path overlaps, typically generated ...
###http://www.coppelia.io/gist-dftojson/ #install.packages("rjson") library(rjson) #install.packages("stringr") library(stringr) dfToJSON<-function(df, mode='vector'){ colToList<-function(x, y){ col.json<-list() #Build up a list of coordinates for (i in 1:length(x)){ ni<-lis...
/R/functions.R
no_license
andrewpatt24/General-work
R
false
false
2,448
r
###http://www.coppelia.io/gist-dftojson/ #install.packages("rjson") library(rjson) #install.packages("stringr") library(stringr) dfToJSON<-function(df, mode='vector'){ colToList<-function(x, y){ col.json<-list() #Build up a list of coordinates for (i in 1:length(x)){ ni<-lis...
## File Name: tam_anticomb2.R ## File Version: 0.01 tam_anticomb2 <- function(H) { D0 <- round( sqrt( 2*H + .25 ) - .5 ) return(D0) }
/R/tam_anticomb2.R
no_license
cran/TAM
R
false
false
151
r
## File Name: tam_anticomb2.R ## File Version: 0.01 tam_anticomb2 <- function(H) { D0 <- round( sqrt( 2*H + .25 ) - .5 ) return(D0) }
# Analysis of Data For Essay # "Geographic Distribution of Ability" library(reldist) library(haven) library(RSQLite) library(data.table) library(gdata) library(Hmisc) library(boot) library(XML) library(reshape2) library(ggplot2) library(scales) library(viridis) library(ggrepel) # ---------------- Load data ---------...
/AbilityCostOfLivingAdj.r
no_license
whelanh/WorldValueSurveyRCode
R
false
false
13,127
r
# Analysis of Data For Essay # "Geographic Distribution of Ability" library(reldist) library(haven) library(RSQLite) library(data.table) library(gdata) library(Hmisc) library(boot) library(XML) library(reshape2) library(ggplot2) library(scales) library(viridis) library(ggrepel) # ---------------- Load data ---------...
#### Power for exp 1 #### # This will use pilot data from my 4th year project # and data from Clarke and Hunt (2016) to look at # what the data may look like. # This script will resample from both data sets N # number of times to look at how the chance of finding # a difference is effected by N #### Library ###...
/power/Prob_match/1_get_power.R
no_license
warren-james/Breaking_symmetry
R
false
false
13,779
r
#### Power for exp 1 #### # This will use pilot data from my 4th year project # and data from Clarke and Hunt (2016) to look at # what the data may look like. # This script will resample from both data sets N # number of times to look at how the chance of finding # a difference is effected by N #### Library ###...
library(tidyverse) library(lubridate) library(edwr) dir_raw <- "data/raw" # run MBO query # * Patients - by Visit Type # - Location: HH Clinics;HC Childrens # - Visit Type: Bedded Outpatient;Day Surgery;Inpatient;Observation patients <- read_data(dir_raw, "patients", FALSE) %>% as.patients() %>% ...
/src/01_identify-patients.R
no_license
bgulbis/pedi_periop_meds
R
false
false
1,794
r
library(tidyverse) library(lubridate) library(edwr) dir_raw <- "data/raw" # run MBO query # * Patients - by Visit Type # - Location: HH Clinics;HC Childrens # - Visit Type: Bedded Outpatient;Day Surgery;Inpatient;Observation patients <- read_data(dir_raw, "patients", FALSE) %>% as.patients() %>% ...
#' @name genre #' @author Bruna Wundervald, \email{brunadaviesw@gmail.com}. #' @export #' @title An artist's musical genre(s) #' @description Gives information about the genre (ou multiple genres) #' of an artist/band. #' @param name The name of the artist/band. #' @param message Should the function print something if...
/R/genre.R
no_license
r-music/vagalumeR
R
false
false
1,014
r
#' @name genre #' @author Bruna Wundervald, \email{brunadaviesw@gmail.com}. #' @export #' @title An artist's musical genre(s) #' @description Gives information about the genre (ou multiple genres) #' of an artist/band. #' @param name The name of the artist/band. #' @param message Should the function print something if...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536114028e+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/1615833013-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.53818252170339e+295, 1.22810536114028e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L))) result <- do.call(CNull:::communities_individual_based_sampling_beta,testlist) str(result)
#prepare data setwd("~/Documents/Coursera Data Science JH/C4/W1/ExData_Plotting1") library(lubridate) path<-getwd() url<-"https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(url,file.path(path,"exdata_data_household_power_consumption.zip")) unzip(zipfile = "exdata_dat...
/plot 2.R
no_license
prescottsmith/ExData_Plotting1
R
false
false
1,081
r
#prepare data setwd("~/Documents/Coursera Data Science JH/C4/W1/ExData_Plotting1") library(lubridate) path<-getwd() url<-"https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(url,file.path(path,"exdata_data_household_power_consumption.zip")) unzip(zipfile = "exdata_dat...
\name{postpr} \alias{postpr} \title{ Estimating posterior model probabilities } \description{ Model selection with Approximate Bayesian Computation (ABC). } \usage{ postpr(target, index, sumstat, tol, subset = NULL, method, corr=TRUE, kernel="epanechnikov", numnet = 10, sizenet = 5, lambda = c(0.0001,0.001,0.01), tr...
/abc/man/postpr.Rd
no_license
hongqin/demo
R
false
false
6,837
rd
\name{postpr} \alias{postpr} \title{ Estimating posterior model probabilities } \description{ Model selection with Approximate Bayesian Computation (ABC). } \usage{ postpr(target, index, sumstat, tol, subset = NULL, method, corr=TRUE, kernel="epanechnikov", numnet = 10, sizenet = 5, lambda = c(0.0001,0.001,0.01), tr...
# ----------------------------------------------------------------------- # --- Blogdown R-Ladies Amsterdam webinar # --- 16 April 2020 # --- Aurore Paligot: presenter, Janine Khuc: host & moderator # --- Based on https://bookdown.org/yihui/blogdown/ # -------------------------------------------------------------------...
/rladiesamsterdam_blogdown_handout_COMPLETE.R
permissive
aurorepaligot/rladiesamsterdam_blogdown_handout
R
false
false
10,076
r
# ----------------------------------------------------------------------- # --- Blogdown R-Ladies Amsterdam webinar # --- 16 April 2020 # --- Aurore Paligot: presenter, Janine Khuc: host & moderator # --- Based on https://bookdown.org/yihui/blogdown/ # -------------------------------------------------------------------...
#' Define the parameters associated with each multi-block component #' method of the literature. #' #' @inheritParams rgcca #' @return \item{blocks}{List of blocks.} #' @return \item{scheme}{Character string or a function giving the scheme #' function used for covariance maximization.} #' @return \item{penalty}{Vector ...
/R/select_analysis.R
no_license
rgcca-factory/RGCCA
R
false
false
13,975
r
#' Define the parameters associated with each multi-block component #' method of the literature. #' #' @inheritParams rgcca #' @return \item{blocks}{List of blocks.} #' @return \item{scheme}{Character string or a function giving the scheme #' function used for covariance maximization.} #' @return \item{penalty}{Vector ...
## Put comments here that give an overall description of what your -## functions do +## These two function create, store and recall a matrix and its inverse in/from cache -## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) ## makeCacheMatrix creates cust...
/cachematrix.R
no_license
RASHID2016/ProgrammingAssignment2
R
false
false
2,436
r
## Put comments here that give an overall description of what your -## functions do +## These two function create, store and recall a matrix and its inverse in/from cache -## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) ## makeCacheMatrix creates cust...
rm(list = ls()) library(tidyverse) library(WDI) #import GDP data from worldbank ##GDP at PPP wdi_gdp<-WDI(country = "all",indicator = "NY.GDP.MKTP.PP.KD",start = 1970,end = 2019,extra=TRUE,language = "en") %>% select(iso3c, country, year, NY.GDP.MKTP.PP.KD) %>% filter(!is.na(iso3c)) wdi_gdp$gdp_ppp<-wdi_gdp$NY.GD...
/R/Data preparation/import_WDI_data.R
no_license
mcc-apsis/AR6-Emissions-trends-and-drivers
R
false
false
2,055
r
rm(list = ls()) library(tidyverse) library(WDI) #import GDP data from worldbank ##GDP at PPP wdi_gdp<-WDI(country = "all",indicator = "NY.GDP.MKTP.PP.KD",start = 1970,end = 2019,extra=TRUE,language = "en") %>% select(iso3c, country, year, NY.GDP.MKTP.PP.KD) %>% filter(!is.na(iso3c)) wdi_gdp$gdp_ppp<-wdi_gdp$NY.GD...
# set the library with the packages we use library(ggplot2) library(tidyverse) require(cowplot) setwd("C:/Users/snara016/OneDrive - Ascension/Documents/RWork/projects/MITxR") #load in the data bihar_data<-read_csv("data/Bihar_sample_data.csv") #have a look print(bihar_data) #keep only females bihar_adult_females <...
/projects/MITxR/code/distributions.R
no_license
senthil-lab/RWork
R
false
false
5,364
r
# set the library with the packages we use library(ggplot2) library(tidyverse) require(cowplot) setwd("C:/Users/snara016/OneDrive - Ascension/Documents/RWork/projects/MITxR") #load in the data bihar_data<-read_csv("data/Bihar_sample_data.csv") #have a look print(bihar_data) #keep only females bihar_adult_females <...
data = read.csv(file = "biology.csv", sep = ";", dec = ",") data [, "treatment"] = ifelse(data$score > 0, 1, 0) ordinary1PositiveScore = subset(data, data$profile_1 == 1 & data$treatment == 1) ordinary1NegativeScore = subset(data, data$profile_1 == 1 & data$treatment == 0) ordinary2PositiveScore = subset(data, data$p...
/treated_harshly/biology/treat.R
no_license
thiagoprocaci/tracking-learning-profiles
R
false
false
677
r
data = read.csv(file = "biology.csv", sep = ";", dec = ",") data [, "treatment"] = ifelse(data$score > 0, 1, 0) ordinary1PositiveScore = subset(data, data$profile_1 == 1 & data$treatment == 1) ordinary1NegativeScore = subset(data, data$profile_1 == 1 & data$treatment == 0) ordinary2PositiveScore = subset(data, data$p...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/general.R \name{interleave} \alias{interleave} \title{Interleaves two vectors} \usage{ interleave(a, b) } \arguments{ \item{a}{vector 1} \item{b}{vector 2} } \value{ A vector } \description{ Interleaves two vectors. Vectors may be of unequal...
/man/interleave.Rd
no_license
mdchambers/dataRutil
R
false
true
381
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/general.R \name{interleave} \alias{interleave} \title{Interleaves two vectors} \usage{ interleave(a, b) } \arguments{ \item{a}{vector 1} \item{b}{vector 2} } \value{ A vector } \description{ Interleaves two vectors. Vectors may be of unequal...
##################################################################################### # Function makeParmFile --> now calculate the parameters which require conversion ##################################################################################### #################convert matrices of parameters into data frames#...
/paper/code/makeParmFile.R
permissive
mishra-lab/covid-GTA-surge-planning
R
false
false
5,054
r
##################################################################################### # Function makeParmFile --> now calculate the parameters which require conversion ##################################################################################### #################convert matrices of parameters into data frames#...
\name{circonus.fetch_histogram} \alias{circonus.fetch_histogram} %- Also NEED an '\alias' for EACH other topic documented here. \title{pull histogram data from Circonus} \description{this method will pull data for a specific metric over the specified date range and granularity} \usage{ circonus.fetch_histogram(obj, che...
/circonus/man/circonus.fetch_histogram.Rd
no_license
circonus-labs/R-circonus
R
false
false
1,500
rd
\name{circonus.fetch_histogram} \alias{circonus.fetch_histogram} %- Also NEED an '\alias' for EACH other topic documented here. \title{pull histogram data from Circonus} \description{this method will pull data for a specific metric over the specified date range and granularity} \usage{ circonus.fetch_histogram(obj, che...
context("regr_ranger") test_that("regr_ranger", { requirePackagesOrSkip("ranger", default.method = "load") parset.list = list( list(), list(num.trees = 100), list(num.trees = 250, mtry = 4), list(num.trees = 500, min.node.size = 2) ) old.predicts.list = list() for (i in 1:length(parset.list...
/tests/testthat/test_regr_ranger.R
no_license
Alven8816/mlr
R
false
false
759
r
context("regr_ranger") test_that("regr_ranger", { requirePackagesOrSkip("ranger", default.method = "load") parset.list = list( list(), list(num.trees = 100), list(num.trees = 250, mtry = 4), list(num.trees = 500, min.node.size = 2) ) old.predicts.list = list() for (i in 1:length(parset.list...
################################################ ## WMTSA series functionality ## ## Functions: ## ## create.signalSeries ## make.signal ## ################################################ ### # create.signalSeries ## "create.signalSeries" <- function(x=NULL, position=list(from=1,by=1,units=character()), fro...
/R/wav_sig.R
no_license
wconstan/wmtsa
R
false
false
8,201
r
################################################ ## WMTSA series functionality ## ## Functions: ## ## create.signalSeries ## make.signal ## ################################################ ### # create.signalSeries ## "create.signalSeries" <- function(x=NULL, position=list(from=1,by=1,units=character()), fro...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rsaTools.r \name{bigzToString} \alias{bigzToString} \title{Convert (some) big integers to strings} \usage{ bigzToString(n) } \arguments{ \item{n}{A `bigz` integer, whose raw representation must not contain 00's} } \value{ A character string }...
/cryptoCTB/man/bigzToString.Rd
no_license
chrisbetsill/codes-and-encryption
R
false
true
713
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rsaTools.r \name{bigzToString} \alias{bigzToString} \title{Convert (some) big integers to strings} \usage{ bigzToString(n) } \arguments{ \item{n}{A `bigz` integer, whose raw representation must not contain 00's} } \value{ A character string }...
################################################################################ # PROJECT: Harvard NFL Players Health Study # PURPOSE: Import raw data from Q1 survey and turn into compatible data # DIR: "~/Desktop/NPHS Analysis" # INPUTS: Fake data created in Q1 survey ("q1_test_data.csv") # Can be rep...
/q1_processing.R
no_license
LiamMcCafferty/FPHS
R
false
false
12,240
r
################################################################################ # PROJECT: Harvard NFL Players Health Study # PURPOSE: Import raw data from Q1 survey and turn into compatible data # DIR: "~/Desktop/NPHS Analysis" # INPUTS: Fake data created in Q1 survey ("q1_test_data.csv") # Can be rep...
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 3.59204853621924e-313, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_row...
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613102678-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
343
r
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 3.59204853621924e-313, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_row...
test_that("ff_scoring returns a tibble", { local_mock_api() dlf <- mfl_connect(2019, 37920) dlf_scoring <- ff_scoring(dlf) wade <- mfl_connect(2023, 65804) wade_scoring <- ff_scoring(wade) jml_conn <- sleeper_connect(league_id = "522458773317046272", season = 2020) jml_scoring <- ff_scoring(jml_conn) ...
/tests/testthat/test-ff_scoring.R
permissive
jfontestad/ffscrapr
R
false
false
1,193
r
test_that("ff_scoring returns a tibble", { local_mock_api() dlf <- mfl_connect(2019, 37920) dlf_scoring <- ff_scoring(dlf) wade <- mfl_connect(2023, 65804) wade_scoring <- ff_scoring(wade) jml_conn <- sleeper_connect(league_id = "522458773317046272", season = 2020) jml_scoring <- ff_scoring(jml_conn) ...
# load data from Cleaning data.R setwd('E:\\Dropbox\\coursera\\Exploratory Data Analysis') load('./data/Project1.RData') # Plot 3 # open device if(!file.exists('Project_1')) dir.create('Project_1') png(filename = './Project_1/plot3.png', width = 480, height = 480, units='px') # plot figure Sys.setlocale(category = "LC...
/plot3.R
no_license
Rebecca0617/Exploratory-Data-Analysis
R
false
false
703
r
# load data from Cleaning data.R setwd('E:\\Dropbox\\coursera\\Exploratory Data Analysis') load('./data/Project1.RData') # Plot 3 # open device if(!file.exists('Project_1')) dir.create('Project_1') png(filename = './Project_1/plot3.png', width = 480, height = 480, units='px') # plot figure Sys.setlocale(category = "LC...
library(tidyverse) library(toolbox) # reference --------------------------------------------------------------- met.thresh.df <- data.table::fread( "H:/Projects/Chessie_BIBI/report/FINAL_May25_2017/2017_Data/Metric_Thresholds/metric_thresholds.csv" ) %>% toolbox::prep_df() %>% filter( taxonomic_resolut...
/dev/bio_fam_funs_dev.R
no_license
InterstateCommissionPotomacRiverBasin/bibi2.0
R
false
false
13,495
r
library(tidyverse) library(toolbox) # reference --------------------------------------------------------------- met.thresh.df <- data.table::fread( "H:/Projects/Chessie_BIBI/report/FINAL_May25_2017/2017_Data/Metric_Thresholds/metric_thresholds.csv" ) %>% toolbox::prep_df() %>% filter( taxonomic_resolut...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_albert.R \docType{data} \name{comic_characters} \alias{comic_characters} \title{Comic Books Are Still Made By Men, For Men And About Men} \format{A data frame with 23272 rows representing characters and 16 variables: \describe{ \item{p...
/man/comic_characters.Rd
no_license
Elaineyex/fivethirtyeight
R
false
true
2,302
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_albert.R \docType{data} \name{comic_characters} \alias{comic_characters} \title{Comic Books Are Still Made By Men, For Men And About Men} \format{A data frame with 23272 rows representing characters and 16 variables: \describe{ \item{p...
# ASMS Short Course R::ggplot2 # Jeff Jones library(tidyverse) library(ggplot2) # set the theme to black-white (remove grey plot area) theme_set(theme_bw()) # read in data d_trc <- "./data/rds/samples_1-8_heavy-light_traces.rds" %>% read_rds() # Objectives # - create a point & line plot .. TotalArea ~ Repli...
/exercises/ggplot2/03_facet-n-color.R
no_license
ZenBrayn/asms-2021-r-shortcourse
R
false
false
619
r
# ASMS Short Course R::ggplot2 # Jeff Jones library(tidyverse) library(ggplot2) # set the theme to black-white (remove grey plot area) theme_set(theme_bw()) # read in data d_trc <- "./data/rds/samples_1-8_heavy-light_traces.rds" %>% read_rds() # Objectives # - create a point & line plot .. TotalArea ~ Repli...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/misc_func.R \name{user_count} \alias{user_count} \title{user_count} \usage{ user_count(question) } \arguments{ \item{question}{question} } \description{ asks user for count }
/man/user_count.Rd
no_license
daniel1noble/metaDigitise
R
false
true
253
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/misc_func.R \name{user_count} \alias{user_count} \title{user_count} \usage{ user_count(question) } \arguments{ \item{question}{question} } \description{ asks user for count }
\name{modEvAmethods} \alias{modEvAmethods} \title{ Methods implemented in modEvA functions } \description{ This function allows retrieving the methods available for some of the functions in modEvA, such as \code{\link{threshMeasures}}, \code{\link{optiThresh}}, \code{\link{multModEv}}, \code{\link{getThreshold}} and \c...
/man/modEvAmethods.Rd
no_license
cran/modEvA
R
false
false
963
rd
\name{modEvAmethods} \alias{modEvAmethods} \title{ Methods implemented in modEvA functions } \description{ This function allows retrieving the methods available for some of the functions in modEvA, such as \code{\link{threshMeasures}}, \code{\link{optiThresh}}, \code{\link{multModEv}}, \code{\link{getThreshold}} and \c...
# define neuronlistfh, that looks like a regular in memory neuronlist # but is actually backed by an on disk filehash structure #' neuronlistfh - List of neurons loaded on demand from disk or remote website #' #' @description \code{neuronlistfh} objects consist of a list of neuron objects #' along with an optional a...
/R/neuronlistfh.R
no_license
natverse/nat
R
false
false
28,673
r
# define neuronlistfh, that looks like a regular in memory neuronlist # but is actually backed by an on disk filehash structure #' neuronlistfh - List of neurons loaded on demand from disk or remote website #' #' @description \code{neuronlistfh} objects consist of a list of neuron objects #' along with an optional a...
## I have forked the designated remote GitHub repository and ## subsequently cloned it locally in my home directory without ## renaming it, or the files within it You can see my edit at: ## https://github.com/javierrodrigl/ProgrammingAssignment2.git ## I edited the "cachematrix.R" file in Rstudio. ## In the "makeCa...
/cachematrix.R
no_license
javierrodrigl/ProgrammingAssignment2
R
false
false
1,641
r
## I have forked the designated remote GitHub repository and ## subsequently cloned it locally in my home directory without ## renaming it, or the files within it You can see my edit at: ## https://github.com/javierrodrigl/ProgrammingAssignment2.git ## I edited the "cachematrix.R" file in Rstudio. ## In the "makeCa...
% Generated by roxygen2 (4.0.2): do not edit by hand \name{rbtc.plot.trades} \alias{rbtc.plot.trades} \title{Plot trades data} \usage{ rbtc.plot.trades(x, ..., verbose = getOption("Rbitcoin.verbose", 0)) } \arguments{ \item{x}{list, a result from \code{market.api.process(action="trades")}.} \item{verbose}{integer. Rbi...
/man/rbtc.plot.trades.Rd
permissive
micahstubbs/Rbitcoin
R
false
false
784
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \name{rbtc.plot.trades} \alias{rbtc.plot.trades} \title{Plot trades data} \usage{ rbtc.plot.trades(x, ..., verbose = getOption("Rbitcoin.verbose", 0)) } \arguments{ \item{x}{list, a result from \code{market.api.process(action="trades")}.} \item{verbose}{integer. Rbi...
#' @title The adaptive procedure for global FDR control #' @description The adaptive procedure for global FDR control based on the output from IMIX models, this can be directly performed by IMIX function, however, if you are interested in other mixture models, alpha level or combinations of components, this function wo...
/R/FDR_control_adaptive.R
no_license
yanch86/IMIX
R
false
false
4,955
r
#' @title The adaptive procedure for global FDR control #' @description The adaptive procedure for global FDR control based on the output from IMIX models, this can be directly performed by IMIX function, however, if you are interested in other mixture models, alpha level or combinations of components, this function wo...
# Dataset: https://www.cs.toronto.edu/~kriz/cifar.html library(pracma) # For dot() # Working Directory Changed Relevant to Current User setwd('/Users/Sbishop/Desktop/GitHub/R/appliedMachineLearning/week04') # Global Variables # ================================================== # Category List for Loop / Indexing...
/machineLearningAlgorithms/principleCoordinateAnalysis.R
no_license
ProgrammingBishop/rMachineLearning
R
false
false
11,112
r
# Dataset: https://www.cs.toronto.edu/~kriz/cifar.html library(pracma) # For dot() # Working Directory Changed Relevant to Current User setwd('/Users/Sbishop/Desktop/GitHub/R/appliedMachineLearning/week04') # Global Variables # ================================================== # Category List for Loop / Indexing...
if(!isGeneric("covMatrix")) { setGeneric(name = "covMatrix", def = function(object, X, noise.var=NULL) standardGeneric("covMatrix") ) } if(!isGeneric("covMat1Mat2")) { setGeneric(name = "covMat1Mat2", def = function(object, X1, X2, nugget.flag=FALSE) standardGeneric("covMa...
/R/allGenerics.R
no_license
DiceKrigingClub/DiceKriging
R
false
false
1,892
r
if(!isGeneric("covMatrix")) { setGeneric(name = "covMatrix", def = function(object, X, noise.var=NULL) standardGeneric("covMatrix") ) } if(!isGeneric("covMat1Mat2")) { setGeneric(name = "covMat1Mat2", def = function(object, X1, X2, nugget.flag=FALSE) standardGeneric("covMa...
########################################################################################### # load packages library(rethinking) library(ggplot2) library(grid) library(gridExtra) library(cowplot) source("Code/Plot/plot_aft_calculate_preds.R") # adjust plot parameters for prediction plot shade_alpha = 0.1 # transparenc...
/Code/plot_table_code/plot_aft_support_giving_preds.R
permissive
kotrinak/sociality
R
false
false
3,454
r
########################################################################################### # load packages library(rethinking) library(ggplot2) library(grid) library(gridExtra) library(cowplot) source("Code/Plot/plot_aft_calculate_preds.R") # adjust plot parameters for prediction plot shade_alpha = 0.1 # transparenc...
outputdir <- "~/projects/hitchip-benchmarking13/outputdir/" genus.hitchip <- get.qiime.matrix(outputdir)
/HITChip2QIIME/analyze.output.R
no_license
openresearchlabs/devel
R
false
false
107
r
outputdir <- "~/projects/hitchip-benchmarking13/outputdir/" genus.hitchip <- get.qiime.matrix(outputdir)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ExpressionAnalysis.R \name{getRTNormFactors} \alias{getRTNormFactors} \title{Get retentiontime base normalization factors} \usage{ getRTNormFactors(eset, minFeaturesPerBin = 100) } \arguments{ \item{eset}{ExpressionSet} \item{minFeaturesPerB...
/man/getRTNormFactors.Rd
no_license
cran/SafeQuant
R
false
true
875
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ExpressionAnalysis.R \name{getRTNormFactors} \alias{getRTNormFactors} \title{Get retentiontime base normalization factors} \usage{ getRTNormFactors(eset, minFeaturesPerBin = 100) } \arguments{ \item{eset}{ExpressionSet} \item{minFeaturesPerB...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_hist_facet.R \name{plot_hist_facet} \alias{plot_hist_facet} \title{Faceted ggplot histograms} \usage{ plot_hist_facet(data, bins = 10, ncol = 5, fct_reorder = FALSE, fct_rev = FALSE, fill = "#18BC9C", color = "white", scale = "free")...
/man/plot_hist_facet.Rd
permissive
johnaclouse/viz
R
false
true
859
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_hist_facet.R \name{plot_hist_facet} \alias{plot_hist_facet} \title{Faceted ggplot histograms} \usage{ plot_hist_facet(data, bins = 10, ncol = 5, fct_reorder = FALSE, fct_rev = FALSE, fill = "#18BC9C", color = "white", scale = "free")...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/route53_operations.R \name{route53_list_resource_record_sets} \alias{route53_list_resource_record_sets} \title{Lists the resource record sets in a specified hosted zone} \usage{ route53_list_resource_record_sets(HostedZoneId, StartRecordName,...
/cran/paws.networking/man/route53_list_resource_record_sets.Rd
permissive
sanchezvivi/paws
R
false
true
5,673
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/route53_operations.R \name{route53_list_resource_record_sets} \alias{route53_list_resource_record_sets} \title{Lists the resource record sets in a specified hosted zone} \usage{ route53_list_resource_record_sets(HostedZoneId, StartRecordName,...
setup({ sc <- testthat_spark_connection() text_tbl <- testthat_tbl("test_text") # These lines should set a pipeline that will ultimately create the columns needed for testing the annotator assembler <- nlp_document_assembler(sc, input_col = "text", output_col = "document") sentdetect <- nlp_sentence_detector...
/tests/testthat/testthat-ner_chunker.R
permissive
r-spark/sparknlp
R
false
false
2,383
r
setup({ sc <- testthat_spark_connection() text_tbl <- testthat_tbl("test_text") # These lines should set a pipeline that will ultimately create the columns needed for testing the annotator assembler <- nlp_document_assembler(sc, input_col = "text", output_col = "document") sentdetect <- nlp_sentence_detector...
#Algorithm that generates predictions based on the global average only. globalAverage <- function(data) { average <- sum(data@data) / numRatings(data) average <- matrix(1, nrow = nrow(data), ncol = ncol(data)) * average new("algAverageClass", alg = "globalAverage", data = data, average = av...
/R/ALG_average.R
no_license
andland/rrecsys
R
false
false
2,025
r
#Algorithm that generates predictions based on the global average only. globalAverage <- function(data) { average <- sum(data@data) / numRatings(data) average <- matrix(1, nrow = nrow(data), ncol = ncol(data)) * average new("algAverageClass", alg = "globalAverage", data = data, average = av...
library(tidyverse) library(ggimage) simpsons <- readr::read_delim("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-08-27/simpsons-guests.csv", delim = "|", quote = "") guest_roles_per_season <- simpsons %>% filter(!role %in% c("Himself", "Herself", "Themse...
/2019-08-27/simpsons.R
no_license
metabdel/tidytuesday
R
false
false
2,670
r
library(tidyverse) library(ggimage) simpsons <- readr::read_delim("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-08-27/simpsons-guests.csv", delim = "|", quote = "") guest_roles_per_season <- simpsons %>% filter(!role %in% c("Himself", "Herself", "Themse...
library('googlesheets') suppressPackageStartupMessages(library('tidyverse')) suppressPackageStartupMessages(library("dplyr")) suppressPackageStartupMessages(library(doParallel)) cl = makeCluster(6) registerDoParallel(cl, cores=6) scratch='/scratch/groups/mschatz1/cpowgs/' srcdir='~/Code/utils/marcc/' gs_auth(token =...
/carbapenem_r21/call.R
no_license
yfan2012/colle
R
false
false
1,922
r
library('googlesheets') suppressPackageStartupMessages(library('tidyverse')) suppressPackageStartupMessages(library("dplyr")) suppressPackageStartupMessages(library(doParallel)) cl = makeCluster(6) registerDoParallel(cl, cores=6) scratch='/scratch/groups/mschatz1/cpowgs/' srcdir='~/Code/utils/marcc/' gs_auth(token =...
#' Score test statistics in generalized linear models, with estimated #' correlations #' #' Computes score test statistics for testing whether each of a large number of #' coefficients (typically corresponding to genetic markers) in a GLM with canonical #' link is zero #' in presence of a smaller number of covariates (...
/R/fwerapprox-functions.R
no_license
oyvind-bakke/fwerapprox
R
false
false
10,174
r
#' Score test statistics in generalized linear models, with estimated #' correlations #' #' Computes score test statistics for testing whether each of a large number of #' coefficients (typically corresponding to genetic markers) in a GLM with canonical #' link is zero #' in presence of a smaller number of covariates (...
library(visreg) f <- system.file('tests', 'enhances-gamm4.R', package='visreg') source(f)
/tests/run/test-enhances-gamm4.R
no_license
cran/visreg
R
false
false
90
r
library(visreg) f <- system.file('tests', 'enhances-gamm4.R', package='visreg') source(f)
#format the unique lists of ITEMS and INFMYPHEI foods to remove special characters source("lib/format_input_files.R") #convert the unique items to txt items<-read.csv("/Users/elizabeth.chin/Desktop/milk/FL100_ASA24_lactose_estimation/data/outputs/Items_unique.csv", header = T) #2282 foods items.txt<- write.table(ite...
/src/00_format_foods.R
no_license
ebeth-chin/Food_Tree
R
false
false
1,562
r
#format the unique lists of ITEMS and INFMYPHEI foods to remove special characters source("lib/format_input_files.R") #convert the unique items to txt items<-read.csv("/Users/elizabeth.chin/Desktop/milk/FL100_ASA24_lactose_estimation/data/outputs/Items_unique.csv", header = T) #2282 foods items.txt<- write.table(ite...
library(pathological) ### Name: is_windows_drive ### Title: Is the path a Windows drive? ### Aliases: is_windows_drive ### ** Examples x <- c("c:", "c:/", "c:\\", "C:", "C:/", "C:\\", "c:/c", "cc:", NA) # Warnings about OS suppressed so package checks pass on non-Windows systems. suppressWarnings(is_windows_drive(x...
/data/genthat_extracted_code/pathological/examples/is_windows_drive.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
326
r
library(pathological) ### Name: is_windows_drive ### Title: Is the path a Windows drive? ### Aliases: is_windows_drive ### ** Examples x <- c("c:", "c:/", "c:\\", "C:", "C:/", "C:\\", "c:/c", "cc:", NA) # Warnings about OS suppressed so package checks pass on non-Windows systems. suppressWarnings(is_windows_drive(x...
# Simulates data, fit network inference, get scores rm(list=ls()); par(mfrow=c(1, 1), pch=20) library(gtools); library(sna); library(MASS) library(mvtnorm); library(mclust); library(PLNmodels) library(huge); library(saturnin); library(GeneNet) library(NoisySBM) source('Functions/funcSimuls.R') # Dims nbNodes <- 50; n...
/Pgm/SimulScore.R
no_license
scj-robin/NoisyNetworkInference
R
false
false
4,540
r
# Simulates data, fit network inference, get scores rm(list=ls()); par(mfrow=c(1, 1), pch=20) library(gtools); library(sna); library(MASS) library(mvtnorm); library(mclust); library(PLNmodels) library(huge); library(saturnin); library(GeneNet) library(NoisySBM) source('Functions/funcSimuls.R') # Dims nbNodes <- 50; n...
#' @name functions #' #' @title functions for greta arrays #' #' @description This is a list of functions (mostly from base R) that are #' currently implemented to transform greta arrays. Also see \link{operators} #' and \link{transforms}. #' #' @section Usage: \preformatted{ #' #' # logarithms and exponentials #'...
/R/functions.R
permissive
CGNAT/greta
R
false
false
24,112
r
#' @name functions #' #' @title functions for greta arrays #' #' @description This is a list of functions (mostly from base R) that are #' currently implemented to transform greta arrays. Also see \link{operators} #' and \link{transforms}. #' #' @section Usage: \preformatted{ #' #' # logarithms and exponentials #'...
library(readr) data <- read_csv("Colquitt_and_surrounding/Data/SW_primary and secondary counties cases.csv") datatwo <- data[1:32, ] datatwo$total <- rowSums(datatwo[,c(2:15)]) library(lubridate) library(scales) library(ggplot2) # line that makes dates look better on figure datatwo$newdate <- as.Date(parse_date_t...
/Colquitt_and_surrounding/Code/SW_EpiCurve.R
no_license
ingels11/COVID19_ACC_Model
R
false
false
1,293
r
library(readr) data <- read_csv("Colquitt_and_surrounding/Data/SW_primary and secondary counties cases.csv") datatwo <- data[1:32, ] datatwo$total <- rowSums(datatwo[,c(2:15)]) library(lubridate) library(scales) library(ggplot2) # line that makes dates look better on figure datatwo$newdate <- as.Date(parse_date_t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/build-presentations.R \name{build_presentations} \alias{build_presentations} \title{Each Rmarkdown Xaringan presentation in \code{Presentations/} is rendered. Rendered html and associated directories are placed within \code{docs/presentations...
/man/build_presentations.Rd
permissive
CenterForAssessment/packagePages
R
false
true
1,475
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/build-presentations.R \name{build_presentations} \alias{build_presentations} \title{Each Rmarkdown Xaringan presentation in \code{Presentations/} is rendered. Rendered html and associated directories are placed within \code{docs/presentations...
setwd("C:/Users/zxu/Documents/Nov 15 2014 R") library(plyr) library(ggplot2) NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") set.seed(12345) NEI.reduced <- NEI[sample(nrow(NEI), 500), ] data <- with(NEI, aggregate(Emissions, by = list(year), sum)) plot(data, type = "o", ylab = ...
/plot1.R
no_license
utjimmyx/ExData_PeerAssessment2
R
false
false
461
r
setwd("C:/Users/zxu/Documents/Nov 15 2014 R") library(plyr) library(ggplot2) NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") set.seed(12345) NEI.reduced <- NEI[sample(nrow(NEI), 500), ] data <- with(NEI, aggregate(Emissions, by = list(year), sum)) plot(data, type = "o", ylab = ...
### plotting functions # ciplot, plot.cuminc2, ciplot_by ### #' \code{cuminc2} plotting method #' #' Plot a \code{\link{cuminc2}} object with optional cumulative events or #' estimate table, Gray's test results, and other features. #' #' @param x an object of class \code{\link{cuminc2}} #' @param col.ci,lty.ci,lwd....
/R/plot.R
no_license
mljaniczek/cmprsk2
R
false
false
20,342
r
### plotting functions # ciplot, plot.cuminc2, ciplot_by ### #' \code{cuminc2} plotting method #' #' Plot a \code{\link{cuminc2}} object with optional cumulative events or #' estimate table, Gray's test results, and other features. #' #' @param x an object of class \code{\link{cuminc2}} #' @param col.ci,lty.ci,lwd....
run_analysis <- function () { #use data.table framework for handling larger datasets. Also I like the syntax. library (data.table) library (dplyr) # set up activities and levels activities <- read.table ("./activity_labels.txt") activities <- as.character (activitie...
/run_analysis.R
no_license
kdconway/tidydata
R
false
false
2,263
r
run_analysis <- function () { #use data.table framework for handling larger datasets. Also I like the syntax. library (data.table) library (dplyr) # set up activities and levels activities <- read.table ("./activity_labels.txt") activities <- as.character (activitie...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/write_config.R \name{write_config} \alias{write_config} \title{write_config} \usage{ write_config( name_config = "config.cfg", chrom_size, Rscript = FALSE, silent = TRUE, na_noise = FALSE, bin = 1, threshold = 0, cross_width =...
/man/write_config.Rd
no_license
vbusa1/nearBynding
R
false
true
2,212
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/write_config.R \name{write_config} \alias{write_config} \title{write_config} \usage{ write_config( name_config = "config.cfg", chrom_size, Rscript = FALSE, silent = TRUE, na_noise = FALSE, bin = 1, threshold = 0, cross_width =...
## Getting full dataset data_full <- read.csv("./Desktop/ExData_Plotting1/household_power_consumption.txt", header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") ## Subsetting the data data <- data_full[data_full$Date %in% c("1/2/2007","2/2/2007") ,] datetime <- strptime(paste(data$Date, data$Time, sep=" "), "%d/%m/%...
/Plot 3.R
no_license
MagLudi/ExData_Plotting1
R
false
false
802
r
## Getting full dataset data_full <- read.csv("./Desktop/ExData_Plotting1/household_power_consumption.txt", header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") ## Subsetting the data data <- data_full[data_full$Date %in% c("1/2/2007","2/2/2007") ,] datetime <- strptime(paste(data$Date, data$Time, sep=" "), "%d/%m/%...
\name{itm.mlteqc} \alias{itm.mlteqc} \title{ Extract Item Parameters } \description{ \code{itm} is a generic function which extracts a data frame containing the item parameters of multiple forms being equated in the original scale and the item parameters converted to the scale of the base form. } \usage{...
/issuestests/equateMultiple/man/itm.Rd
no_license
akhikolla/RcppDeepStateTest
R
false
false
1,157
rd
\name{itm.mlteqc} \alias{itm.mlteqc} \title{ Extract Item Parameters } \description{ \code{itm} is a generic function which extracts a data frame containing the item parameters of multiple forms being equated in the original scale and the item parameters converted to the scale of the base form. } \usage{...
lgRR.vcov <- function(r, nt, nc, st, sc, n_rt = NA, n_rc = NA) { ft <- nt - st fc <- nc - sc if (length(as.vector(ft)) == length(as.matrix(ft)[, 1])) { colum.number <- 1} else {colum.number <- ncol(ft)} if (length(as.vector(ft)) == length(as.matrix(ft)[, 1])) { K <- length(ft)} else { K <- nrow(ft)} ...
/R/lgRR.vcov.R
no_license
cran/metavcov
R
false
false
1,876
r
lgRR.vcov <- function(r, nt, nc, st, sc, n_rt = NA, n_rc = NA) { ft <- nt - st fc <- nc - sc if (length(as.vector(ft)) == length(as.matrix(ft)[, 1])) { colum.number <- 1} else {colum.number <- ncol(ft)} if (length(as.vector(ft)) == length(as.matrix(ft)[, 1])) { K <- length(ft)} else { K <- nrow(ft)} ...
# Install and load packages package_names <- c("survey","dplyr","foreign","devtools") lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x)) lapply(package_names, require, character.only=T) install_github("e-mitchell/meps_r_pkg/MEPS") library(MEPS) options(survey.lonely.ps...
/mepstrends/hc_use/json/code/r/pctEXP__agegrps__education__.r
permissive
RandomCriticalAnalysis/MEPS-summary-tables
R
false
false
2,619
r
# Install and load packages package_names <- c("survey","dplyr","foreign","devtools") lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x)) lapply(package_names, require, character.only=T) install_github("e-mitchell/meps_r_pkg/MEPS") library(MEPS) options(survey.lonely.ps...
list.of.packages <- c("shiny","RNeo4j","data.table","rjson","visNetwork","DT","shinyjs", "shinythemes") #checking missing packages from list new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] #install missing ones if(length(new.packages)) install.packages(new.packages, depende...
/packageInstaller.R
no_license
tenkaleakshay/Shiny
R
false
false
333
r
list.of.packages <- c("shiny","RNeo4j","data.table","rjson","visNetwork","DT","shinyjs", "shinythemes") #checking missing packages from list new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] #install missing ones if(length(new.packages)) install.packages(new.packages, depende...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fetch_data.R \name{fetch_data} \alias{fetch_data} \title{Fetch Data from AARNET Cloudstor, OneDrive, Sharepoint, GDrive, GitHub or any Other Web-based Provider} \usage{ fetch_data(url, which = NULL, file_ext = NULL) } \arguments{ \item{url}{U...
/man/fetch_data.Rd
permissive
PaulMelloy/cloudy
R
false
true
1,420
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fetch_data.R \name{fetch_data} \alias{fetch_data} \title{Fetch Data from AARNET Cloudstor, OneDrive, Sharepoint, GDrive, GitHub or any Other Web-based Provider} \usage{ fetch_data(url, which = NULL, file_ext = NULL) } \arguments{ \item{url}{U...
pollutantmean <- function(directory, pollutant, id = 1:332) { ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files if(file.exists(directory) && file.info(directory)[1,"isdir"]) { } else { stop("Cannot find data directory : ", direct...
/rprogramming/assignment1/pollutantmean.R
no_license
bwgartner/datasciencecoursera
R
false
false
1,539
r
pollutantmean <- function(directory, pollutant, id = 1:332) { ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files if(file.exists(directory) && file.info(directory)[1,"isdir"]) { } else { stop("Cannot find data directory : ", direct...
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # https://www.shinyapps.io/ # # Define UI for application that draws a histogram # (In a seperate files.) # Define se...
/hw08/BC_Liquor_version/Shiny_app/app.R
no_license
yuanjisun/STAT547-hw-Sun-Yuanji
R
false
false
444
r
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # https://www.shinyapps.io/ # # Define UI for application that draws a histogram # (In a seperate files.) # Define se...
context("create, delete, copy sheets") suppressMessages(gs_auth(token = "googlesheets_token.rds", verbose = FALSE)) test_that("Spreadsheet can be created and deleted", { sheet_title <- p_("hello-bye") expect_message(new_ss <- gs_new(sheet_title), "created") expect_is(new_ss, "googlesheet") Sys.sleep(1) ss...
/tests/testthat/test-gs-create-delete-copy.R
no_license
smusa/googlesheets
R
false
false
2,900
r
context("create, delete, copy sheets") suppressMessages(gs_auth(token = "googlesheets_token.rds", verbose = FALSE)) test_that("Spreadsheet can be created and deleted", { sheet_title <- p_("hello-bye") expect_message(new_ss <- gs_new(sheet_title), "created") expect_is(new_ss, "googlesheet") Sys.sleep(1) ss...
################################################################################ # Case-Based feature importance # # Author : Sejong Oh # 2021.07.011 # Note : This code is not optimized ################################################################################ #' @title Feature importance plot #' @descr...
/R/CB_FeatureImp.R
no_license
dkumango/CBFI
R
false
false
3,314
r
################################################################################ # Case-Based feature importance # # Author : Sejong Oh # 2021.07.011 # Note : This code is not optimized ################################################################################ #' @title Feature importance plot #' @descr...
#' @export dbTableClass <- R6::R6Class('dbTableClass', public = list( initialize = function(tbl_name, src, parentDB, date_input = c("dmy", "mdy", "ymd")) { #browser() if (!(tbl_name %in% dplyr::db_l...
/R/db_class_tbl.R
no_license
sumprain/dbMapR
R
false
false
9,312
r
#' @export dbTableClass <- R6::R6Class('dbTableClass', public = list( initialize = function(tbl_name, src, parentDB, date_input = c("dmy", "mdy", "ymd")) { #browser() if (!(tbl_name %in% dplyr::db_l...
############ ### ui.R ### ############ shinyUI(dashboardPage(skin = "yellow", # Application title dashboardHeader(title = "TechReporter"), # Siderbar Setup dashboardSidebar( sidebarMenu( br(), textOutput("currentTime"), tags$style(type='text/css', "#currentTime { text-align: cen...
/TechReporter/ui.R
permissive
kkc-krish/TechReporter
R
false
false
2,661
r
############ ### ui.R ### ############ shinyUI(dashboardPage(skin = "yellow", # Application title dashboardHeader(title = "TechReporter"), # Siderbar Setup dashboardSidebar( sidebarMenu( br(), textOutput("currentTime"), tags$style(type='text/css', "#currentTime { text-align: cen...
#Discussion week 12 ## 1. Mandatory lines # Similiar thing as clc;clear all;close all in MATLAB rm(list = ls()); # clear workspace variables cat("\014") # it means ctrl+L. clear window graphics.off() # close all plots # In-class exercise 1 ########################################################### # Example from Nav...
/Week_12_Discussion/Discussion _Week12_V2_TAs.R
no_license
DarioUrbina/Teacher-A-Statististical-Methods-BME-423
R
false
false
2,625
r
#Discussion week 12 ## 1. Mandatory lines # Similiar thing as clc;clear all;close all in MATLAB rm(list = ls()); # clear workspace variables cat("\014") # it means ctrl+L. clear window graphics.off() # close all plots # In-class exercise 1 ########################################################### # Example from Nav...
Exponential <- function (params) { rate = 1/params[1] tmp <- list( Model = "Exponential" , Parameters = params , Pdf = function(x) { dexp(x,rate) }, Cdf = fun...
/Exponential.R
permissive
jariou/RRandomVariables
R
false
false
911
r
Exponential <- function (params) { rate = 1/params[1] tmp <- list( Model = "Exponential" , Parameters = params , Pdf = function(x) { dexp(x,rate) }, Cdf = fun...
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) # Define UI for app that draws a histogram ---- ui <- fluidPage( # App title ---- tit...
/app.R
no_license
cemalec/BIFX551
R
false
false
1,874
r
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) # Define UI for app that draws a histogram ---- ui <- fluidPage( # App title ---- tit...
#' Project Template #' #' Generate a project template to increase efficiency. #' #' @param project A character vector of the project name. #' @param path The path to where the project should be created. Default is the #' current working directory. #' @details The project template includes these main directories and...
/R/new_project.R
no_license
toledobastos/qdap
R
false
false
9,803
r
#' Project Template #' #' Generate a project template to increase efficiency. #' #' @param project A character vector of the project name. #' @param path The path to where the project should be created. Default is the #' current working directory. #' @details The project template includes these main directories and...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/last_change_date.R \name{last_change_date} \alias{last_change_date} \title{Provides the date the ITIS database was last updated} \usage{ last_change_date(wt = "json", raw = FALSE, ...) } \arguments{ \item{wt}{(character) One of "json" or "xml...
/man/last_change_date.Rd
permissive
ropensci/ritis
R
false
true
695
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/last_change_date.R \name{last_change_date} \alias{last_change_date} \title{Provides the date the ITIS database was last updated} \usage{ last_change_date(wt = "json", raw = FALSE, ...) } \arguments{ \item{wt}{(character) One of "json" or "xml...
setwd("/Volumes/SP PHD U3/missing-data-project-2/Regression for simu") load("study1_bias_results_recode.RData") load("study2_bias_results_recode.RData") library(dplyr) str(study1_bias_results_recode) library(tidyr) library(broom) study1_bias_results_recode <- study1_bias_results_recode %>% filter(per.miss %in% c(1,2)...
/Regression for simu/analyze data.R
no_license
cathyxijuan/missing-data-project-2
R
false
false
5,494
r
setwd("/Volumes/SP PHD U3/missing-data-project-2/Regression for simu") load("study1_bias_results_recode.RData") load("study2_bias_results_recode.RData") library(dplyr) str(study1_bias_results_recode) library(tidyr) library(broom) study1_bias_results_recode <- study1_bias_results_recode %>% filter(per.miss %in% c(1,2)...
# Load R's "USPersonalExpenditure" dataset using the "data()" function # This will produce a data frame called `USPersonalExpenditure` data("USPersonalExpenditure") # The variable USPersonalExpenditure is now accessible to you. Unfortunately, # it's not a data frame (it's actually what is called a matrix) # Test this ...
/exercise-3/exercise.R
permissive
EverettKey/module9-dataframes
R
false
false
1,604
r
# Load R's "USPersonalExpenditure" dataset using the "data()" function # This will produce a data frame called `USPersonalExpenditure` data("USPersonalExpenditure") # The variable USPersonalExpenditure is now accessible to you. Unfortunately, # it's not a data frame (it's actually what is called a matrix) # Test this ...
qtranShapes <- function(array3D,n,c,ic1,ic2,nc,an1,an2,ncp,d,itran,indx){ ncp <- ncp #In the optimal transfer stage, NCP(L) indicates the step at which cluster L is last updated. #In the quick transfer stage, NCP(L) is equal to the step at which cluster L is last updated plus M: icoun = 0 istep = 0 for (i in...
/R/qtranShapes.R
no_license
cran/Anthropometry
R
false
false
2,587
r
qtranShapes <- function(array3D,n,c,ic1,ic2,nc,an1,an2,ncp,d,itran,indx){ ncp <- ncp #In the optimal transfer stage, NCP(L) indicates the step at which cluster L is last updated. #In the quick transfer stage, NCP(L) is equal to the step at which cluster L is last updated plus M: icoun = 0 istep = 0 for (i in...
############################################### # Create the final report for scATAC-Seq data ############################################### #' @name sc_atac_create_report #' @title HTML report generation #' @description Generates a HTML report using the output folder produced by the pipeline #' #' @param input_fold...
/R/sc_atac_create_report.R
no_license
LuyiTian/scPipe
R
false
false
2,913
r
############################################### # Create the final report for scATAC-Seq data ############################################### #' @name sc_atac_create_report #' @title HTML report generation #' @description Generates a HTML report using the output folder produced by the pipeline #' #' @param input_fold...
projection.mat2 <- function(X,LinearSys){ Y=as.matrix(LinearSys) as.double(lm(X~Y-1)$residual) }
/R/projection.mat2.R
no_license
yfyang86/paftoga
R
false
false
100
r
projection.mat2 <- function(X,LinearSys){ Y=as.matrix(LinearSys) as.double(lm(X~Y-1)$residual) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fit_and_reporting.R \name{umx_fun_mean_sd} \alias{umx_fun_mean_sd} \title{umx_fun} \usage{ umx_fun_mean_sd(x, na.rm = TRUE, digits = 2) } \arguments{ \item{x}{input} \item{na.rm}{How to handle missing (default = TRUE = remove)} \item{digits...
/man/umx_fun_mean_sd.Rd
no_license
bwiernik/umx
R
false
true
3,177
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fit_and_reporting.R \name{umx_fun_mean_sd} \alias{umx_fun_mean_sd} \title{umx_fun} \usage{ umx_fun_mean_sd(x, na.rm = TRUE, digits = 2) } \arguments{ \item{x}{input} \item{na.rm}{How to handle missing (default = TRUE = remove)} \item{digits...
## Function to convert matrix in list that stores original matrix, inverse value, ## and initial matrix and initial inverse as 0 value makeCacheMatrix <- function(x = numeric()) { ## x is input vector (=matrix here) inv <- NULL ## value inv matrix, reset when makeCacheMatrix is called set <- function(y) { x <<...
/cachematrix.R
no_license
ErikMalta/ProgrammingAssignment2
R
false
false
1,564
r
## Function to convert matrix in list that stores original matrix, inverse value, ## and initial matrix and initial inverse as 0 value makeCacheMatrix <- function(x = numeric()) { ## x is input vector (=matrix here) inv <- NULL ## value inv matrix, reset when makeCacheMatrix is called set <- function(y) { x <<...
### This file takes the output of gene2pathways and runs my model on it Y1 <- scale(data.gene.combined, center = TRUE, scale = TRUE) Y2 <- scale(data.meth.combined, center = TRUE, scale = TRUE) N <- nrow(Y1) time <- log(surv.time[index.patients]) censoring <- nestat[index.patients] Time <- cbind(time, censoring) b...
/resultDPGMM.R
no_license
ashar799/twoDPAFT
R
false
false
11,059
r
### This file takes the output of gene2pathways and runs my model on it Y1 <- scale(data.gene.combined, center = TRUE, scale = TRUE) Y2 <- scale(data.meth.combined, center = TRUE, scale = TRUE) N <- nrow(Y1) time <- log(surv.time[index.patients]) censoring <- nestat[index.patients] Time <- cbind(time, censoring) b...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/syllable_sum.R \name{plot.cumulative_syllable_freq} \alias{plot.cumulative_syllable_freq} \title{Plots a cumulative_syllable_freq Object} \usage{ \method{plot}{cumulative_syllable_freq}(x, ...) } \arguments{ \item{x}{The cumulative_syllable_f...
/man/plot.cumulative_syllable_freq.Rd
no_license
cran/qdap
R
false
true
416
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/syllable_sum.R \name{plot.cumulative_syllable_freq} \alias{plot.cumulative_syllable_freq} \title{Plots a cumulative_syllable_freq Object} \usage{ \method{plot}{cumulative_syllable_freq}(x, ...) } \arguments{ \item{x}{The cumulative_syllable_f...
# Load adopted users database adopted_users <- read.csv('../data/adopted_users_extended.csv', header=TRUE) # Exploratory Data Analysis for creation_source library(MASS) # Break up into adopted_users and non adopted users adopted <- subset(adopted_users, adopted_user==1) non_adopted <- subset(adopted_users, adopted_us...
/code/eda-script.R
no_license
laurenhanlon/predicting-user-adoption
R
false
false
1,403
r
# Load adopted users database adopted_users <- read.csv('../data/adopted_users_extended.csv', header=TRUE) # Exploratory Data Analysis for creation_source library(MASS) # Break up into adopted_users and non adopted users adopted <- subset(adopted_users, adopted_user==1) non_adopted <- subset(adopted_users, adopted_us...
# given difference in sample proportions diff <- diffprop(response ~ yawnSeed, level = "Yawn", data = Yawning2) # previously found simulated standard deviation sd # margin of error for 95% CI MoE <- 2 * sd; MoE # lower limit of 95% CI diff - MoE # upper limit of 95% CI diff + MoE
/inst/snippets/Exploration5.2.24b.R
no_license
rpruim/ISIwithR
R
false
false
282
r
# given difference in sample proportions diff <- diffprop(response ~ yawnSeed, level = "Yawn", data = Yawning2) # previously found simulated standard deviation sd # margin of error for 95% CI MoE <- 2 * sd; MoE # lower limit of 95% CI diff - MoE # upper limit of 95% CI diff + MoE
setwd("C:/Adatok/coursera_edX/4_Exploratory Data analysis/Quizes_Assignments/Assignment2") unzip("exdata-data-NEI_data.zip") NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") library(plyr) library(dplyr) match <- levels(SCC[,4])[45:52] #identifying motor vehicle sources match1<...
/plot6.R
no_license
Enoana/datasciencecoursera
R
false
false
1,261
r
setwd("C:/Adatok/coursera_edX/4_Exploratory Data analysis/Quizes_Assignments/Assignment2") unzip("exdata-data-NEI_data.zip") NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") library(plyr) library(dplyr) match <- levels(SCC[,4])[45:52] #identifying motor vehicle sources match1<...
library(magrittr) { base_dir <- '/home/x1/Documents/Weill_Cornell/Spring_Project/storage/cell_barcodes/' ctrl_1_unfiltered_count_file <- paste0(base_dir, 'ctrl_1_unfiltered_count_barcodes.tsv') ctrl_2_unfiltered_count_file <- paste0(base_dir, 'ctrl_2_unfiltered_count_barcodes.tsv') ctrl_3_unfiltered_coun...
/R/cell_barcodes.R
no_license
wcm-epicore-internship/cellranger_multi_pipeline
R
false
false
8,170
r
library(magrittr) { base_dir <- '/home/x1/Documents/Weill_Cornell/Spring_Project/storage/cell_barcodes/' ctrl_1_unfiltered_count_file <- paste0(base_dir, 'ctrl_1_unfiltered_count_barcodes.tsv') ctrl_2_unfiltered_count_file <- paste0(base_dir, 'ctrl_2_unfiltered_count_barcodes.tsv') ctrl_3_unfiltered_coun...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/colorspace.R \name{mixcolor} \alias{mixcolor} \title{Compute the Convex Combination of Two Colors} \usage{ mixcolor(alpha, color1, color2, where = class(color1)) } \arguments{ \item{alpha}{The mixed color is obtained by combining an amount \c...
/man/mixcolor.Rd
no_license
cran/colorspace
R
false
true
1,011
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/colorspace.R \name{mixcolor} \alias{mixcolor} \title{Compute the Convex Combination of Two Colors} \usage{ mixcolor(alpha, color1, color2, where = class(color1)) } \arguments{ \item{alpha}{The mixed color is obtained by combining an amount \c...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_bond_data.R \name{get_bond_data} \alias{get_bond_data} \title{Wrapper function to wgbDataScrapeR to retrieve sovereign fixed income data} \usage{ get_bond_data( country_iso, metric, start_date, end_date, frequency = c("daily", "...
/man/get_bond_data.Rd
no_license
ces0491/fdoR
R
false
true
1,088
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_bond_data.R \name{get_bond_data} \alias{get_bond_data} \title{Wrapper function to wgbDataScrapeR to retrieve sovereign fixed income data} \usage{ get_bond_data( country_iso, metric, start_date, end_date, frequency = c("daily", "...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R / notificationRuleTemplateApi - notificationRuleTemplateApi.r \name{ notificationRuleTemplateApi } \alias{ notificationRuleTemplateApi } \title{ Class for notificationRuleTemplateApi } \description{ Description}
/man/notificationRuleTemplateApi.Rd
permissive
eddyrene/PI-Web-API-Client-R
R
false
true
289
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R / notificationRuleTemplateApi - notificationRuleTemplateApi.r \name{ notificationRuleTemplateApi } \alias{ notificationRuleTemplateApi } \title{ Class for notificationRuleTemplateApi } \description{ Description}