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
# Set working environment ------------------------------------------------- rm(list=ls());graphics.off() lapply(c("stats4","alabama"), require, character.only = TRUE) # Generate data ----------------------------------------------------------- # y = rpois(n=16,lambda=6.8) y = c(5,7,7,4,4,8,15,7,7,4,7,3,8,5,4,7) N=lengt...
/example2.R
no_license
antcalcagni/ME-score
R
false
false
1,551
r
# Set working environment ------------------------------------------------- rm(list=ls());graphics.off() lapply(c("stats4","alabama"), require, character.only = TRUE) # Generate data ----------------------------------------------------------- # y = rpois(n=16,lambda=6.8) y = c(5,7,7,4,4,8,15,7,7,4,7,3,8,5,4,7) N=lengt...
powt <- function (rwl, rescale = FALSE) { # add a check for negative nums if(any(rwl <0, na.rm = TRUE)) { stop("'rwl' values must be greater than zero") } if (!is.data.frame(rwl)) stop("'rwl' must be a data.frame") if (!is.logical(rescale)) stop("'rescale' must be either FALSE (th...
/R/powt.R
no_license
AndyBunn/dplR
R
false
false
2,111
r
powt <- function (rwl, rescale = FALSE) { # add a check for negative nums if(any(rwl <0, na.rm = TRUE)) { stop("'rwl' values must be greater than zero") } if (!is.data.frame(rwl)) stop("'rwl' must be a data.frame") if (!is.logical(rescale)) stop("'rescale' must be either FALSE (th...
context("Parse corpus") test_that("Parse single simple article", { rd <- tmCorpus("Not parsed doc_1") rd <- parse(rd) expect_equal(rd, tmParsed(list(c("Not", "parsed", "doc_1")))) }) test_that("Parse two simple articles", { rd <- tmCorpus(c("Not parsed doc_1", "Not parsed doc_2")) rd <- parse(rd) ...
/data/genthat_extracted_code/textmining/tests/testTransformationFunctions.R
no_license
surayaaramli/typeRrh
R
false
false
1,821
r
context("Parse corpus") test_that("Parse single simple article", { rd <- tmCorpus("Not parsed doc_1") rd <- parse(rd) expect_equal(rd, tmParsed(list(c("Not", "parsed", "doc_1")))) }) test_that("Parse two simple articles", { rd <- tmCorpus(c("Not parsed doc_1", "Not parsed doc_2")) rd <- parse(rd) ...
#' The dependence-adjusted Benjamini-Hochberg (BH) procedure and step-up procedures for multivariate t-statistics #' #' \code{dBH_mvt} computes the rejection set of \eqn{dBH_\gamma(\alpha)} and \eqn{dBH^2_\gamma(\alpha)}, as well as #' \eqn{dSU_{\gamma, \Delta}(\alpha)} and \eqn{dSU^2_{\gamma, \Delta}(\alpha)} a broad ...
/R/dBH_mvt.R
permissive
yixiangLuo/dbhSample
R
false
false
13,100
r
#' The dependence-adjusted Benjamini-Hochberg (BH) procedure and step-up procedures for multivariate t-statistics #' #' \code{dBH_mvt} computes the rejection set of \eqn{dBH_\gamma(\alpha)} and \eqn{dBH^2_\gamma(\alpha)}, as well as #' \eqn{dSU_{\gamma, \Delta}(\alpha)} and \eqn{dSU^2_{\gamma, \Delta}(\alpha)} a broad ...
library(raster) library(sp) library(jdx) library(xml2) library(doSNOW) # doMC does not work in Windows # location of this script #setwd("~/Dropbox/KIT_Modelling/CRAFTY/CRAFTY_WEB/Calibration/") setwd("C:/Users/vanessa.burton.sb/Documents/CRAFTY-opm/code") source("Functions_CRAFTY_rJava.R") source("Functions_CRAFTY_c...
/code/CRAFTY_rJava_control.R
no_license
VeeBurton/CRAFTY-OPM
R
false
false
11,419
r
library(raster) library(sp) library(jdx) library(xml2) library(doSNOW) # doMC does not work in Windows # location of this script #setwd("~/Dropbox/KIT_Modelling/CRAFTY/CRAFTY_WEB/Calibration/") setwd("C:/Users/vanessa.burton.sb/Documents/CRAFTY-opm/code") source("Functions_CRAFTY_rJava.R") source("Functions_CRAFTY_c...
BulkTurbFlux <- function(rho_air,p_a,c_p,l_v,u,T_air,T_surf,rH,z_ins,z_disp,z_0,z_q,psi_m,psi_q,TimStr,Method){ ################################################################################ # Calculating # # BulkTurbFlux.R # # ReadMe: # # Created: 2017/01/12 # Latest Revision: 2017/...
/model_branch/subCodes/BulkFlux_Latent.R
no_license
fidelsteiner/debriscoveredglaciers
R
false
false
1,873
r
BulkTurbFlux <- function(rho_air,p_a,c_p,l_v,u,T_air,T_surf,rH,z_ins,z_disp,z_0,z_q,psi_m,psi_q,TimStr,Method){ ################################################################################ # Calculating # # BulkTurbFlux.R # # ReadMe: # # Created: 2017/01/12 # Latest Revision: 2017/...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stat_growthcurve.R \name{stat_growthcurve} \alias{stat_growthcurve} \title{ggplot2: Add a fitted growth curve} \usage{ stat_growthcurve(mapping = NULL, data = NULL, model = "logistic", geom = "line", position = "identity", na.rm = FALSE, sh...
/man/stat_growthcurve.Rd
permissive
PrimulaLHD/growthcurve
R
false
true
3,246
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stat_growthcurve.R \name{stat_growthcurve} \alias{stat_growthcurve} \title{ggplot2: Add a fitted growth curve} \usage{ stat_growthcurve(mapping = NULL, data = NULL, model = "logistic", geom = "line", position = "identity", na.rm = FALSE, sh...
#' Initiate a plotly visualization #' #' Transform data into a plotly visualization. #' #' There are a number of "visual properties" that aren't included in the officical #' Reference section (see below). #' #' @param data A data frame (optional). #' @param ... These arguments are documented at \url{https://plot.ly...
/R/plotly.R
no_license
RodrigoAnderle/plotly
R
false
false
17,886
r
#' Initiate a plotly visualization #' #' Transform data into a plotly visualization. #' #' There are a number of "visual properties" that aren't included in the officical #' Reference section (see below). #' #' @param data A data frame (optional). #' @param ... These arguments are documented at \url{https://plot.ly...
library(ape) testtree <- read.tree("7048_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="7048_0_unrooted.txt")
/codeml_files/newick_trees_processed/7048_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("7048_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="7048_0_unrooted.txt")
\name{radiateP} \alias{radiateP} %- Also NEED an '\alias' for EACH other topic documented here. \title{Plot radiation pattern for P-waves} \description{ Plots focal mechanism and makes radiation plot with mark up } \usage{ radiateP(MEC, SCALE = FALSE, col = col, TIT = FALSE) } %- maybe also 'usage' for other objects d...
/man/radiateP.Rd
no_license
cran/RFOC
R
false
false
763
rd
\name{radiateP} \alias{radiateP} %- Also NEED an '\alias' for EACH other topic documented here. \title{Plot radiation pattern for P-waves} \description{ Plots focal mechanism and makes radiation plot with mark up } \usage{ radiateP(MEC, SCALE = FALSE, col = col, TIT = FALSE) } %- maybe also 'usage' for other objects d...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/log.r \name{print.bytes} \alias{print.bytes} \title{print bytes} \usage{ \method{print}{bytes}(x, digits = 3, ...) } \description{ print bytes }
/man/print.bytes.Rd
no_license
mdelhey/mdutils
R
false
false
232
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/log.r \name{print.bytes} \alias{print.bytes} \title{print bytes} \usage{ \method{print}{bytes}(x, digits = 3, ...) } \description{ print bytes }
context("Tests for project get and update") rm(list=ls()) verbose <- FALSE #setup to work with environment instance <<- "test_environments/5-2-2.json" test_that(paste("test log in and get and set entity project", instance), { verbose <- FALSE api <- CoreAPIV2::core...
/tests/testthat/test_project.R
no_license
ceparman/Core5.3
R
false
false
1,981
r
context("Tests for project get and update") rm(list=ls()) verbose <- FALSE #setup to work with environment instance <<- "test_environments/5-2-2.json" test_that(paste("test log in and get and set entity project", instance), { verbose <- FALSE api <- CoreAPIV2::core...
library(shiny) library(plotly) data(diamonds, package = "ggplot2") nms <- names(diamonds) ui <- fluidPage( headerPanel("Diamonds Explorer"), sidebarPanel( sliderInput('sampleSize', 'Sample Size', min = 1, max = nrow(diamonds), value = 1000, step = 500, round = 0), ...
/app.R
no_license
imadem/diamond_plotly
R
false
false
1,543
r
library(shiny) library(plotly) data(diamonds, package = "ggplot2") nms <- names(diamonds) ui <- fluidPage( headerPanel("Diamonds Explorer"), sidebarPanel( sliderInput('sampleSize', 'Sample Size', min = 1, max = nrow(diamonds), value = 1000, step = 500, round = 0), ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sof.hosaki.R \name{makeHosakiFunction} \alias{makeHosakiFunction} \title{Hosaki Function} \usage{ makeHosakiFunction() } \value{ [\code{smoof_single_objective_function}] } \description{ Two-dimensional test function \eqn{f} with \deqn{f(\math...
/man/makeHosakiFunction.Rd
permissive
jakobbossek/smoof
R
false
true
709
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sof.hosaki.R \name{makeHosakiFunction} \alias{makeHosakiFunction} \title{Hosaki Function} \usage{ makeHosakiFunction() } \value{ [\code{smoof_single_objective_function}] } \description{ Two-dimensional test function \eqn{f} with \deqn{f(\math...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/acc_functions.R \name{twoHistOnePlot} \alias{twoHistOnePlot} \title{Puts two histograms on the same plot.} \usage{ twoHistOnePlot(dataset1, dataset2, frequency_not_density = T, main_title = "main_title not set", x_label = "x_label not set",...
/man/twoHistOnePlot.Rd
no_license
biodev/packageDir
R
false
true
1,051
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/acc_functions.R \name{twoHistOnePlot} \alias{twoHistOnePlot} \title{Puts two histograms on the same plot.} \usage{ twoHistOnePlot(dataset1, dataset2, frequency_not_density = T, main_title = "main_title not set", x_label = "x_label not set",...
context("read_immediate_region") # skip tests because they take too much time skip_if(Sys.getenv("TEST_ONE") != "") testthat::skip_on_cran() # Reading the data ----------------------- test_that("read_immediate_region", { # read data expect_true(is( read_immediate_region() , "sf")) expect_true(is( read_immed...
/r-package/tests/testthat/test-read_immediate_region.R
no_license
ipeaGIT/geobr
R
false
false
1,119
r
context("read_immediate_region") # skip tests because they take too much time skip_if(Sys.getenv("TEST_ONE") != "") testthat::skip_on_cran() # Reading the data ----------------------- test_that("read_immediate_region", { # read data expect_true(is( read_immediate_region() , "sf")) expect_true(is( read_immed...
library(imager) pluto <- load.image("nh-pluto-mountain-range.png") imager::display(pluto) layout(t(1:3)) threshold(pluto,"20%") %>% plot threshold(pluto,"15%") %>% plot threshold(pluto,"10%") %>% plot df <- as.data.frame(pluto) head(df,5) m <- lm(value ~ x + y,data=df) #linear trend summary(m) layout(t(1:2)) plu...
/imager_test.R
no_license
christopherlovell/FlyByLearning
R
false
false
667
r
library(imager) pluto <- load.image("nh-pluto-mountain-range.png") imager::display(pluto) layout(t(1:3)) threshold(pluto,"20%") %>% plot threshold(pluto,"15%") %>% plot threshold(pluto,"10%") %>% plot df <- as.data.frame(pluto) head(df,5) m <- lm(value ~ x + y,data=df) #linear trend summary(m) layout(t(1:2)) plu...
# This is the user-interface definition of a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) library(shinythemes) source("ui_helpers.R") build_ui <- function() { fluidPage(theme = shinytheme("cerulean"), shinyjs::useShiny...
/scripts/200_webapp/shinyapp/ui.R
permissive
miltondp/phenomexcan
R
false
false
6,830
r
# This is the user-interface definition of a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) library(shinythemes) source("ui_helpers.R") build_ui <- function() { fluidPage(theme = shinytheme("cerulean"), shinyjs::useShiny...
context("Extreme distances") test_that("Main example - numeric", { # default distance mu <- c(1/7,2/7,4/7) nu <- c(1/4,1/4,1/2) x <- edistances(mu, nu) expect_true(length(x[[1]])==15 && length(x[[2]])==15) expect_equal(x$joinings[[1]], structure(c(0.142857142857143, 0, 0.107142857142857, 0, 0, 0.25, ...
/tests/testthat/test-edistances.R
no_license
stla/kantorovich
R
false
false
3,571
r
context("Extreme distances") test_that("Main example - numeric", { # default distance mu <- c(1/7,2/7,4/7) nu <- c(1/4,1/4,1/2) x <- edistances(mu, nu) expect_true(length(x[[1]])==15 && length(x[[2]])==15) expect_equal(x$joinings[[1]], structure(c(0.142857142857143, 0, 0.107142857142857, 0, 0, 0.25, ...
context("nauf_pmmeans") dat <- fricatives dat$uvoi[!(dat$lang == "Catalan" & dat$wordpos == "Medial")] <- NA s.pvoi <- standardize(pvoi ~ lang * wordpos + uvoi + lang * dur, dat) m.pvoi <- nauf_lm(s.pvoi$formula, s.pvoi$data) rg.pvoi <- nauf_ref.grid(m.pvoi) b <- coef(m.pvoi) pmm <- list() pmm[[1]] <- nau...
/tests/testthat/test-nauf_pmmeans.R
no_license
cran/nauf
R
false
false
1,602
r
context("nauf_pmmeans") dat <- fricatives dat$uvoi[!(dat$lang == "Catalan" & dat$wordpos == "Medial")] <- NA s.pvoi <- standardize(pvoi ~ lang * wordpos + uvoi + lang * dur, dat) m.pvoi <- nauf_lm(s.pvoi$formula, s.pvoi$data) rg.pvoi <- nauf_ref.grid(m.pvoi) b <- coef(m.pvoi) pmm <- list() pmm[[1]] <- nau...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Basic Functions.R \name{bin_mean} \alias{bin_mean} \title{Binomial Mean} \usage{ bin_mean(trials, prob) } \arguments{ \item{n}{number of trials} \item{p}{probability of success in each trials} } \value{ Expected value of binomi...
/workout3/binomial/man/bin_mean.Rd
no_license
stat133-sp19/hw-stat133-Xinyi31
R
false
true
451
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Basic Functions.R \name{bin_mean} \alias{bin_mean} \title{Binomial Mean} \usage{ bin_mean(trials, prob) } \arguments{ \item{n}{number of trials} \item{p}{probability of success in each trials} } \value{ Expected value of binomi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SiegelTukeyTest.R \name{SiegelTukeyTest} \alias{SiegelTukeyTest} \title{Siegel-Tukey Test For Equality In Variability.} \usage{ SiegelTukeyTest(x, y, alternative = "two.sided", conf.level = 0.95, ...) } \arguments{ \item{x:}{FLVector of data ...
/man/SiegelTukeyTest.Rd
no_license
phani-srikar/AdapteR
R
false
true
904
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SiegelTukeyTest.R \name{SiegelTukeyTest} \alias{SiegelTukeyTest} \title{Siegel-Tukey Test For Equality In Variability.} \usage{ SiegelTukeyTest(x, y, alternative = "two.sided", conf.level = 0.95, ...) } \arguments{ \item{x:}{FLVector of data ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/estimates.R \name{estimates.glmerMod} \alias{estimates.glmerMod} \title{Report glmerMod object Estimates (effect sizes and parameters)} \usage{ \method{estimates}{glmerMod}(object, mc = FALSE) } \arguments{ \item{object}{a glmerMod object} \...
/man/estimates.glmerMod.Rd
no_license
dustinfife/flexplot
R
false
true
517
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/estimates.R \name{estimates.glmerMod} \alias{estimates.glmerMod} \title{Report glmerMod object Estimates (effect sizes and parameters)} \usage{ \method{estimates}{glmerMod}(object, mc = FALSE) } \arguments{ \item{object}{a glmerMod object} \...
stocks <- list.dirs(path = "../", full.names = FALSE, recursive = FALSE) stocks <- stocks[!(stocks %in% c("ASAP_3_year_projection_test", "helper_code", "plots_for_README", "tex", "USWCLingcod", "db"))] m1 = m2 = m3 = matrix(NA, nrow = length(stocks), ncol = 2) mods = list(m1,m2,m3) remove(m1,m2,m3) names(mods) = c("a4a...
/state-space/helper_code/extract_a4ascaa_mod_attr.R
no_license
ices-eg/wg_MGWG
R
false
false
1,291
r
stocks <- list.dirs(path = "../", full.names = FALSE, recursive = FALSE) stocks <- stocks[!(stocks %in% c("ASAP_3_year_projection_test", "helper_code", "plots_for_README", "tex", "USWCLingcod", "db"))] m1 = m2 = m3 = matrix(NA, nrow = length(stocks), ncol = 2) mods = list(m1,m2,m3) remove(m1,m2,m3) names(mods) = c("a4a...
\name{ChAMPfunction} \alias{ChAMPfunction} \title{ChAMPfunction} \usage{ ChAMPfunction(testDir,core=1) } \description{ perform a differentially methylated genes analysis required ChAMP package } \examples{ library("data.table") library("ChAMP") #configure path of GDC data testDir = "~/GDCdata" myDMPLU...
/man/ChAMPfunction.Rd
no_license
LULIU1816/TwoSLSanalysis
R
false
false
353
rd
\name{ChAMPfunction} \alias{ChAMPfunction} \title{ChAMPfunction} \usage{ ChAMPfunction(testDir,core=1) } \description{ perform a differentially methylated genes analysis required ChAMP package } \examples{ library("data.table") library("ChAMP") #configure path of GDC data testDir = "~/GDCdata" myDMPLU...
library(ggplot2) for (i in 1:4){ df <- read.csv(paste0("delta_ms_intel_", i, ".csv"), header = FALSE) pts <- ggplot(df, aes(x = as.factor(V1), y=V2))+ geom_boxplot(colour="slateblue", fill="blue", alpha=0.2, outlier.colour="red", outlier.fill=...
/lab2/delta_ms_images/graph.R
no_license
Sphenodon/parallelProgramming
R
false
false
3,778
r
library(ggplot2) for (i in 1:4){ df <- read.csv(paste0("delta_ms_intel_", i, ".csv"), header = FALSE) pts <- ggplot(df, aes(x = as.factor(V1), y=V2))+ geom_boxplot(colour="slateblue", fill="blue", alpha=0.2, outlier.colour="red", outlier.fill=...
## CHANGE TO YOUR WORKING DIRECTORY!! ## workdir <- "/home/bst/student/hiparker/fSVA" setwd(workdir) library(ProjectTemplate) load.project() dat <- exprs(ovEset) tmp <- pData(ovEset) tmp <- tmp[match(colnames(dat), tmp$File.Name), ] # # tmp[,20] = living/dead # out <- rep(NA, dim(dat)[2]) # out[tmp[,20] == "DECEAS...
/src/tcga_PAM_21.R
no_license
hilaryparker/fSVA
R
false
false
3,025
r
## CHANGE TO YOUR WORKING DIRECTORY!! ## workdir <- "/home/bst/student/hiparker/fSVA" setwd(workdir) library(ProjectTemplate) load.project() dat <- exprs(ovEset) tmp <- pData(ovEset) tmp <- tmp[match(colnames(dat), tmp$File.Name), ] # # tmp[,20] = living/dead # out <- rep(NA, dim(dat)[2]) # out[tmp[,20] == "DECEAS...
#!/usr/bin/env Rscript # Calculates significance of different rescoring methods for RR per round using a general linear model with random effects for dyad ("sess"). # # # Copyright 2018 Todd Shore # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
/rescoring_significance-onlyWgt.R
permissive
errantlinguist/tangrams-analysis
R
false
false
6,322
r
#!/usr/bin/env Rscript # Calculates significance of different rescoring methods for RR per round using a general linear model with random effects for dyad ("sess"). # # # Copyright 2018 Todd Shore # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
# Data Preprocessing # import the dataset dataset = read.csv("Data.csv") # take care of missing data in Age column dataset$Age = ifelse(is.na(dataset$Age), # check to see if NA in 'Age' ave(dataset$Age, FUN = function(x) mean(x, na.rm = TRUE)), # function to remove NA with mean ...
/Machine_Learning_template.R
no_license
burmap01/Machine_Learning_template
R
false
false
1,534
r
# Data Preprocessing # import the dataset dataset = read.csv("Data.csv") # take care of missing data in Age column dataset$Age = ifelse(is.na(dataset$Age), # check to see if NA in 'Age' ave(dataset$Age, FUN = function(x) mean(x, na.rm = TRUE)), # function to remove NA with mean ...
test.data.checks <- function() { # failing on WINDOWS: "TS-Toronto" case #datasets <- c("TS-all","TS-confirmed","TS-confirmed-US","TS-Toronto","aggregated") datasets <- c("TS-all","TS-confirmed","TS-confirmed-US","aggregated") for (i in datasets) { print(i) data <- covid19.data(i) nullify.data(data) nulli...
/tests/testthat/covid19_checks_tests.R
no_license
cran/covid19.analytics
R
false
false
396
r
test.data.checks <- function() { # failing on WINDOWS: "TS-Toronto" case #datasets <- c("TS-all","TS-confirmed","TS-confirmed-US","TS-Toronto","aggregated") datasets <- c("TS-all","TS-confirmed","TS-confirmed-US","aggregated") for (i in datasets) { print(i) data <- covid19.data(i) nullify.data(data) nulli...
\name{stat_density} \alias{stat_density} \alias{StatDensity} \title{stat\_density} \description{Density estimation, 1D} \details{ This page describes stat\_density, see \code{\link{layer}} and \code{\link{qplot}} for how to create a complete plot from individual components. } \section{Aesthetics}{ The following aesthet...
/man/stat_density.rd
no_license
strongh/ggplot2
R
false
false
3,740
rd
\name{stat_density} \alias{stat_density} \alias{StatDensity} \title{stat\_density} \description{Density estimation, 1D} \details{ This page describes stat\_density, see \code{\link{layer}} and \code{\link{qplot}} for how to create a complete plot from individual components. } \section{Aesthetics}{ The following aesthet...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AM_prior.R \name{summary.AM_prior} \alias{summary.AM_prior} \title{summary information of the AM_prior object} \usage{ \method{summary}{AM_prior}(object, ...) } \arguments{ \item{object}{an \code{\link{AM_prior}} object. See \code{\link{AM_pr...
/man/summary.AM_prior.Rd
no_license
cran/AntMAN
R
false
true
698
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AM_prior.R \name{summary.AM_prior} \alias{summary.AM_prior} \title{summary information of the AM_prior object} \usage{ \method{summary}{AM_prior}(object, ...) } \arguments{ \item{object}{an \code{\link{AM_prior}} object. See \code{\link{AM_pr...
#!/usr/bin/r args <- commandArgs(T) downlist <- read.table(args[1],header = T) setwd(args[2]) for (i in downlist$sra_ftp){ url = paste("aria2c -x 4 -c ftp://",i,sep = "",collapse="") system(url) }
/180928/BDsra.R
no_license
IvanWoo22/DayDayUp
R
false
false
206
r
#!/usr/bin/r args <- commandArgs(T) downlist <- read.table(args[1],header = T) setwd(args[2]) for (i in downlist$sra_ftp){ url = paste("aria2c -x 4 -c ftp://",i,sep = "",collapse="") system(url) }
# Hello, world!! # # This is an example function named 'hello' # which prints 'Hello, world!'. # # You can learn more about package authoring with RStudio at: # # http://r-pkgs.had.co.nz/ # # Some useful keyboard shortcuts for package authoring: # # Install Package: 'Ctrl + Shift + B' # Check Package: ...
/R/hello.R
no_license
whtns/ksmisc
R
false
false
450
r
# Hello, world!! # # This is an example function named 'hello' # which prints 'Hello, world!'. # # You can learn more about package authoring with RStudio at: # # http://r-pkgs.had.co.nz/ # # Some useful keyboard shortcuts for package authoring: # # Install Package: 'Ctrl + Shift + B' # Check Package: ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rapt_extend.R \name{studpermu.test} \alias{studpermu.test} \title{Studentised Permutation Test} \usage{ studpermu.test(X, ...) } \description{ This is an S3 generic that extends the use of \code{\link[spatstat]{studpermu.test}} beyond "ppp" o...
/man/studpermu.test.Rd
no_license
AKIRA0129/rapt
R
false
true
996
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rapt_extend.R \name{studpermu.test} \alias{studpermu.test} \title{Studentised Permutation Test} \usage{ studpermu.test(X, ...) } \description{ This is an S3 generic that extends the use of \code{\link[spatstat]{studpermu.test}} beyond "ppp" o...
###################################################################### #' @title Multi-way standard error clustering #' #' @description Return a multi-way cluster-robust variance-covariance matrix #' #' @param model The estimated model, usually an \code{lm} or \code{glm} class object #' @param cluster A \code{v...
/R/cluster_vcov.r
no_license
kendonB/multiwayvcov
R
false
false
11,263
r
###################################################################### #' @title Multi-way standard error clustering #' #' @description Return a multi-way cluster-robust variance-covariance matrix #' #' @param model The estimated model, usually an \code{lm} or \code{glm} class object #' @param cluster A \code{v...
testlist <- list(id = NULL, score = NULL, id = NULL, booklet_id = integer(0), item_score = integer(0), person_id = c(184549375L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,...
/dexterMST/inst/testfiles/mutate_booklet_score/libFuzzer_mutate_booklet_score/mutate_booklet_score_valgrind_files/1612726460-test.R
no_license
akhikolla/updatedatatype-list1
R
false
false
549
r
testlist <- list(id = NULL, score = NULL, id = NULL, booklet_id = integer(0), item_score = integer(0), person_id = c(184549375L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,...
setwd("~/Coursera/ExploratoryDataAnalysisAssignment1") fileURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" td = tempdir() tf = tempfile(tmpdir=td, fileext=".zip") download.file(fileURL, tf, mode = "wb") fname <- unzip(tf, list=TRUE)$Name[1] unzip(tf, files=fname, exdir...
/plot2.R
no_license
Itelina/ExData_Plotting1
R
false
false
1,180
r
setwd("~/Coursera/ExploratoryDataAnalysisAssignment1") fileURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" td = tempdir() tf = tempfile(tmpdir=td, fileext=".zip") download.file(fileURL, tf, mode = "wb") fname <- unzip(tf, list=TRUE)$Name[1] unzip(tf, files=fname, exdir...
########################################################################## # # Meta-analysis of turbidity fluctuations # Part 1. Read data # # Anatoly Tsyplenkov, Sergey Chalov # atsyplenkov@gmail.com # ########################################################################## library(tidyverse) library(janitor) libra...
/R/old/01_read-data_setun.R
no_license
atsyplenkov/turbidity-fluctuations
R
false
false
6,844
r
########################################################################## # # Meta-analysis of turbidity fluctuations # Part 1. Read data # # Anatoly Tsyplenkov, Sergey Chalov # atsyplenkov@gmail.com # ########################################################################## library(tidyverse) library(janitor) libra...
######################################################################################################################## ## immune.R ## created: 2017-11-20 ## creator: Yassen Assenov ## --------------------------------------------------------------------------------------------------------------------- ## Functions rel...
/R/immune.R
no_license
epigen/RnBeads
R
false
false
7,737
r
######################################################################################################################## ## immune.R ## created: 2017-11-20 ## creator: Yassen Assenov ## --------------------------------------------------------------------------------------------------------------------- ## Functions rel...
require(stringi) setwd("C:/Users/Martin/Documents/Workaholic/TUD_Verkehr/Geodaten/Geschaeftsgebiete/Drivenow/") location <- read.table("Location_Drivenow.txt", sep = "," ,header = FALSE) location <- data.frame(t(location)) businessAreaUrl <- location[grep("businessAreaUrl", location$t.location.), ] businessAreaUrl <- ...
/Data/R/operatingarea_drivenow.R
no_license
MXTG/carsharing
R
false
false
1,116
r
require(stringi) setwd("C:/Users/Martin/Documents/Workaholic/TUD_Verkehr/Geodaten/Geschaeftsgebiete/Drivenow/") location <- read.table("Location_Drivenow.txt", sep = "," ,header = FALSE) location <- data.frame(t(location)) businessAreaUrl <- location[grep("businessAreaUrl", location$t.location.), ] businessAreaUrl <- ...
#get data in there rep_data <- read.table("kimura_distances.tsv", sep="\t", header=TRUE) #get species factors right rep_data$species <- factor(rep_data$species, levels = c("briggsae","nigoni","remanei","elegans","inopinata")) #get readable unit of bp rep_data$MB <- rep_data$BP/1000000 #define chromosome arms and ...
/simulations_and_ages/ages_landscapes/age_statistics.R
no_license
gcwoodruff/transposable_elements_2019
R
false
false
75,580
r
#get data in there rep_data <- read.table("kimura_distances.tsv", sep="\t", header=TRUE) #get species factors right rep_data$species <- factor(rep_data$species, levels = c("briggsae","nigoni","remanei","elegans","inopinata")) #get readable unit of bp rep_data$MB <- rep_data$BP/1000000 #define chromosome arms and ...
traceBack <- function(D, global = TRUE){ stopifnot("stringDist" %in% class(D) | "stringSim" %in% class(D)) TB <- attr(D, "TraceBackMatrix") SM <- attr(D, "ScoringMatrix") if(global){ m <- nrow(TB) n <- ncol(TB) }else{ wmax <- which.max(SM) if(wmax %% nrow(SM) == 0){ m <- nrow(SM) n...
/R/traceBack.R
no_license
stamats/MKmisc
R
false
false
1,212
r
traceBack <- function(D, global = TRUE){ stopifnot("stringDist" %in% class(D) | "stringSim" %in% class(D)) TB <- attr(D, "TraceBackMatrix") SM <- attr(D, "ScoringMatrix") if(global){ m <- nrow(TB) n <- ncol(TB) }else{ wmax <- which.max(SM) if(wmax %% nrow(SM) == 0){ m <- nrow(SM) n...
qualtRics::qualtrics_api_credentials(api_key = keyringr::decrypt_kc_pw("Qualtrics_API_Key"), base_url = "ucsf.co1.qualtrics.com") qualtRics::all_surveys() %>% head() %>% View() qualtRics::fetch_survey("SV_esmOleT034cn2rb", force_request = T) %>% View() # create list of a...
/Automating LAVA Uploads with R/QualtRics Test Script.R
no_license
NeuroShepherd/R_Coding_Presentations
R
false
false
1,287
r
qualtRics::qualtrics_api_credentials(api_key = keyringr::decrypt_kc_pw("Qualtrics_API_Key"), base_url = "ucsf.co1.qualtrics.com") qualtRics::all_surveys() %>% head() %>% View() qualtRics::fetch_survey("SV_esmOleT034cn2rb", force_request = T) %>% View() # create list of a...
# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be use...
/fGarch/unitTests/runit.sged.R
permissive
solgenomics/R_libs
R
false
false
4,357
r
# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be use...
#' @rdname Data #' @name Data #' @name Comparison #' @usage data(Comparison) #' #' @aliases primer.data template.data #' #' @references IMGT®, the international ImMunoGeneTics information system® http://www.imgt.org (founder and director: Marie-Paule Lefranc, Montpellier, France). #' @examples #' #' # Load the comparis...
/R/Comparison.R
no_license
weixinsuoxian/openPrimeR
R
false
false
549
r
#' @rdname Data #' @name Data #' @name Comparison #' @usage data(Comparison) #' #' @aliases primer.data template.data #' #' @references IMGT®, the international ImMunoGeneTics information system® http://www.imgt.org (founder and director: Marie-Paule Lefranc, Montpellier, France). #' @examples #' #' # Load the comparis...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/rlm_tidiers.R \name{rlm_tidiers} \alias{glance.rlm} \alias{rlm_tidiers} \title{Tidying methods for an rlm (robust linear model) object} \usage{ \method{glance}{rlm}(x, ...) } \arguments{ \item{x}{rlm object} \item{...}{extra argument...
/man/rlm_tidiers.Rd
no_license
parthasen/broom
R
false
false
974
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/rlm_tidiers.R \name{rlm_tidiers} \alias{glance.rlm} \alias{rlm_tidiers} \title{Tidying methods for an rlm (robust linear model) object} \usage{ \method{glance}{rlm}(x, ...) } \arguments{ \item{x}{rlm object} \item{...}{extra argument...
########################################################################################## # UNIVARIATE GENERALIZED LINEAR MODELS PREDICTIONS # with multivariate normal random effects, using Penalized Quasi-Likelihood ########################################################################################## requi...
/PREDICT/predict.glmmPQL.r
no_license
davan690/SDM-comparison
R
false
false
2,870
r
########################################################################################## # UNIVARIATE GENERALIZED LINEAR MODELS PREDICTIONS # with multivariate normal random effects, using Penalized Quasi-Likelihood ########################################################################################## requi...
# 7 January 2018 # http://therbootcamp.github.io # Script to install any packages necessary for the BaselRBootcamp Bootcamp_package_installation <- function() { installed_packages <- rownames(installed.packages()) packages.to.install <- c( # Tidyverse -------------- "tidyverse", # Uti...
/_materials/code/BootcampPackageInstallation.R
permissive
therbootcamp/oldpage
R
false
false
2,536
r
# 7 January 2018 # http://therbootcamp.github.io # Script to install any packages necessary for the BaselRBootcamp Bootcamp_package_installation <- function() { installed_packages <- rownames(installed.packages()) packages.to.install <- c( # Tidyverse -------------- "tidyverse", # Uti...
# Extract information on drug usage for 16p11.2 CNV carriers ################################################# ### Libraries ################################### library(data.table) library(tidyr) library(dplyr) ################################################# ### STEP 1: Load CNV carriers ################### # Loa...
/02_CNV_carriers/02_drug_usage_CNV_carriers.R
no_license
cauwerx/16p11.2_wbc
R
false
false
6,566
r
# Extract information on drug usage for 16p11.2 CNV carriers ################################################# ### Libraries ################################### library(data.table) library(tidyr) library(dplyr) ################################################# ### STEP 1: Load CNV carriers ################### # Loa...
#' Remove/Replace/Extract Person Tags #' #' Remove/replace/extract person tags from a string. #' #' @param text.var The text variable. #' @param trim logical. If \code{TRUE} removes leading and trailing white #' spaces. #' @param clean trim logical. If \code{TRUE} extra white spaces and escaped #' character will ...
/R/rm_tag.R
no_license
trinker/qdapRegex
R
false
false
2,796
r
#' Remove/Replace/Extract Person Tags #' #' Remove/replace/extract person tags from a string. #' #' @param text.var The text variable. #' @param trim logical. If \code{TRUE} removes leading and trailing white #' spaces. #' @param clean trim logical. If \code{TRUE} extra white spaces and escaped #' character will ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nc_utils.R \name{find_var_by_att} \alias{find_var_by_att} \title{Find NetCDF Variable by attribute} \usage{ find_var_by_att(x, attribute, value = ".*", strict = TRUE) } \arguments{ \item{x}{data.frame returned by ncmeta::nc_atts, open NetCDF ...
/man/find_var_by_att.Rd
permissive
mikejohnson51/intersectr
R
false
true
1,105
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nc_utils.R \name{find_var_by_att} \alias{find_var_by_att} \title{Find NetCDF Variable by attribute} \usage{ find_var_by_att(x, attribute, value = ".*", strict = TRUE) } \arguments{ \item{x}{data.frame returned by ncmeta::nc_atts, open NetCDF ...
#### if(Sys.info()["user"]=="janus829" | Sys.info()["user"]=="s7m"){ source('~/Research/disputesReputation/RCode/setup.R') } ### Load data load(paste0(pathBin, 'analysisData.rda')) #### ####################################################################################### # Setting up models aData$fdiLog2 = logNeg(...
/RCode/Analysis/Level/2_Level_FDI_Models_nonICSID.R
no_license
s7minhas/disputesReputation
R
false
false
5,789
r
#### if(Sys.info()["user"]=="janus829" | Sys.info()["user"]=="s7m"){ source('~/Research/disputesReputation/RCode/setup.R') } ### Load data load(paste0(pathBin, 'analysisData.rda')) #### ####################################################################################### # Setting up models aData$fdiLog2 = logNeg(...
\name{NightDay-package} \alias{NightDay-package} \docType{package} \title{ Night and Day Boundary Plot Funtion } \description{ Computes and plots the boundary between night and day. } \details{ \tabular{ll}{ Package: \tab NightDay\cr Type: \tab Package\cr Version: \tab 1.0\cr Date: \tab 2011-01-27\cr Lic...
/man/NightDay-package.Rd
no_license
cran/NightDay
R
false
false
548
rd
\name{NightDay-package} \alias{NightDay-package} \docType{package} \title{ Night and Day Boundary Plot Funtion } \description{ Computes and plots the boundary between night and day. } \details{ \tabular{ll}{ Package: \tab NightDay\cr Type: \tab Package\cr Version: \tab 1.0\cr Date: \tab 2011-01-27\cr Lic...
#' Single iteration of the poisson goodness-of-fit test #' #' @param n_bins number of bins to use in chi-squared test #' @param count vector of observed counts #' @param lambda estimate of lambda #' #' @return returns the result of the goodness-of-fit test #' @export #' #' @examples pois_gof_test(n_bins, count, lambda)...
/R/pois_gof_test.R
permissive
keloonam/spaceNtime
R
false
false
1,538
r
#' Single iteration of the poisson goodness-of-fit test #' #' @param n_bins number of bins to use in chi-squared test #' @param count vector of observed counts #' @param lambda estimate of lambda #' #' @return returns the result of the goodness-of-fit test #' @export #' #' @examples pois_gof_test(n_bins, count, lambda)...
library(gam) ############################## #Fit a curve with a GAM and linear model to the CTR data to be used in a function to estimate volume of traffic based # on keyword position and rank #Load known points from a big collection of webmaster tools rankings exports filenames <- list.files("~/Estimate CTR/"...
/CTR-est.R
no_license
adrian-haldenby/SEO-scripts
R
false
false
1,625
r
library(gam) ############################## #Fit a curve with a GAM and linear model to the CTR data to be used in a function to estimate volume of traffic based # on keyword position and rank #Load known points from a big collection of webmaster tools rankings exports filenames <- list.files("~/Estimate CTR/"...
\name{enve.recplot2.corePeak} \alias{enve.recplot2.corePeak} \title{enve recplot2 corePeak} \description{Finds the peak in a list of peaks that is most likely to represent the "core genome" of a population.} \usage{enve.recplot2.corePeak(x)} \arguments{ \item{x}{`list` of `enve.recplot2.peak` objects.} } ...
/enveomics.R/man/enve.recplot2.corePeak.Rd
permissive
jfroula/enveomics
R
false
false
398
rd
\name{enve.recplot2.corePeak} \alias{enve.recplot2.corePeak} \title{enve recplot2 corePeak} \description{Finds the peak in a list of peaks that is most likely to represent the "core genome" of a population.} \usage{enve.recplot2.corePeak(x)} \arguments{ \item{x}{`list` of `enve.recplot2.peak` objects.} } ...
## -*- coding: utf-8 -*- #' Perceptual discrimination of short-duration gabor patches with Perceptual #' Awareness Scale ratings. #' #' The Perceptual Awareness Scale ratings ('no experience', ..., 'absolutely #' clear image') of discrimination responses to gabor patches presented for 32ms #' or 64ms before or after t...
/R/gabor.R
no_license
boryspaulewicz/bhsdtr
R
false
false
1,959
r
## -*- coding: utf-8 -*- #' Perceptual discrimination of short-duration gabor patches with Perceptual #' Awareness Scale ratings. #' #' The Perceptual Awareness Scale ratings ('no experience', ..., 'absolutely #' clear image') of discrimination responses to gabor patches presented for 32ms #' or 64ms before or after t...
# Page no. : 235 - 236 rating <- c(5, 3, 6, 2, 7, 6, 7, 4, 2, 5) n <- 10 mean <- mean(rating) diff <- rating - mean sq_diff <- diff ** 2 data_frame <- data.frame(rating, diff, sq_diff) View(data_frame) df <- n - 1 mu <- 4 var <- sum(data_frame$sq_diff) / df d_var <- var / n d_sd <- sqrt(d_var) alpha <- 0.0...
/Statistics_For_Psychology_by_Arthur_Aron_Elliot_J_Coups_And_Elaine_N_Aron/CH7/EX7.1d/Ex7_1d.R
permissive
FOSSEE/R_TBC_Uploads
R
false
false
555
r
# Page no. : 235 - 236 rating <- c(5, 3, 6, 2, 7, 6, 7, 4, 2, 5) n <- 10 mean <- mean(rating) diff <- rating - mean sq_diff <- diff ** 2 data_frame <- data.frame(rating, diff, sq_diff) View(data_frame) df <- n - 1 mu <- 4 var <- sum(data_frame$sq_diff) / df d_var <- var / n d_sd <- sqrt(d_var) alpha <- 0.0...
#' Pay Bonus to Worker #' #' Pay a bonus to one or more workers. This function spends money from your #' MTurk account and will fail if insufficient funds are available. #' #' A simple function to grant a bonus to one or more workers. The function is #' somewhat picky in that it requires a WorkerId, the AssignmentId fo...
/R/GrantBonus.R
no_license
ErikOSorensen/pyMTurkR
R
false
false
6,758
r
#' Pay Bonus to Worker #' #' Pay a bonus to one or more workers. This function spends money from your #' MTurk account and will fail if insufficient funds are available. #' #' A simple function to grant a bonus to one or more workers. The function is #' somewhat picky in that it requires a WorkerId, the AssignmentId fo...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stderr.R \name{stderr} \alias{stderr} \title{A function for finding the standard error} \usage{ stderr(x) } \arguments{ \item{x}{is a list of numbers} } \description{ This function takes a series of numbers (vector, etc.) and finds the standa...
/man/stderr.Rd
no_license
jscarlton/jscTools
R
false
true
354
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stderr.R \name{stderr} \alias{stderr} \title{A function for finding the standard error} \usage{ stderr(x) } \arguments{ \item{x}{is a list of numbers} } \description{ This function takes a series of numbers (vector, etc.) and finds the standa...
# 1.1 dailyKos = read.csv("dailykos.csv") distance = dist(dailyKos, method="euclidean") clusterIntensity = hclust(distance, method="ward.D") # 1.2 plot(clusterIntensity) # 1.4 clusters = cutree(clusterIntensity, k=7) cluster1 = subset(dailyKos, clusters == 1) cluster2 = subset(dailyKos, clusters == 2) cluster3 = subs...
/Assignment 6/1. Document Clustering with Daily Kos/Assignment 6.1.R
no_license
bastienbrier/MIT-15.071x
R
false
false
1,455
r
# 1.1 dailyKos = read.csv("dailykos.csv") distance = dist(dailyKos, method="euclidean") clusterIntensity = hclust(distance, method="ward.D") # 1.2 plot(clusterIntensity) # 1.4 clusters = cutree(clusterIntensity, k=7) cluster1 = subset(dailyKos, clusters == 1) cluster2 = subset(dailyKos, clusters == 2) cluster3 = subs...
library(data.table) library(dplyr) ## fastest file reading. Reading test and train data + subjects + activity = 6 files in total train <- fread("X_train.txt") trainsubj <-fread("subject_train.txt") trainact <-fread("y_train.txt") test <- fread("X_test.txt") testsubj <-fread("subject_test.txt") testact <-fread("y_test...
/run_analysis.R
no_license
tolulopeadeniji86/assignment3
R
false
false
1,998
r
library(data.table) library(dplyr) ## fastest file reading. Reading test and train data + subjects + activity = 6 files in total train <- fread("X_train.txt") trainsubj <-fread("subject_train.txt") trainact <-fread("y_train.txt") test <- fread("X_test.txt") testsubj <-fread("subject_test.txt") testact <-fread("y_test...
#fonction indicatrice de {x^2 + y^2 <= 1} f <- function(x,y){ if (x^2 + y^2 <= 1) 1 else 0 } #simuler suivant l'uniforme sur un carre U[0,1]^2 n = 1000 u = runif(n) v = runif(n) #estimer pi comme la moyenne des f(u_i) delta = 0 for ( i in 1:n){ for(j in 1:n){ delta <- delta + f(u[i], v[j]) } } delta <...
/exo10_bis.R
no_license
zakaryael/tp_monte_carlo
R
false
false
341
r
#fonction indicatrice de {x^2 + y^2 <= 1} f <- function(x,y){ if (x^2 + y^2 <= 1) 1 else 0 } #simuler suivant l'uniforme sur un carre U[0,1]^2 n = 1000 u = runif(n) v = runif(n) #estimer pi comme la moyenne des f(u_i) delta = 0 for ( i in 1:n){ for(j in 1:n){ delta <- delta + f(u[i], v[j]) } } delta <...
skip_on_cran() oldtz <- Sys.getenv('TZ', unset = NA) Sys.setenv(TZ = 'UTC') tests.home <- getwd() setwd(tempdir()) test_that("loadBio stops if arguments or file are missing", { # Missing arguments expect_error(loadBio(), "'input' is missing.", fixed = TRUE) expect_error(loadBio(input = "test"), "'tz' is ...
/tests/testthat/test_loadBio.R
no_license
cran/actel
R
false
false
9,151
r
skip_on_cran() oldtz <- Sys.getenv('TZ', unset = NA) Sys.setenv(TZ = 'UTC') tests.home <- getwd() setwd(tempdir()) test_that("loadBio stops if arguments or file are missing", { # Missing arguments expect_error(loadBio(), "'input' is missing.", fixed = TRUE) expect_error(loadBio(input = "test"), "'tz' is ...
print(summary); cost=cost*4; for(i in 1:3){ print(i); control=Weka_control("cost-matrix"=matrix(c(0,cost,1,0),ncol=2), W="weka.classifiers.functions.SimpleLogistic"); classifier<-CostSensitiveClassifier(class~.,data=trainData, control=control); results<-evaluate_Weka_classifier(classifier, numFolds=10) confMx<-r...
/src/scenarioRRC.finish.r
no_license
google-code/12l-mow
R
false
false
752
r
print(summary); cost=cost*4; for(i in 1:3){ print(i); control=Weka_control("cost-matrix"=matrix(c(0,cost,1,0),ncol=2), W="weka.classifiers.functions.SimpleLogistic"); classifier<-CostSensitiveClassifier(class~.,data=trainData, control=control); results<-evaluate_Weka_classifier(classifier, numFolds=10) confMx<-r...
FitSurvRec <- function (formula, data, type = "pena-strawderman-hollander", ...) { method <- charmatch(type, c("pena-strawderman-hollander", "wang-chang", "MLEfrailty"), nomatch = 0) if (method == 0) { stop("Estimator must be pena-strawderman-hollander, wang-c...
/R/FitSurvRec.R
no_license
cran/newTestSurvRec
R
false
false
1,717
r
FitSurvRec <- function (formula, data, type = "pena-strawderman-hollander", ...) { method <- charmatch(type, c("pena-strawderman-hollander", "wang-chang", "MLEfrailty"), nomatch = 0) if (method == 0) { stop("Estimator must be pena-strawderman-hollander, wang-c...
############################# Partial ############################# ############################# Normal ############################# source("Partial/Normal plants/Functions.r") ca <- 400 pkx <- 0.95 wL <- 0.18 wLL <- wLLf(wL, ca) f1 <- Vectorize(function(w)gsmaxfm(w, wL)) f2 <- Vectorize(function(w)gswLf(w, wL, c...
/Partial/Normal plants/Check - Inversefunction.r
no_license
YaojieLu/Xylem-damage
R
false
false
854
r
############################# Partial ############################# ############################# Normal ############################# source("Partial/Normal plants/Functions.r") ca <- 400 pkx <- 0.95 wL <- 0.18 wLL <- wLLf(wL, ca) f1 <- Vectorize(function(w)gsmaxfm(w, wL)) f2 <- Vectorize(function(w)gswLf(w, wL, c...
Explicar más el comando, como llenar por filas, selección de elementos, array, nombres de filas y columnas 4.4 Antes debería estar FACTORES Indicar cómo extraer y agregar columnas 4.5 El listado mezcla muchas cosas, si no están explicadas me parece que no tiene mucho sentido Ejercitación Por qué pregunta si se...
/Observaciones.R
no_license
estadistica-aplicada/IntroduccionSoftwareR
R
false
false
2,024
r
Explicar más el comando, como llenar por filas, selección de elementos, array, nombres de filas y columnas 4.4 Antes debería estar FACTORES Indicar cómo extraer y agregar columnas 4.5 El listado mezcla muchas cosas, si no están explicadas me parece que no tiene mucho sentido Ejercitación Por qué pregunta si se...
## ============================================================================= ## Mapping, sections, selection ## ============================================================================= remap <- function(var, ...) UseMethod ("remap") extract <- function(var, ...) UseMethod ("extract") changeres <- function...
/R/map3D.R
no_license
cran/OceanView
R
false
false
19,525
r
## ============================================================================= ## Mapping, sections, selection ## ============================================================================= remap <- function(var, ...) UseMethod ("remap") extract <- function(var, ...) UseMethod ("extract") changeres <- function...
# download file fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(fileUrl, destfile = "./household_power_consumption.zip", method = "curl") # read file df <- read.csv(unz("household_power_consumption.zip", "household_power_consumption.txt"), sep = ";", str...
/plot2.R
no_license
andylytics/ExData_Plotting1
R
false
false
920
r
# download file fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(fileUrl, destfile = "./household_power_consumption.zip", method = "curl") # read file df <- read.csv(unz("household_power_consumption.zip", "household_power_consumption.txt"), sep = ";", str...
numPerPatch35890 <- c(2557,2443)
/NatureEE-data-archive/Run203021/JAFSdata/JAFSnumPerPatch35890.R
no_license
flaxmans/NatureEE2017
R
false
false
33
r
numPerPatch35890 <- c(2557,2443)
## Importing packages # This R environment comes with all of CRAN and many other helpful packages preinstalled. # You can see which packages are installed by checking out the kaggle/rstats docker image: # https://github.com/kaggle/docker-rstats library(tidyverse) # metapackage with lots of helpful functions ## Run...
/src/r/kernels/iherbert-titanic/script/titanic.r
no_license
PRL-PRG/trustworthy-titanic
R
false
false
26,238
r
## Importing packages # This R environment comes with all of CRAN and many other helpful packages preinstalled. # You can see which packages are installed by checking out the kaggle/rstats docker image: # https://github.com/kaggle/docker-rstats library(tidyverse) # metapackage with lots of helpful functions ## Run...
library(R.matlab) library(ggplot2) library(PupillometryR) library(visreg) PredictionFolder = '/Users/zaixucui/Documents/projects/pncSingleFuncParcel_psychopathology/Replication/results/PLSr1/AtlasLoading'; # Actual accuracy Prediction_Res = readMat(paste0(PredictionFolder, '/PsychosisCorrtraits_All_RegressCovariates_...
/Step_5th_PLSr1_Corrtraits/Step_3rd_Scatter_Psychosis.R
no_license
SaqibMamoon/pncsinglefuncparcel_psychopathology
R
false
false
3,996
r
library(R.matlab) library(ggplot2) library(PupillometryR) library(visreg) PredictionFolder = '/Users/zaixucui/Documents/projects/pncSingleFuncParcel_psychopathology/Replication/results/PLSr1/AtlasLoading'; # Actual accuracy Prediction_Res = readMat(paste0(PredictionFolder, '/PsychosisCorrtraits_All_RegressCovariates_...
flexrsurv.ll <- function(formula=formula(data), data=parent.frame(), # knots.Bh and degree.Bh allow to define the Baseline Hazard knots.Bh=NULL, degree.Bh=3, Spline=c("b-spline","tp-spline","tpi-spline"), # tp-spline for truncated power basis log.Bh=FALSE, bhlink=c("log", "identity"), Min_T...
/R/flexrsurv.ll.R
no_license
cran/flexrsurv
R
false
false
10,785
r
flexrsurv.ll <- function(formula=formula(data), data=parent.frame(), # knots.Bh and degree.Bh allow to define the Baseline Hazard knots.Bh=NULL, degree.Bh=3, Spline=c("b-spline","tp-spline","tpi-spline"), # tp-spline for truncated power basis log.Bh=FALSE, bhlink=c("log", "identity"), Min_T...
################################################################################ # File upload page # # Author: Lathan Liou # Created: Mon Sep 21 15:02:57 2020 ------------------------------ ################################################################################ fluidPage( fluidRow( h1("User Guide"), ...
/src/file_upload.R
no_license
latlio/onlineFDRstream
R
false
false
6,767
r
################################################################################ # File upload page # # Author: Lathan Liou # Created: Mon Sep 21 15:02:57 2020 ------------------------------ ################################################################################ fluidPage( fluidRow( h1("User Guide"), ...
library("caret") library(corrplot) library(C50) library(dummies) library(gmodels) library(Metrics) library(neuralnet) library(plyr) library(rpart) library(tree) library(e1071) library(rpart.plot) library(fastDummies) ################################## Load Files ############################################# x <- read...
/0-Implementation/R Files/NN/League/Ligue 1/15-16.R
no_license
Chanter08/Thesis
R
false
false
6,917
r
library("caret") library(corrplot) library(C50) library(dummies) library(gmodels) library(Metrics) library(neuralnet) library(plyr) library(rpart) library(tree) library(e1071) library(rpart.plot) library(fastDummies) ################################## Load Files ############################################# x <- read...
# I-button data FunCaB plots library(ggplot2) read.ibutton<-function(file){ ibut<-read.csv(file, header=FALSE, skip = 20, fill=TRUE) names(ibut)<-c("datetime", "C", "temp") #give names to columns ibut$C<-NULL # setting C column to null ibut$datetime<- as.POSIXct(ibut$datetime, tz=...
/Climate/R_functions/Ibutton_data.R
no_license
ingealthuizen/FunCaB
R
false
false
1,967
r
# I-button data FunCaB plots library(ggplot2) read.ibutton<-function(file){ ibut<-read.csv(file, header=FALSE, skip = 20, fill=TRUE) names(ibut)<-c("datetime", "C", "temp") #give names to columns ibut$C<-NULL # setting C column to null ibut$datetime<- as.POSIXct(ibut$datetime, tz=...
## Concatenate the data tables row-wise dSub <- rbind(dSubTrain, dSubTest) dAct<- rbind(dActTrain, dActTest) dFea<- rbind(dFeaTrain, dFeaTest) ## Set names to variables names(dSub)<-c("subject") names(dAct)<- c("activity") dFeaNames <- read.table(file.path(prf, "features.txt"),head=FALSE) names(dFea)<- dFeaNames$V2 #...
/run_analysis.R
no_license
adi11m/Getting-and-Cleaning-Data
R
false
false
1,379
r
## Concatenate the data tables row-wise dSub <- rbind(dSubTrain, dSubTest) dAct<- rbind(dActTrain, dActTest) dFea<- rbind(dFeaTrain, dFeaTest) ## Set names to variables names(dSub)<-c("subject") names(dAct)<- c("activity") dFeaNames <- read.table(file.path(prf, "features.txt"),head=FALSE) names(dFea)<- dFeaNames$V2 #...
############## # Initializing # tips: ctrl + shft + c: comment selected lines # refer for plotting: https://www.statmethods.net/advgraphs/parameters.html ############## rm(list = ls()) library(plyr) library(readr) library(scales) library(plyr) library(conicfit) #library(concaveman) library(geometry) library(retistruct...
/Source_code_tools_used/02_tools/15_Distribution/test_inc_distribution2.R
no_license
WU-UAV-LiKang/src
R
false
false
6,010
r
############## # Initializing # tips: ctrl + shft + c: comment selected lines # refer for plotting: https://www.statmethods.net/advgraphs/parameters.html ############## rm(list = ls()) library(plyr) library(readr) library(scales) library(plyr) library(conicfit) #library(concaveman) library(geometry) library(retistruct...
findDistance <- function( a, b , method ){ distance = stringdist(a,b, method = method) distance } source findDistancesFromCorpus <- function(corpus , method){ distances = c() for ( i in 1 : length(corpus)) { #extract string from plaintextdocument from corpus a = as.character(corpus[[i]]) dist = c() for( j i...
/findCompanyNames/distanceFunctionsNoTri.R
no_license
abishek-ahluwalia/archive-assignments
R
false
false
589
r
findDistance <- function( a, b , method ){ distance = stringdist(a,b, method = method) distance } source findDistancesFromCorpus <- function(corpus , method){ distances = c() for ( i in 1 : length(corpus)) { #extract string from plaintextdocument from corpus a = as.character(corpus[[i]]) dist = c() for( j i...
PrintFraudModelResult = function(MerchCat, # 1st param for API Pin, # 2nd param for API Fraud, # 3rd param for API - Not Used NEMVTxCnt, # 4th param for API ...
/SourceCode/R/BackUp20Sept/CCFraudRShinyApp/Azure/AZURE_CreditCardFraud_APICall_withParams.r
no_license
JackDaedalus/DBS_FinalProject
R
false
false
5,690
r
PrintFraudModelResult = function(MerchCat, # 1st param for API Pin, # 2nd param for API Fraud, # 3rd param for API - Not Used NEMVTxCnt, # 4th param for API ...
#' Replace code from an rmarkdown document as a vector of lines #' #' @param lines A character vector of lines from an Rmarkdown document #' which will be parsed and have included code chunks selectively replaced. #' @param replace_flags A character vector of code chunk options #' that if set to TRUE will have ...
/R/replace_code_chunks.R
permissive
AlexsLemonade/exrcise
R
false
false
4,141
r
#' Replace code from an rmarkdown document as a vector of lines #' #' @param lines A character vector of lines from an Rmarkdown document #' which will be parsed and have included code chunks selectively replaced. #' @param replace_flags A character vector of code chunk options #' that if set to TRUE will have ...
#:# libraries library(digest) library(mlr) library(OpenML) library(farff) #:# config set.seed(1) #:# data dataset <- getOMLDataSet(data.name = "bodyfat") head(dataset$data) #:# preprocessing head(dataset$data) #:# model task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass") lrn = makeLearn...
/models/openml_bodyfat/classification_binaryClass/196338255d5b74ebf0cacfc0f6485933/code.R
no_license
pysiakk/CaseStudies2019S
R
false
false
686
r
#:# libraries library(digest) library(mlr) library(OpenML) library(farff) #:# config set.seed(1) #:# data dataset <- getOMLDataSet(data.name = "bodyfat") head(dataset$data) #:# preprocessing head(dataset$data) #:# model task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass") lrn = makeLearn...
#### start to translate translate_top2ref <- function(infile = "data/Mexicana_TopStrand_FinalReport.txt", ob=FALSE, mergeid="id", colfrom="RIMME0021.C1.1.1", colto="P12_2"){ ### df: input data.frame, must col: snpid, #### got id of the SNP file: snptab <- read.csv("larg...
/lib/translate_top2ref.R
no_license
yangjl/N2
R
false
false
2,253
r
#### start to translate translate_top2ref <- function(infile = "data/Mexicana_TopStrand_FinalReport.txt", ob=FALSE, mergeid="id", colfrom="RIMME0021.C1.1.1", colto="P12_2"){ ### df: input data.frame, must col: snpid, #### got id of the SNP file: snptab <- read.csv("larg...
\name{ORDER2PARENT-package} \alias{ORDER2PARENT-package} \alias{ORDER2PARENT} \docType{package} \title{ Parent Distribution Estimation with Multiple Order Statistics } \description{ This package can estimate parent distribution nonparametrically when there are observations about multiple order statistics available. The...
/man/ORDER2PARENT-package.Rd
no_license
cran/ORDER2PARENT
R
false
false
682
rd
\name{ORDER2PARENT-package} \alias{ORDER2PARENT-package} \alias{ORDER2PARENT} \docType{package} \title{ Parent Distribution Estimation with Multiple Order Statistics } \description{ This package can estimate parent distribution nonparametrically when there are observations about multiple order statistics available. The...
#Decision Tree #Decision ---> Binary ---> 0/1 or Yes/No or This/That #Decision tree based on binary is done by CART(Classification And Regression Tree) library(rpart) library(rpart.plot) education=factor(c(3,2,2,3,2,2,3,2,2,2)) married=factor(c('S','M','S','M','M','M','S','S','M','S')) income=c(125,100,70, 120, 95, ...
/Decision tree1.R
no_license
sudarshansawal/analytics
R
false
false
865
r
#Decision Tree #Decision ---> Binary ---> 0/1 or Yes/No or This/That #Decision tree based on binary is done by CART(Classification And Regression Tree) library(rpart) library(rpart.plot) education=factor(c(3,2,2,3,2,2,3,2,2,2)) married=factor(c('S','M','S','M','M','M','S','S','M','S')) income=c(125,100,70, 120, 95, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/text.R \name{add_text_posthoc} \alias{add_text_posthoc} \title{Results of the post hoc tests for manuscript text} \usage{ add_text_posthoc(data) } \arguments{ \item{data}{tbl. Data frame with results of the posthoc test} } \value{ list. A lis...
/man/add_text_posthoc.Rd
permissive
januz/comsldpsy-1
R
false
true
452
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/text.R \name{add_text_posthoc} \alias{add_text_posthoc} \title{Results of the post hoc tests for manuscript text} \usage{ add_text_posthoc(data) } \arguments{ \item{data}{tbl. Data frame with results of the posthoc test} } \value{ list. A lis...
### The main plotting function ### plotVerseContinuous = function( verse, tight = T, save.plot = T, plot.beat.type=T, plot.accent = T, plot.rhymeClasses = F, plot.rhymeFeatures=T, black_and_white=T, m.range = NA, row.index=NA, closeScreen = F, Width=4.5, Meas.height=.75) { ###---Initial data processing-...
/Scripts/PlottingScripts/PlotVerseContinuous.r
no_license
mohriner/flowBook
R
false
false
8,333
r
### The main plotting function ### plotVerseContinuous = function( verse, tight = T, save.plot = T, plot.beat.type=T, plot.accent = T, plot.rhymeClasses = F, plot.rhymeFeatures=T, black_and_white=T, m.range = NA, row.index=NA, closeScreen = F, Width=4.5, Meas.height=.75) { ###---Initial data processing-...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/evaluation.R \name{SMAPE} \alias{SMAPE} \title{Symmetric mean absolute percentage error} \usage{ SMAPE(x, truth) } \arguments{ \item{x}{Forecast values} \item{truth}{Real values} } \description{ Symmetric mean absolute percentage error }
/man/SMAPE.Rd
permissive
Mamie/PILAF
R
false
true
317
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/evaluation.R \name{SMAPE} \alias{SMAPE} \title{Symmetric mean absolute percentage error} \usage{ SMAPE(x, truth) } \arguments{ \item{x}{Forecast values} \item{truth}{Real values} } \description{ Symmetric mean absolute percentage error }
/HW5/homework5_JR.R
no_license
jey1987/DATA621
R
false
false
5,308
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/docs_bulk.r \name{docs_bulk} \alias{docs_bulk} \title{Use the bulk API to create, index, update, or delete documents.} \usage{ docs_bulk( conn, x, index = NULL, type = NULL, chunk_size = 1000, doc_ids = NULL, es_ids = TRUE, ra...
/man/docs_bulk.Rd
no_license
cran/elastic
R
false
true
10,397
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/docs_bulk.r \name{docs_bulk} \alias{docs_bulk} \title{Use the bulk API to create, index, update, or delete documents.} \usage{ docs_bulk( conn, x, index = NULL, type = NULL, chunk_size = 1000, doc_ids = NULL, es_ids = TRUE, ra...
library(quanteda) library(data.table) library(readr) library(dtplyr) library(stringr) library(stringi) rm(list=ls()) load('toks.rds') bigram<-tokens_ngrams(toks,n=2,concatenator = ' ') bitokdf<-data.table(token=unname(unlist(bigram)),freq=1) bidf<-bitokdf[,.(freq=sum(freq)),keyby=token] rm(bitokdf) bitokens<-strspl...
/ngrams.R
no_license
sandeepthetechie/Next-Word-Prediction
R
false
false
2,847
r
library(quanteda) library(data.table) library(readr) library(dtplyr) library(stringr) library(stringi) rm(list=ls()) load('toks.rds') bigram<-tokens_ngrams(toks,n=2,concatenator = ' ') bitokdf<-data.table(token=unname(unlist(bigram)),freq=1) bidf<-bitokdf[,.(freq=sum(freq)),keyby=token] rm(bitokdf) bitokens<-strspl...
/Statistic/Non_parametric/Aligned_Rank_Transform.R
no_license
isacmendes/Gerador_R
R
false
false
10,038
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/updatePostableSessions.R \name{updatePosdataSession} \alias{updatePosdataSession} \title{Manually update the session id link between the postable and the rest of the tables} \usage{ updatePosdataSession() } \description{ This runs a function ...
/seatrackR/man/updatePosdataSession.Rd
no_license
NINAnor/seatrack-db
R
false
true
798
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/updatePostableSessions.R \name{updatePosdataSession} \alias{updatePosdataSession} \title{Manually update the session id link between the postable and the rest of the tables} \usage{ updatePosdataSession() } \description{ This runs a function ...
library(ISLR) names(Smarket) library(MASS) train=(Smarket$Year<2005) Smarket.2005 = Smarket[!train,] #lda lda.fit = lda(Direction ~ Lag1 + Lag2, data = Smarket,data = Smarket, subset = train) lda.fit lda.pred = predict(lda.fit, Smarket.2005) names(lda.pred) lda.class = lda.pred$class table(lda.class,Directio...
/Smarket/Smarket_lda_qda.R
no_license
smatrix017/Data-Science
R
false
false
710
r
library(ISLR) names(Smarket) library(MASS) train=(Smarket$Year<2005) Smarket.2005 = Smarket[!train,] #lda lda.fit = lda(Direction ~ Lag1 + Lag2, data = Smarket,data = Smarket, subset = train) lda.fit lda.pred = predict(lda.fit, Smarket.2005) names(lda.pred) lda.class = lda.pred$class table(lda.class,Directio...
d = data.frame(x=1:10, y=1:10, z=1:10) save(d, file="data/lq.Rdata")
/parse_lq.R
no_license
aibi95/hw4
R
false
false
69
r
d = data.frame(x=1:10, y=1:10, z=1:10) save(d, file="data/lq.Rdata")
#' @useDynLib FlyingR #' @importFrom Rcpp evalCpp #' @exportPattern "^[[:alpha:]]+" NULL
/FlyingR/R/FlyingR.R
no_license
akhikolla/InformationHouse
R
false
false
89
r
#' @useDynLib FlyingR #' @importFrom Rcpp evalCpp #' @exportPattern "^[[:alpha:]]+" NULL
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/jamgraph-edgebundle.R \name{edge_bundle_nodegroups} \alias{edge_bundle_nodegroups} \title{Bundle edges using node groups} \usage{ edge_bundle_nodegroups( g, nodegroups, shape = NULL, params = NULL, midpoint = 0.5, detail = 10, d...
/man/edge_bundle_nodegroups.Rd
no_license
jmw86069/multienrichjam
R
false
true
9,458
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/jamgraph-edgebundle.R \name{edge_bundle_nodegroups} \alias{edge_bundle_nodegroups} \title{Bundle edges using node groups} \usage{ edge_bundle_nodegroups( g, nodegroups, shape = NULL, params = NULL, midpoint = 0.5, detail = 10, d...
#' Block Version of silentPairs for causality scores with control variables #' #' Allowing input matrix of control variables and missing data, this function produces a #' 3 column matrix summarizing the results where the estimated signs of #' stochastic dominance order values (+1, 0, -1) are weighted by #' \cod...
/R/siPairsBlk.R
no_license
cran/generalCorr
R
false
false
8,511
r
#' Block Version of silentPairs for causality scores with control variables #' #' Allowing input matrix of control variables and missing data, this function produces a #' 3 column matrix summarizing the results where the estimated signs of #' stochastic dominance order values (+1, 0, -1) are weighted by #' \cod...