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
#' @title Calculate Intermediate MVN Correlation for Ordinal - Negative Binomial Variables: Method 1 #' #' @description This function calculates a \code{k_cat x k_nb} intermediate matrix of correlations for the k_cat ordinal (r >= #' 2 categories) and k_nb Negative Binomial variables. It extends the method of Amaty...
/R/findintercorr_cat_nb.R
no_license
guhjy/SimMultiCorrData
R
false
false
4,159
r
#' @title Calculate Intermediate MVN Correlation for Ordinal - Negative Binomial Variables: Method 1 #' #' @description This function calculates a \code{k_cat x k_nb} intermediate matrix of correlations for the k_cat ordinal (r >= #' 2 categories) and k_nb Negative Binomial variables. It extends the method of Amaty...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/macrods-package.R \docType{data} \name{SW2002} \alias{SW2002} \title{US macroeconomic data set from Stock and Watson (2002)} \format{A list with the following: \describe{ \item{rawdata:}{The raw dataset as a matrix where the columns...
/man/SW2002.Rd
no_license
johannestang/macrods
R
false
false
1,091
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/macrods-package.R \docType{data} \name{SW2002} \alias{SW2002} \title{US macroeconomic data set from Stock and Watson (2002)} \format{A list with the following: \describe{ \item{rawdata:}{The raw dataset as a matrix where the columns...
MASE_nonseasonal=function(Y,For,epsilon=10^-5,NonDuplicatedForecasts=TRUE){ # \title{ # MASE_nonseasonal # } # \description{ # Mean absolute scaled error (MASE) # } # \usage{ # MASE_nonseasonal(Y,For) # } # %- maybe also 'usage' for other objects documented here. # \arguments{ # \item{Y}...
/R/MASE_nonseasonal.R
no_license
Mthrun/TSAT
R
false
false
2,815
r
MASE_nonseasonal=function(Y,For,epsilon=10^-5,NonDuplicatedForecasts=TRUE){ # \title{ # MASE_nonseasonal # } # \description{ # Mean absolute scaled error (MASE) # } # \usage{ # MASE_nonseasonal(Y,For) # } # %- maybe also 'usage' for other objects documented here. # \arguments{ # \item{Y}...
####---------------------------------- # This script adds the rainfall data and CWA # (county warning area) code from # Cooperman (2017)'s dataset. ####---------------------------------- # load Cooperman's dataset source("script/cooperman.R") get_weather <- function(df, year){ # This function matches the r...
/script/archive/03_match_weather.R
no_license
amikami102/rainfall_and_voterturnout
R
false
false
1,253
r
####---------------------------------- # This script adds the rainfall data and CWA # (county warning area) code from # Cooperman (2017)'s dataset. ####---------------------------------- # load Cooperman's dataset source("script/cooperman.R") get_weather <- function(df, year){ # This function matches the r...
% Generated by roxygen2 (4.0.0): do not edit by hand \name{geom_boxplot} \alias{geom_boxplot} \title{Box and whiskers plot.} \usage{ geom_boxplot(mapping = NULL, data = NULL, stat = "boxplot", position = "dodge", outlier.colour = NULL, outlier.shape = NULL, outlier.size = NULL, notch = FALSE, notchwidth = 0.5, va...
/man/geom_boxplot.Rd
no_license
beamgau/ggplot2
R
false
false
5,505
rd
% Generated by roxygen2 (4.0.0): do not edit by hand \name{geom_boxplot} \alias{geom_boxplot} \title{Box and whiskers plot.} \usage{ geom_boxplot(mapping = NULL, data = NULL, stat = "boxplot", position = "dodge", outlier.colour = NULL, outlier.shape = NULL, outlier.size = NULL, notch = FALSE, notchwidth = 0.5, va...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/micro_forest.R \name{micro_forest} \alias{micro_forest} \title{Create forest plots from negative binomial taxa models} \usage{ micro_forest( modsum, ..., main, ylab, xlab, subtitle, legend_title, legend_labs ) } \arguments{ \i...
/man/micro_forest.Rd
no_license
CharlieCarpenter/tidyMicro
R
false
true
1,537
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/micro_forest.R \name{micro_forest} \alias{micro_forest} \title{Create forest plots from negative binomial taxa models} \usage{ micro_forest( modsum, ..., main, ylab, xlab, subtitle, legend_title, legend_labs ) } \arguments{ \i...
# DATA <- as.data.frame(rep(as.data.frame(rep(NA,81)),17)) # names(DATA) = list("Iller", 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017) for(sene in c(2017:2002)){ name = paste("D:/Desktop/ciktilar/", sene, sep="") name = paste(name, "_tarımsal.csv", sep="")...
/Sene Bazli.R
no_license
ahmetarca/Organik-Tarim-Verisi-Analizi
R
false
false
1,342
r
# DATA <- as.data.frame(rep(as.data.frame(rep(NA,81)),17)) # names(DATA) = list("Iller", 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017) for(sene in c(2017:2002)){ name = paste("D:/Desktop/ciktilar/", sene, sep="") name = paste(name, "_tarımsal.csv", sep="")...
# makeCacheMatrix creates a list containing a function to # 1. set the value of the matrix # 2. get the value of the matrix # 3. set the value of inverse of the matrix # 4. get the value of inverse of the matrix makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { ...
/cachematrix.R
no_license
ismaas2017/ProgrammingAssignment2
R
false
false
928
r
# makeCacheMatrix creates a list containing a function to # 1. set the value of the matrix # 2. get the value of the matrix # 3. set the value of inverse of the matrix # 4. get the value of inverse of the matrix makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { ...
#' available models #' @param type software type #' @export available_models <- function(type){ if (!(type %in% c("nonmem", "mrgsolve"))) { stop("currently only support mrgsolve and nonmem types") } nonmem_types <- list( one_cmt_iv = "ADVAN1 TRANS2", one_cmt_oral = "ADVAN2 TRANS2", two_cmt_iv =...
/R/available_models.R
no_license
dpastoor/blueprint
R
false
false
1,058
r
#' available models #' @param type software type #' @export available_models <- function(type){ if (!(type %in% c("nonmem", "mrgsolve"))) { stop("currently only support mrgsolve and nonmem types") } nonmem_types <- list( one_cmt_iv = "ADVAN1 TRANS2", one_cmt_oral = "ADVAN2 TRANS2", two_cmt_iv =...
#' Merge data into SQL database #' #' @author Alexey Shiklomanov <ashiklom@bu.edu> #' @param db dplyr \code{src_*} object #' @param table Name of table, as character #' @param values \code{data.frame} #' @param by Character vector of column names to use for the merge #' @param id_colname Column name for the database ID...
/R/db_merge_into.R
no_license
ashiklom/dbhelpers
R
false
false
3,445
r
#' Merge data into SQL database #' #' @author Alexey Shiklomanov <ashiklom@bu.edu> #' @param db dplyr \code{src_*} object #' @param table Name of table, as character #' @param values \code{data.frame} #' @param by Character vector of column names to use for the merge #' @param id_colname Column name for the database ID...
# Global Environment Setup ------------------------------------------------ rm(list=ls()) library(kernlab) data("spam") #perform the susb sampling set.seed(3435) trainIndicator <- rbinom(4601, size = 1, prob = 0.5) table(trainIndicator) # trainIndicator # 0 1 # 2314 2287 trainSpam <- spam[trainIndicator ==...
/spamOrHam.R
no_license
NicolasMorenoAndrade/DataScienceScripts
R
false
false
2,085
r
# Global Environment Setup ------------------------------------------------ rm(list=ls()) library(kernlab) data("spam") #perform the susb sampling set.seed(3435) trainIndicator <- rbinom(4601, size = 1, prob = 0.5) table(trainIndicator) # trainIndicator # 0 1 # 2314 2287 trainSpam <- spam[trainIndicator ==...
#' @title A function to get the neighbor information #' @description This fucntion gathers information of all neighborhoods of the #' \code{Xu} observations found in \code{Xr}. This information is equired during #' local regressions. #' @details #' For local pca and pls distances, the local dissimilarity matrices are n...
/R/local_helpers.R
no_license
seamonki/resemble
R
false
false
27,627
r
#' @title A function to get the neighbor information #' @description This fucntion gathers information of all neighborhoods of the #' \code{Xu} observations found in \code{Xr}. This information is equired during #' local regressions. #' @details #' For local pca and pls distances, the local dissimilarity matrices are n...
# # ctl.image.R # # copyright (c) 2010-2012 - GBIC, Danny Arends, Bruno Tesson and Ritsert C. Jansen # last modified Oct, 2012 # first written Nov, 2010 # # Image plot routines for CTL analysis # image.CTLobject <- function(x, marker_info, against = c("markers","phenotypes"), significance = 0.05, col=whiteb...
/R/ctl.image.R
no_license
cran/ctl
R
false
false
2,937
r
# # ctl.image.R # # copyright (c) 2010-2012 - GBIC, Danny Arends, Bruno Tesson and Ritsert C. Jansen # last modified Oct, 2012 # first written Nov, 2010 # # Image plot routines for CTL analysis # image.CTLobject <- function(x, marker_info, against = c("markers","phenotypes"), significance = 0.05, col=whiteb...
makeCacheMatrix <- function(x = matrix(0)) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setsolve <- function(solve) m <<- solve getsolve <- function() m list(set = set, get = get, setsolve =...
/makeCacheMatrix.R
no_license
chopstick1992/ProgrammingAssignment2
R
false
false
366
r
makeCacheMatrix <- function(x = matrix(0)) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setsolve <- function(solve) m <<- solve getsolve <- function() m list(set = set, get = get, setsolve =...
library(metaplot) ### Name: corsplom_data_frame ### Title: Correlated Scatterplot Matrix Function for Data Frame ### Aliases: corsplom_data_frame ### ** Examples library(magrittr) library(dplyr) library(csv) x <- as.csv(system.file(package = 'metaplot', 'extdata/theoph.csv')) x %<>% pack # setOption(gg = TRUE) x %...
/data/genthat_extracted_code/metaplot/examples/corsplom_data_frame.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
473
r
library(metaplot) ### Name: corsplom_data_frame ### Title: Correlated Scatterplot Matrix Function for Data Frame ### Aliases: corsplom_data_frame ### ** Examples library(magrittr) library(dplyr) library(csv) x <- as.csv(system.file(package = 'metaplot', 'extdata/theoph.csv')) x %<>% pack # setOption(gg = TRUE) x %...
#' Return a list of the package's activity #' #' @export #' @param id (character) Package identifier. #' @template paging #' @template args #' @examples \dontrun{ #' # Setup #' ckanr_setup(url = "https://demo.ckan.org/", key = getOption("ckan_demo_key")) #' #' # create a package #' (res <- package_create("owls64")) #' ...
/R/package_activity_list.R
permissive
HawaDawa/ckanr
R
false
false
1,027
r
#' Return a list of the package's activity #' #' @export #' @param id (character) Package identifier. #' @template paging #' @template args #' @examples \dontrun{ #' # Setup #' ckanr_setup(url = "https://demo.ckan.org/", key = getOption("ckan_demo_key")) #' #' # create a package #' (res <- package_create("owls64")) #' ...
RN ENTRADAS SAIDA Numero Idade Pressão KdComida BatimentoCardiaco Glicemia TaxaHormonal Sedentario Chance Diabetico 1 JOVEM ALTA MUITO ALTO ALTA ALTA NAO TEM 2 JOVEM NORMAL MUITO ALTO NORMAL ALTA SIM TEM 3 JOVEM BAIXA MUITO ALTO BAIXO NORMAL NAO NAO TEM 4 JOVEM ALTA POUCO NORMAL NORMAL NORMAL SIM NAO TEM 5 JOVEM ...
/app/src/main/java/br/com/mfelipesp/diabetefuzzy/regraNebulosa.rd
no_license
MarcosiOSdev/Android_Diabete-Fuzzy
R
false
false
1,592
rd
RN ENTRADAS SAIDA Numero Idade Pressão KdComida BatimentoCardiaco Glicemia TaxaHormonal Sedentario Chance Diabetico 1 JOVEM ALTA MUITO ALTO ALTA ALTA NAO TEM 2 JOVEM NORMAL MUITO ALTO NORMAL ALTA SIM TEM 3 JOVEM BAIXA MUITO ALTO BAIXO NORMAL NAO NAO TEM 4 JOVEM ALTA POUCO NORMAL NORMAL NORMAL SIM NAO TEM 5 JOVEM ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/categorize.R \name{make_categories} \alias{make_categories} \title{Make 'optimal' categories for a set of positions} \usage{ make_categories( positions, min.iter = positions[agent.id > 1, min(id)], max.iter = positions[, max(id)], pac...
/man/make_categories.Rd
no_license
balachia/pcPack
R
false
true
839
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/categorize.R \name{make_categories} \alias{make_categories} \title{Make 'optimal' categories for a set of positions} \usage{ make_categories( positions, min.iter = positions[agent.id > 1, min(id)], max.iter = positions[, max(id)], pac...
\name{clipplot} \alias{clipplot} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Clip plotting to a rectangular region } \description{ Clip plotting to a rectangular region that is a subset of the plotting area } \usage{ clipplot(fun, xlim = par("usr")[1:2], ylim = par("usr")[3:4]) } ...
/man/clipplot.Rd
no_license
svats2k/TeachingDemos
R
false
false
2,592
rd
\name{clipplot} \alias{clipplot} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Clip plotting to a rectangular region } \description{ Clip plotting to a rectangular region that is a subset of the plotting area } \usage{ clipplot(fun, xlim = par("usr")[1:2], ylim = par("usr")[3:4]) } ...
# Check the potential evaluation tool devtools::load_all() library(spatstat) data(lansing) x <- lansing if(!exists("Q")){ p <- 6 # we have six species rv <- c(0.05, 0.1, 0.2) # use this for everything r1 <- rep( list(rv) , p) # intra-type interaction ranges r2 <- rep( list(rv), p * (p-1)/2) # inter-type Q ...
/tests/3-eval-est-potential.R
no_license
antiphon/PenGE
R
false
false
1,352
r
# Check the potential evaluation tool devtools::load_all() library(spatstat) data(lansing) x <- lansing if(!exists("Q")){ p <- 6 # we have six species rv <- c(0.05, 0.1, 0.2) # use this for everything r1 <- rep( list(rv) , p) # intra-type interaction ranges r2 <- rep( list(rv), p * (p-1)/2) # inter-type Q ...
.gaussMix <- function(ndvi, components=2:4){ days <- length(ndvi) ndvi.interpol <- .linIP(ndvi) time <- which(!is.na(ndvi)) ndvi <- ndvi[time] #calculate gaussian function Gm <- function(mu, sig, scal, base, time, days){ erg <- ((scal / (sig * sqrt(2 * pi)))* exp(-0.5*((((time/days) - (mu/days)) / si...
/R/gaussMix.R
no_license
cran/phenex
R
false
false
1,626
r
.gaussMix <- function(ndvi, components=2:4){ days <- length(ndvi) ndvi.interpol <- .linIP(ndvi) time <- which(!is.na(ndvi)) ndvi <- ndvi[time] #calculate gaussian function Gm <- function(mu, sig, scal, base, time, days){ erg <- ((scal / (sig * sqrt(2 * pi)))* exp(-0.5*((((time/days) - (mu/days)) / si...
add2 <- function(x, y) { x+y } above10 <- function(x) { use <- x > 10 #Will return a logical vector with T and F indicating which element is greater than 10 x[use] #Subset vector x with logical vector } above <- function(x, n = 10){ #User can decide the numeric limit for subsetting the vector ...
/Test_FirstFunctions.R
no_license
AddisonHJ/C_R_Prog
R
false
false
1,419
r
add2 <- function(x, y) { x+y } above10 <- function(x) { use <- x > 10 #Will return a logical vector with T and F indicating which element is greater than 10 x[use] #Subset vector x with logical vector } above <- function(x, n = 10){ #User can decide the numeric limit for subsetting the vector ...
% Generated by roxygen2 (4.0.2): do not edit by hand \docType{methods} \name{getShapefiles} \alias{getShapefiles} \title{get shapefiles from a web location} \usage{ getShapefiles(.Object) } \arguments{ \item{.Object}{a \code{geoknife} object with a valid WFS url.} } \value{ list of shapefiles for the \code{geoknife} WF...
/man/getShapefiles.Rd
permissive
ayan-usgs/geoknife
R
false
false
613
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \docType{methods} \name{getShapefiles} \alias{getShapefiles} \title{get shapefiles from a web location} \usage{ getShapefiles(.Object) } \arguments{ \item{.Object}{a \code{geoknife} object with a valid WFS url.} } \value{ list of shapefiles for the \code{geoknife} WF...
testlist <- list(id = NULL, id = NULL, booklet_id = c(8168473L, 2127314835L, 171177770L, -1942759639L, -1815221204L, 601253144L, -804651186L, 2094281728L, 860713787L, -971707632L, -1475044502L, 870040598L, -1182814587L, -1415711445L, 1901326755L, -1882837573L, 1340545259L, 1156041943L, 823641812L, -1106109928L, -10...
/dexterMST/inst/testfiles/is_person_booklet_sorted/AFL_is_person_booklet_sorted/is_person_booklet_sorted_valgrind_files/1615939577-test.R
no_license
akhikolla/updatedatatype-list1
R
false
false
826
r
testlist <- list(id = NULL, id = NULL, booklet_id = c(8168473L, 2127314835L, 171177770L, -1942759639L, -1815221204L, 601253144L, -804651186L, 2094281728L, 860713787L, -971707632L, -1475044502L, 870040598L, -1182814587L, -1415711445L, 1901326755L, -1882837573L, 1340545259L, 1156041943L, 823641812L, -1106109928L, -10...
\name{thomas.estK} \alias{thomas.estK} \title{Fit the Thomas Point Process by Minimum Contrast} \description{ Fits the Thomas point process to a point pattern dataset by the Method of Minimum Contrast using the K function. } \usage{ thomas.estK(X, startpar=c(kappa=1,scale=1), lambda=NULL, q = 1/4, p = 2...
/man/thomas.estK.Rd
no_license
chenjiaxun9/spatstat
R
false
false
6,429
rd
\name{thomas.estK} \alias{thomas.estK} \title{Fit the Thomas Point Process by Minimum Contrast} \description{ Fits the Thomas point process to a point pattern dataset by the Method of Minimum Contrast using the K function. } \usage{ thomas.estK(X, startpar=c(kappa=1,scale=1), lambda=NULL, q = 1/4, p = 2...
library(tidyverse) interKeypressInterval <- function() { frame <- read.csv("keyPressDataWithLaneDeviation.csv", header = TRUE) frame <- frame %>% filter(partOfExperiment == "singleDialing2", typingErrorMadeOnTrial == 0, !(pp == 12 & trial == 41), !(pp == 2 & trial == 32), ...
/notebooks/source-code/interKeypressInterval.R
no_license
tintinrevient/cognitive-modeling
R
false
false
1,038
r
library(tidyverse) interKeypressInterval <- function() { frame <- read.csv("keyPressDataWithLaneDeviation.csv", header = TRUE) frame <- frame %>% filter(partOfExperiment == "singleDialing2", typingErrorMadeOnTrial == 0, !(pp == 12 & trial == 41), !(pp == 2 & trial == 32), ...
context("plot map") #set wd to access test accident files in the package setwd(system.file("extdata",package="farsfunctions")) #test fars_map_state - unless there's an error map function only has side effects test_that("state map using fars_map_state", { expect_null(fars_map_state(1, 2016)) #expect to run withou...
/tests/testthat/test_map.R
no_license
jrwalker-projects/farsfunctions
R
false
false
520
r
context("plot map") #set wd to access test accident files in the package setwd(system.file("extdata",package="farsfunctions")) #test fars_map_state - unless there's an error map function only has side effects test_that("state map using fars_map_state", { expect_null(fars_map_state(1, 2016)) #expect to run withou...
# Contributed by John Mount jmount@win-vector.com , ownership assigned to Win-Vector LLC. # Win-Vector LLC currently distributes this code without intellectual property indemnification, warranty, claim of fitness of purpose, or any other guarantee under a GPL3 license. # dplyr::one_of is what is causing us to depend...
/R/rowscols_old.R
no_license
NanaAkwasiAbayieBoateng/replyr
R
false
false
13,724
r
# Contributed by John Mount jmount@win-vector.com , ownership assigned to Win-Vector LLC. # Win-Vector LLC currently distributes this code without intellectual property indemnification, warranty, claim of fitness of purpose, or any other guarantee under a GPL3 license. # dplyr::one_of is what is causing us to depend...
## The functions provided here helps caching an inverse of a matrix ## to avoid expensive computation ## This makeCacheMatrix function creates a matrix object and ## provides set, get, setInverse and getInverse functions in it. makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y...
/cachematrix.R
no_license
correctclick/ProgrammingAssignment2
R
false
false
1,977
r
## The functions provided here helps caching an inverse of a matrix ## to avoid expensive computation ## This makeCacheMatrix function creates a matrix object and ## provides set, get, setInverse and getInverse functions in it. makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y...
#' Order funds #' #' Converts a column of fund name strings to factor in BBMR standardized order #' #' @param df Dataframe with fund column to modify. #' @param col String. Name of the column to with fund names to order, defaults #' to "Fund Name". #' @param before String. Name of a fund to tack on at the beginning, u...
/R/order_funds.R
no_license
dpowerstp/bbmR
R
false
false
1,528
r
#' Order funds #' #' Converts a column of fund name strings to factor in BBMR standardized order #' #' @param df Dataframe with fund column to modify. #' @param col String. Name of the column to with fund names to order, defaults #' to "Fund Name". #' @param before String. Name of a fund to tack on at the beginning, u...
library(BSgenome.Hsapiens.UCSC.hg19) library(GenomicRanges) haplotyper1.9 <- function(basename, haplinks, chromosome){ badviewpoint <- 0 viewpoint_override <- 0 if(is.null(write)){ write <- T } if(class(haplinks)!="data.frame"){ haplinks <- read.table(haplinks) } colnames(haplinks) <- c("var1",...
/haplotyper1.9.2.R
no_license
jiading/MG-NIPD
R
false
false
19,047
r
library(BSgenome.Hsapiens.UCSC.hg19) library(GenomicRanges) haplotyper1.9 <- function(basename, haplinks, chromosome){ badviewpoint <- 0 viewpoint_override <- 0 if(is.null(write)){ write <- T } if(class(haplinks)!="data.frame"){ haplinks <- read.table(haplinks) } colnames(haplinks) <- c("var1",...
jobs <- list() for(i in 1:200) { flush.console() print(i) jobs[[i]] <- Job$new(c("echo hola", "sleep 60"), jobName = paste0("test", i), outDir = "~", time = "02:00", mem = "1G", proc = 1) jobs[[i]]$submit() }
/tests/submitManyJobs.R
no_license
pablo-gar/rSubmitter
R
false
false
235
r
jobs <- list() for(i in 1:200) { flush.console() print(i) jobs[[i]] <- Job$new(c("echo hola", "sleep 60"), jobName = paste0("test", i), outDir = "~", time = "02:00", mem = "1G", proc = 1) jobs[[i]]$submit() }
rm(list=ls(all=TRUE)) library(MASS) library(kernlab) library(caret) set.seed(5678) setwd("~/workspace_scala/Dist_Online_SVM/R") source("paths.R") setwd(magicDir) dtrain<-read.table("magic04train.csv",sep=",",header=FALSE) dim(dtrain) #[1] 9508 12 #The first column contains only the line nr and can be omitted: dtrain...
/R/Magic.R
no_license
jakobgerstenlauer/ScalaSVM
R
false
false
3,835
r
rm(list=ls(all=TRUE)) library(MASS) library(kernlab) library(caret) set.seed(5678) setwd("~/workspace_scala/Dist_Online_SVM/R") source("paths.R") setwd(magicDir) dtrain<-read.table("magic04train.csv",sep=",",header=FALSE) dim(dtrain) #[1] 9508 12 #The first column contains only the line nr and can be omitted: dtrain...
## These two functions (makeCacheMatrix and cacheSolve) are designed to inverte ## a square matrix (provide it is inversible) avoiding to replicate the work if ## the matrix has been alreary inverted. ## ## ## This function will get as an entry the matrix to be inverted and generate ## a list of three functions t...
/cachematrix.R
no_license
hnoliveira/ProgrammingAssignment2
R
false
false
1,127
r
## These two functions (makeCacheMatrix and cacheSolve) are designed to inverte ## a square matrix (provide it is inversible) avoiding to replicate the work if ## the matrix has been alreary inverted. ## ## ## This function will get as an entry the matrix to be inverted and generate ## a list of three functions t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bootpval.R \name{bootpval} \alias{bootpval} \title{a function which uses the bootstrap method to generate a p-value} \usage{ bootpval(x, conf.level = 0.95, iter = 3000, mu0 = 0, test = "two") } \arguments{ \item{x}{a vector of data} \item{co...
/man/bootpval.Rd
permissive
DraperRiley/MATH4753Draper
R
false
true
622
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bootpval.R \name{bootpval} \alias{bootpval} \title{a function which uses the bootstrap method to generate a p-value} \usage{ bootpval(x, conf.level = 0.95, iter = 3000, mu0 = 0, test = "two") } \arguments{ \item{x}{a vector of data} \item{co...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
/r/tests/testthat/test-dplyr-summarize.R
permissive
sighingnow/arrow
R
false
false
19,013
r
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
Skip to content Pull requests Issues Marketplace Explore @serega14736 1 1 1 TIR13/ML0 Code Issues 1 Pull requests 0 Actions Projects 0 Wiki Security Insights ML0/bayes/naiv.R @TIR13 TIR13 Update naiv.R 4fb76ed 28 days ago 73 lines (50 sloc) 1.34 KB objectCounter <- 500 naiv <- function(x, mu, sigma, lamda, P){...
/NaivBaes.R
no_license
serega14736/ML0
R
false
false
1,788
r
Skip to content Pull requests Issues Marketplace Explore @serega14736 1 1 1 TIR13/ML0 Code Issues 1 Pull requests 0 Actions Projects 0 Wiki Security Insights ML0/bayes/naiv.R @TIR13 TIR13 Update naiv.R 4fb76ed 28 days ago 73 lines (50 sloc) 1.34 KB objectCounter <- 500 naiv <- function(x, mu, sigma, lamda, P){...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/calendar.R \name{lastBizDay} \alias{lastBizDay} \title{Return date of last business day for a given month and year} \usage{ lastBizDay(month, year, calendar = "WeekendsOnly") } \arguments{ \item{month}{Month number (can be a vector)} \item{y...
/man/lastBizDay.Rd
no_license
solavrov/fval
R
false
true
531
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/calendar.R \name{lastBizDay} \alias{lastBizDay} \title{Return date of last business day for a given month and year} \usage{ lastBizDay(month, year, calendar = "WeekendsOnly") } \arguments{ \item{month}{Month number (can be a vector)} \item{y...
## Imports ---- library(tidyverse) library(metabeiwe) library(fs) source("./code/utils.R") ## Constants ---- sensors_to_summarize <- c("accelerometer", "gps") cfig <- config::get() u_changes <- cfig$user_changes data_folder <- cfig$strip_folder ## Data ---- user_studies <- readRDS("./data_working/list_of_users_an...
/code/02_summarize_data_files.R
no_license
mkiang/beiwe_missing_data
R
false
false
2,272
r
## Imports ---- library(tidyverse) library(metabeiwe) library(fs) source("./code/utils.R") ## Constants ---- sensors_to_summarize <- c("accelerometer", "gps") cfig <- config::get() u_changes <- cfig$user_changes data_folder <- cfig$strip_folder ## Data ---- user_studies <- readRDS("./data_working/list_of_users_an...
# SimpleWorld.R # Raw code needed to run the SimpleWorld example ind <- read.csv("data/SimpleWorld/ind.csv") class(ind) # verify the data type of the object ind # print the individual-level data con_age <- read.csv("data/SimpleWorld/age.csv") con_sex <- read.csv("data/SimpleWorld/sex.csv") # Convert age into a categ...
/R/SimpleWorld.R
permissive
jcrb/spatial-microsim-book
R
false
false
2,290
r
# SimpleWorld.R # Raw code needed to run the SimpleWorld example ind <- read.csv("data/SimpleWorld/ind.csv") class(ind) # verify the data type of the object ind # print the individual-level data con_age <- read.csv("data/SimpleWorld/age.csv") con_sex <- read.csv("data/SimpleWorld/sex.csv") # Convert age into a categ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/func__getAssocGenePair.R \name{getAssocGenePair} \alias{getAssocGenePair} \title{Find out rows corresponding to alleles of a given pair of genes} \usage{ getAssocGenePair(x, map, g1, g2, col1 = "y", col2 = "x") } \arguments{ \item{x}{A data f...
/man/getAssocGenePair.Rd
permissive
wanyuac/GeneMates
R
false
true
1,052
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/func__getAssocGenePair.R \name{getAssocGenePair} \alias{getAssocGenePair} \title{Find out rows corresponding to alleles of a given pair of genes} \usage{ getAssocGenePair(x, map, g1, g2, col1 = "y", col2 = "x") } \arguments{ \item{x}{A data f...
#' Estimate the three surfaces (for yHat, SE and ConcHat) as a function of DecYear and logQ and store in the three-dimensional object called surfaces #' #' This function uses weighted survival regression to estimate three surfaces that cover the complete range #' of DecYear and log(Q) values in the Daily data set. #' ...
/R/estSurfaces.R
permissive
billpine/EGRET
R
false
false
5,512
r
#' Estimate the three surfaces (for yHat, SE and ConcHat) as a function of DecYear and logQ and store in the three-dimensional object called surfaces #' #' This function uses weighted survival regression to estimate three surfaces that cover the complete range #' of DecYear and log(Q) values in the Daily data set. #' ...
# Intrinio API # # Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://d...
/R/ZacksInstitutionalHoldingHistoricalSummary.r
no_license
intrinio/r-sdk
R
false
false
4,131
r
# Intrinio API # # Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://d...
#' Bin predicted risk for plotting #' #' @inheritParams scalib_gnd #' #' @param x a numeric vector of predicted risk values or an object of #' class `scalib`. If `x` is a `scalib` object, then the input arguments #' `event_time`, `event_status`, and `pred_horizon` should be left blank. #' (They are filled in...
/R/predrisk_bin_segments.R
permissive
bcjaeger/survival.calib
R
false
false
7,400
r
#' Bin predicted risk for plotting #' #' @inheritParams scalib_gnd #' #' @param x a numeric vector of predicted risk values or an object of #' class `scalib`. If `x` is a `scalib` object, then the input arguments #' `event_time`, `event_status`, and `pred_horizon` should be left blank. #' (They are filled in...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_regression.R \name{plot_regression} \alias{plot_regression} \title{Visually Weighted Regression Plot} \usage{ plot_regression(formula, data, B = 1000, shade = TRUE, shade.alpha = 0.1, spag = FALSE, mweight = TRUE, show.lm = FALSE, show...
/man/plot_regression.Rd
no_license
rpatil8/microbiome
R
false
true
2,481
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_regression.R \name{plot_regression} \alias{plot_regression} \title{Visually Weighted Regression Plot} \usage{ plot_regression(formula, data, B = 1000, shade = TRUE, shade.alpha = 0.1, spag = FALSE, mweight = TRUE, show.lm = FALSE, show...
# work on Variability Index # Fabian Yii, Paul Artes rm(list=ls()) #setwd("/Users/fabianyii/Desktop/fy.r/LVPEI-Variability/") setwd("c:/Users/paul_/Google Drive/People_2/Fabian Yii/fy.r/LVPEI-Variability/") # install.packages("devtools") # library(devtools) # install_github("imarinfr/vf1/source") library( "visual...
/LVPEI-Variability/code/vfvar.201108.pha.R
no_license
fyii200/fy.r
R
false
false
2,229
r
# work on Variability Index # Fabian Yii, Paul Artes rm(list=ls()) #setwd("/Users/fabianyii/Desktop/fy.r/LVPEI-Variability/") setwd("c:/Users/paul_/Google Drive/People_2/Fabian Yii/fy.r/LVPEI-Variability/") # install.packages("devtools") # library(devtools) # install_github("imarinfr/vf1/source") library( "visual...
numPerPatch89000 <- c(2510,2490)
/NatureEE-data-archive/Run203121/JAFSdata/JAFSnumPerPatch89000.R
no_license
flaxmans/NatureEE2017
R
false
false
33
r
numPerPatch89000 <- c(2510,2490)
# Figure 8.2 library(copula) set.seed(543) postscript("frank_copulas.ps",width=6,height=6) par(mfrow=c(3,3),cex.axis=1.2,cex.lab=1.2,cex.main=1.2) y = rcopula(frankCopula(-100, dim = 2),200) plot(y,main=expression(paste(theta,"=",-100)), xlab=expression(u[1]),ylab=expression(u[2])) y = rcopula(frank...
/Statistics_and_Data_Analysis_for_Financial_Engineering_AER/RPrograms/Chapter 8/Fig8.2.R
no_license
burakbayramli/books
R
false
false
1,447
r
# Figure 8.2 library(copula) set.seed(543) postscript("frank_copulas.ps",width=6,height=6) par(mfrow=c(3,3),cex.axis=1.2,cex.lab=1.2,cex.main=1.2) y = rcopula(frankCopula(-100, dim = 2),200) plot(y,main=expression(paste(theta,"=",-100)), xlab=expression(u[1]),ylab=expression(u[2])) y = rcopula(frank...
rm(list = ls()) setwd("C://R directory") organic.df <- read.csv("organics.csv", header = T, na.strings = c("")) sapply(organic.df,function(x) sum(is.na(x))) sapply(organic.df, function(x) length(unique(x))) row.has.na <- apply(organic.df, 1, function(x){any(is.na(x))}) sum(row.has.na) organic1.df <- organic.df[,-c(1...
/KNN/model 3.R
no_license
brijeshgoharia/Consumer_Behaviour_Prediction_R
R
false
false
3,750
r
rm(list = ls()) setwd("C://R directory") organic.df <- read.csv("organics.csv", header = T, na.strings = c("")) sapply(organic.df,function(x) sum(is.na(x))) sapply(organic.df, function(x) length(unique(x))) row.has.na <- apply(organic.df, 1, function(x){any(is.na(x))}) sum(row.has.na) organic1.df <- organic.df[,-c(1...
# Copyright 2019 Observational Health Data Sciences and Informatics # # This file is part of ppipackage0916 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
/ppipackage0916/extras/PackageMaintenance.R
permissive
rlawodud3920/CDM-Rpackage-2020
R
false
false
2,670
r
# Copyright 2019 Observational Health Data Sciences and Informatics # # This file is part of ppipackage0916 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
\name{outm} \alias{outm} \title{ Output of Nodes } \description{ Changes the output of Nodes } \usage{ outm(x, value="each", which.node=1) } \examples{ data(total) total$xVUM2 ## since outm = NULL summary(total$xVUM2) x <- outm(total$xVUM2, c("min")) summary(x) } \arguments{ \item{x}{A \samp{mcnode...
/man/outm.Rd
no_license
cran/mc2d
R
false
false
997
rd
\name{outm} \alias{outm} \title{ Output of Nodes } \description{ Changes the output of Nodes } \usage{ outm(x, value="each", which.node=1) } \examples{ data(total) total$xVUM2 ## since outm = NULL summary(total$xVUM2) x <- outm(total$xVUM2, c("min")) summary(x) } \arguments{ \item{x}{A \samp{mcnode...
## This module reads only normalized gene data from Downloaded IlluminaHiSeq RNA data #### path <- "/Users/mdfacihulazam/Desktop/ref/RCode/allSeq/miRNA/data_non_3ABRCA/genedata/" # source path path2 <- "/Users/mdfacihulazam/Desktop/ref/RCode/allSeq/miRNA/data_non_3ABRCA/newdata/"# destination path #file_list = li...
/datacollection.R
no_license
facihul/Data_Analysis
R
false
false
1,745
r
## This module reads only normalized gene data from Downloaded IlluminaHiSeq RNA data #### path <- "/Users/mdfacihulazam/Desktop/ref/RCode/allSeq/miRNA/data_non_3ABRCA/genedata/" # source path path2 <- "/Users/mdfacihulazam/Desktop/ref/RCode/allSeq/miRNA/data_non_3ABRCA/newdata/"# destination path #file_list = li...
################################################################ # # # Section for tracking() functions (public) # # # ############################################################...
/dti/R/tracking.r
no_license
ingted/R-Examples
R
false
false
14,033
r
################################################################ # # # Section for tracking() functions (public) # # # ############################################################...
library(ggplot2) # Data visualization library(readr) # CSV file I/O, e.g. the read_csv function library(knitr) library(tidyverse) library(forecast) library(xts) library(smooth) df_air = read_csv(file = 'air_visit_data.csv') df_air_store = read_csv('air_store_info.csv') #i=air_unique[454] air_sum = d...
/exponential smmoting.R
no_license
shanakaChathu/Restaurant-visitor-forecasting
R
false
false
1,821
r
library(ggplot2) # Data visualization library(readr) # CSV file I/O, e.g. the read_csv function library(knitr) library(tidyverse) library(forecast) library(xts) library(smooth) df_air = read_csv(file = 'air_visit_data.csv') df_air_store = read_csv('air_store_info.csv') #i=air_unique[454] air_sum = d...
#Things wrong with this, related: #1) Won't workwith different length variables #Should work now with different ordering bazplotirf.allinone.double <- function (irf.withci = NULL, irf.noci = NULL, plot.type = c("multiple"), names = NULL, main = NULL, sub = NULL, lty = NULL, lwd = NULL, ...
/fixing plot(irf) - 1 with 2.R
no_license
bazoc/Masters-Thesis
R
false
false
8,703
r
#Things wrong with this, related: #1) Won't workwith different length variables #Should work now with different ordering bazplotirf.allinone.double <- function (irf.withci = NULL, irf.noci = NULL, plot.type = c("multiple"), names = NULL, main = NULL, sub = NULL, lty = NULL, lwd = NULL, ...
F.catch.model <- function( catch.df ){ # # Compute and estimate of catch for all days that are missing in the input data set. # i.e., "imput" a value for catch when it is missing # # input: # obs.catch.df = data frame from F.get.catch.data # # Output: # a data frame with extra lines in it. One extra line f...
/catch_model.r
no_license
jasmyace/CAMP_RST
R
false
false
13,127
r
F.catch.model <- function( catch.df ){ # # Compute and estimate of catch for all days that are missing in the input data set. # i.e., "imput" a value for catch when it is missing # # input: # obs.catch.df = data frame from F.get.catch.data # # Output: # a data frame with extra lines in it. One extra line f...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/chi2.R \name{chi2_iter} \alias{chi2_iter} \title{Wrapper function for the chi2 function from the discretization package.} \usage{ chi2_iter( predictors, labels, test = FALSE, validation = FALSE, proportions = c(0.3, 0.3), criterio...
/man/chi2_iter.Rd
no_license
adimajo/scoringTools
R
false
true
3,149
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/chi2.R \name{chi2_iter} \alias{chi2_iter} \title{Wrapper function for the chi2 function from the discretization package.} \usage{ chi2_iter( predictors, labels, test = FALSE, validation = FALSE, proportions = c(0.3, 0.3), criterio...
#' Intersect on a single \code{BiocSet} object #' @rdname intersect_single #' @name intersect_single #' @description This function performs an intersection within a single #' \code{BiocSet} object. #' @param x A \code{BiocSet} object. #' @param ... Additional arguments passed to function. #' @return A \code{BiocSe...
/R/intersect_single.R
no_license
mtmorgan/BiocSet
R
false
false
818
r
#' Intersect on a single \code{BiocSet} object #' @rdname intersect_single #' @name intersect_single #' @description This function performs an intersection within a single #' \code{BiocSet} object. #' @param x A \code{BiocSet} object. #' @param ... Additional arguments passed to function. #' @return A \code{BiocSe...
#Flower Diversity Transects and Nectar #Data Collected by Holger Beck,K. Lohman and B. Weinstein #R script Ben Weinstein - Stony Brook University 7/7/2013 #Under Git repository - Maquipucuna #Read in required libraries require(ggplot2) require(reshape2) require(maptools) library(plyr) require(plotKML) require(reshape)...
/FlowerTransects.R
no_license
nushiamme/Maquipicuna
R
false
false
12,537
r
#Flower Diversity Transects and Nectar #Data Collected by Holger Beck,K. Lohman and B. Weinstein #R script Ben Weinstein - Stony Brook University 7/7/2013 #Under Git repository - Maquipucuna #Read in required libraries require(ggplot2) require(reshape2) require(maptools) library(plyr) require(plotKML) require(reshape)...
library("tidyverse") source("2_cleaned_check/R/clean_2.R") # load data --------------------------------------------------------------- data_path <- file.path(rprojroot::find_root('clean-r-code-student.Rproj'), "data") # NA is valid country code, stands for Namibia, so should not be read as NA countries <- read_csv(...
/Meetup_2019_05_30/2_cleaned_check/home_location_2.R
no_license
rladies/meetup-presentations_budapest
R
false
false
2,009
r
library("tidyverse") source("2_cleaned_check/R/clean_2.R") # load data --------------------------------------------------------------- data_path <- file.path(rprojroot::find_root('clean-r-code-student.Rproj'), "data") # NA is valid country code, stands for Namibia, so should not be read as NA countries <- read_csv(...
test_that("Overlapping names don't result in an error", { penguins2 <- penguins names(penguins2)[3:5] <- c("ca", "p", "gender_cat") #Model with the iris dataset variables renamed to show the problem m2 <- lm(body_mass_g ~ p*gender_cat + ca, penguins2) expect_snapshot_output( extract_eq(m2, wrap = TR...
/tests/testthat/test-lm.R
permissive
datalorax/equatiomatic
R
false
false
4,044
r
test_that("Overlapping names don't result in an error", { penguins2 <- penguins names(penguins2)[3:5] <- c("ca", "p", "gender_cat") #Model with the iris dataset variables renamed to show the problem m2 <- lm(body_mass_g ~ p*gender_cat + ca, penguins2) expect_snapshot_output( extract_eq(m2, wrap = TR...
# No Parameter Endpoints ------------------------------------------------------- test_that("test main API function", { skip_on_cran() skip_if(httr::http_error("www.cbioportal.org/api")) db_test <- "public" set_cbioportal_db(db = db_test) res <- cbp_api(url_path = "genes/TP53", base_url = "public") expe...
/tests/testthat/test-cbp_api.R
permissive
karissawhiting/cbioportalR
R
false
false
1,645
r
# No Parameter Endpoints ------------------------------------------------------- test_that("test main API function", { skip_on_cran() skip_if(httr::http_error("www.cbioportal.org/api")) db_test <- "public" set_cbioportal_db(db = db_test) res <- cbp_api(url_path = "genes/TP53", base_url = "public") expe...
#Tyler Lewris #tal3fj #Competition 4: Safe Driving #Linear Method setwd("~/Documents/UVA/UVA DS /SYS 6018 Data Mining/Competition 4 Safe Driving") # Grading Criteria # Data exploration # Data cleaning (missing values, outliers, etc.) # Rationale for the selected statistical modeling methods # Correct implementation ...
/LinearMethodSubmission.R
no_license
TheTerminalator/Safe-Driver-Predictions
R
false
false
14,366
r
#Tyler Lewris #tal3fj #Competition 4: Safe Driving #Linear Method setwd("~/Documents/UVA/UVA DS /SYS 6018 Data Mining/Competition 4 Safe Driving") # Grading Criteria # Data exploration # Data cleaning (missing values, outliers, etc.) # Rationale for the selected statistical modeling methods # Correct implementation ...
library(learnr) ### Name: quiz ### Title: Tutorial quiz questions ### Aliases: quiz question answer ### ** Examples ## Not run: ##D question("What number is the letter A in the alphabet?", ##D answer("8"), ##D answer("14"), ##D answer("1", correct = TRUE), ##D answer("23") ##D ) ##D ##D question("Where ar...
/data/genthat_extracted_code/learnr/examples/quiz.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
681
r
library(learnr) ### Name: quiz ### Title: Tutorial quiz questions ### Aliases: quiz question answer ### ** Examples ## Not run: ##D question("What number is the letter A in the alphabet?", ##D answer("8"), ##D answer("14"), ##D answer("1", correct = TRUE), ##D answer("23") ##D ) ##D ##D question("Where ar...
source("C:/Users/Ian/Documents/Work/JP/Beiwe/Github/Beiwe-Analysis/Preprocessing/GPS_preprocessing.R") fildir="C:/Users/Ian/Documents/Work/JP/Beiwe/Github/Beiwe-Analysis/Preprocessing/PreprocessingExample/gps" ### filename: All of the output files (figures/features/Rdata files) will contain ### filename in t...
/Preprocessing/PreprocessingExample/PreprocessingExample.R
permissive
dblong/Beiwe-Analysis
R
false
false
907
r
source("C:/Users/Ian/Documents/Work/JP/Beiwe/Github/Beiwe-Analysis/Preprocessing/GPS_preprocessing.R") fildir="C:/Users/Ian/Documents/Work/JP/Beiwe/Github/Beiwe-Analysis/Preprocessing/PreprocessingExample/gps" ### filename: All of the output files (figures/features/Rdata files) will contain ### filename in t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/disk.R \name{ps_disk_usage} \alias{ps_disk_usage} \title{Disk usage statistics, per partition} \usage{ ps_disk_usage(paths = ps_disk_partitions()$mountpoint) } \arguments{ \item{paths}{The mounted file systems to list. By default all file sys...
/man/ps_disk_usage.Rd
permissive
r-lib/ps
R
false
true
1,069
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/disk.R \name{ps_disk_usage} \alias{ps_disk_usage} \title{Disk usage statistics, per partition} \usage{ ps_disk_usage(paths = ps_disk_partitions()$mountpoint) } \arguments{ \item{paths}{The mounted file systems to list. By default all file sys...
## ----global_options, warning = FALSE, eval = FALSE, echo = FALSE-------------- # knitr::opts_chunk$get("root.dir") ## ----installing the dependencies, eval = FALSE-------------------------------- # # install.packages("GENEAread", repos = "http://cran.us.r-project.org") # install.packages("changepoint", re...
/inst/doc/GENEAclassifyDemo.R
no_license
cran/GENEAclassify
R
false
false
10,188
r
## ----global_options, warning = FALSE, eval = FALSE, echo = FALSE-------------- # knitr::opts_chunk$get("root.dir") ## ----installing the dependencies, eval = FALSE-------------------------------- # # install.packages("GENEAread", repos = "http://cran.us.r-project.org") # install.packages("changepoint", re...
getbasismatrix <- function (evalarg, basisobj, nderiv = 0, returnMatrix = FALSE) { junk <- rnorm(20) if (is.numeric(basisobj) && inherits(evalarg, "basisfd")) { temp <- basisobj basisobj <- evalarg evalarg <- temp } if (!(is.numeric(evalarg))) stop("Argument EVALARG is ...
/R/getbasismatrix.R
no_license
dan410/spatialfda
R
false
false
3,073
r
getbasismatrix <- function (evalarg, basisobj, nderiv = 0, returnMatrix = FALSE) { junk <- rnorm(20) if (is.numeric(basisobj) && inherits(evalarg, "basisfd")) { temp <- basisobj basisobj <- evalarg evalarg <- temp } if (!(is.numeric(evalarg))) stop("Argument EVALARG is ...
library('shiny') library('ggplot2') vars <- c('date','transect','landform','habitat','slope_class') varsnamed <- c('date','transect','landform','habitat','slope_class') names(varsnamed) <- vars shinyUI(pageWithSidebar( headerPanel("Dry Creek Data"), sidebarPanel( selectInput('x', 'X Variable', vars), ...
/dittesapp/ui.R
no_license
sckott/dittes
R
false
false
768
r
library('shiny') library('ggplot2') vars <- c('date','transect','landform','habitat','slope_class') varsnamed <- c('date','transect','landform','habitat','slope_class') names(varsnamed) <- vars shinyUI(pageWithSidebar( headerPanel("Dry Creek Data"), sidebarPanel( selectInput('x', 'X Variable', vars), ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/build-articles.R \name{build_articles} \alias{build_articles} \alias{build_article} \title{Build articles section} \usage{ build_articles(pkg = ".", quiet = TRUE, lazy = TRUE, override = list(), preview = NA) build_article(name, pkg = ".",...
/man/build_articles.Rd
permissive
kopperud/pkgdown
R
false
true
5,069
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/build-articles.R \name{build_articles} \alias{build_articles} \alias{build_article} \title{Build articles section} \usage{ build_articles(pkg = ".", quiet = TRUE, lazy = TRUE, override = list(), preview = NA) build_article(name, pkg = ".",...
# ----- preprocess ----- pokemon_df <- data.table::fread( input = "../data/Pokemon_final_fr.csv", encoding = "UTF-8" ) type_colors <- data.table::fread( input = "../data/Type_Colors.csv", encoding = "UTF-8" ) pokemon_melted <- pokemon_df %>% data.table::melt( measure.vars = c("Type1", "Type2"), va...
/Shiny/server.R
no_license
rvcoudert/PokemonInsight
R
false
false
20,999
r
# ----- preprocess ----- pokemon_df <- data.table::fread( input = "../data/Pokemon_final_fr.csv", encoding = "UTF-8" ) type_colors <- data.table::fread( input = "../data/Type_Colors.csv", encoding = "UTF-8" ) pokemon_melted <- pokemon_df %>% data.table::melt( measure.vars = c("Type1", "Type2"), va...
dfO <- data.frame(eval(parse(text=substring(getURL(URLencode('http://129.152.144.84:5001/rest/native/?query="select * from orders"'), httpheader=c(DB='jdbc:oracle:thin:@129.152.144.84:1521/PDB1.usuniversi01134.oraclecloud.internal', USER='DV_ORDERS', PASS='orcl', MODE='native_mode', MODEL='model', returnFor = 'R', retu...
/01 Data/orders_data_frame.R
no_license
sagarp93/DV_RProject1
R
false
false
377
r
dfO <- data.frame(eval(parse(text=substring(getURL(URLencode('http://129.152.144.84:5001/rest/native/?query="select * from orders"'), httpheader=c(DB='jdbc:oracle:thin:@129.152.144.84:1521/PDB1.usuniversi01134.oraclecloud.internal', USER='DV_ORDERS', PASS='orcl', MODE='native_mode', MODEL='model', returnFor = 'R', retu...
/Proyecto Final 1 - 2 ajustes.R
no_license
erikperez20/Inferencia_Bayesiana_Proyecto_Final
R
false
false
9,060
r
/dados_Preparados/usando_SaveModel.R
no_license
AnaPaulaPiedade/Previsao-de-Irradiacao-Solar
R
false
false
467
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/contrastV.R \name{limmaWrapper} \alias{limmaWrapper} \title{Wrapper all limma steps} \usage{ limmaWrapper(xdata, group1, group2) } \description{ Wrapper all limma steps } \keyword{internal}
/man/limmaWrapper.Rd
no_license
anngvu/DIVE
R
false
true
268
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/contrastV.R \name{limmaWrapper} \alias{limmaWrapper} \title{Wrapper all limma steps} \usage{ limmaWrapper(xdata, group1, group2) } \description{ Wrapper all limma steps } \keyword{internal}
#### set up source("covid_SVIC_functions.R") library(deSolve) library(rootSolve) library(plotrix) system("R CMD SHLIB SVIC.c") dyn.load(paste("SVIC", .Platform$dynlib.ext, sep = "")) #### define model parameters gamma<-1/7 optim.vir.assumed<-.0075 #set to either .01, .005, .0025 vir.obs<-.0075 prop<-66.666 R0.a...
/figure S2.R
no_license
thecapitalistcycle/covid_vaccines_virulence_evolution
R
false
false
19,038
r
#### set up source("covid_SVIC_functions.R") library(deSolve) library(rootSolve) library(plotrix) system("R CMD SHLIB SVIC.c") dyn.load(paste("SVIC", .Platform$dynlib.ext, sep = "")) #### define model parameters gamma<-1/7 optim.vir.assumed<-.0075 #set to either .01, .005, .0025 vir.obs<-.0075 prop<-66.666 R0.a...
# read peak files in bed format. # write bed files with a 100bp window on every peak position # reference: https://bioinformatics-core-shared-training.github.io/cruk-summer-school-2018/ChIP/Practicals/Practical7_Downstream_Analysis_of_ChIP-seq_SS.html#motif-enrichment-analysis # read in data and set interval inpath <-...
/scripts/1-extract_peak_region.R
no_license
CuteBeaeast/BME1063_HW3
R
false
false
1,008
r
# read peak files in bed format. # write bed files with a 100bp window on every peak position # reference: https://bioinformatics-core-shared-training.github.io/cruk-summer-school-2018/ChIP/Practicals/Practical7_Downstream_Analysis_of_ChIP-seq_SS.html#motif-enrichment-analysis # read in data and set interval inpath <-...
library(limSolve) ### Name: ldei ### Title: Weighted Least Distance Programming with equality and inequality ### constraints. ### Aliases: ldei ### Keywords: algebra array optimize ### ** Examples #------------------------------------------------------------------------------- # A simple problem #----------------...
/data/genthat_extracted_code/limSolve/examples/ldei.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,517
r
library(limSolve) ### Name: ldei ### Title: Weighted Least Distance Programming with equality and inequality ### constraints. ### Aliases: ldei ### Keywords: algebra array optimize ### ** Examples #------------------------------------------------------------------------------- # A simple problem #----------------...
setwd("~/Documents/Coursera_DataScience/Course5 - Exploratory Data Analysis/ExData_Plotting1/") dest="../data/household_power_consumption.txt" fileURL <-"https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" if (!file.exists(dest)) { download.file(fileURL, destfile = '../data/hous...
/plot1.R
no_license
wahlau/ExData_Plotting1
R
false
false
1,147
r
setwd("~/Documents/Coursera_DataScience/Course5 - Exploratory Data Analysis/ExData_Plotting1/") dest="../data/household_power_consumption.txt" fileURL <-"https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" if (!file.exists(dest)) { download.file(fileURL, destfile = '../data/hous...
arrayWeights <- function(object, design = NULL, weights = NULL, method="genebygene", maxiter=50, tol = 1e-10, trace = FALSE) # Compute array quality weights # Matt Ritchie # 7 Feb 2005. Last revised 4 Dec 2006. { M <- NULL if (is(object, "MAList") || is(object, "list")) { M <- object$M if (missing(design)...
/R/arrayWeights.r
no_license
khokamp/limma
R
false
false
7,420
r
arrayWeights <- function(object, design = NULL, weights = NULL, method="genebygene", maxiter=50, tol = 1e-10, trace = FALSE) # Compute array quality weights # Matt Ritchie # 7 Feb 2005. Last revised 4 Dec 2006. { M <- NULL if (is(object, "MAList") || is(object, "list")) { M <- object$M if (missing(design)...
#Includes all the files for Cb calculations #' txBenefit: A package for calculations pertaining to Concentration of Benefit (Cb) index. #' #' The txBenefit package provides three categories of important functions: #' Cb.simple(), Cb.logistic, Cb.Poisson, and cb.coxph #' #' #' @docType package #' @name txBenefit NULL ...
/R/Cb.R
no_license
msadatsafavi/txBenefit
R
false
false
10,763
r
#Includes all the files for Cb calculations #' txBenefit: A package for calculations pertaining to Concentration of Benefit (Cb) index. #' #' The txBenefit package provides three categories of important functions: #' Cb.simple(), Cb.logistic, Cb.Poisson, and cb.coxph #' #' #' @docType package #' @name txBenefit NULL ...
library(RCurl) library(RJSONIO) library(dplyr) library(shiny) library(bitops) library(leaflet) toyPoint=data.frame(Lng=runif(1000,min=-74.1,max=-73.5), Lat=runif(1000,min=40.4,max=41.0), Radius=runif(1000,min=1,max=5), Color=runif(1000), ...
/app/app5.r
no_license
TZstatsADS/Fall2016-Proj2-grp14
R
false
false
10,467
r
library(RCurl) library(RJSONIO) library(dplyr) library(shiny) library(bitops) library(leaflet) toyPoint=data.frame(Lng=runif(1000,min=-74.1,max=-73.5), Lat=runif(1000,min=40.4,max=41.0), Radius=runif(1000,min=1,max=5), Color=runif(1000), ...
## PHS597 Deep learning HW1 implement PPR set.seed(1) library("scatterplot3d") # Simulate data n <- 300 x1 <- rnorm(n, 0, 1) x2 <- rnorm(n, 0, 1) y <- 1/(1+exp(-5*((x1+x2)/sqrt(2)-0.5))) + rnorm(n, 0, 0.2) #y <- 1/(1+exp(x1+x2)) data <- data.frame(y,x1,x2) scatterplot3d(x=data$x1, y = data$x2, z = data$y) # imple...
/HW1.R
no_license
highshuang/biostat_deep_learning_spring_2021
R
false
false
4,492
r
## PHS597 Deep learning HW1 implement PPR set.seed(1) library("scatterplot3d") # Simulate data n <- 300 x1 <- rnorm(n, 0, 1) x2 <- rnorm(n, 0, 1) y <- 1/(1+exp(-5*((x1+x2)/sqrt(2)-0.5))) + rnorm(n, 0, 0.2) #y <- 1/(1+exp(x1+x2)) data <- data.frame(y,x1,x2) scatterplot3d(x=data$x1, y = data$x2, z = data$y) # imple...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lgb.wrap.loss.R \name{lgb.wrap.loss} \alias{lgb.wrap.loss} \title{LightGBM loss function wrapper} \usage{ lgb.wrap.loss(f) } \arguments{ \item{f}{Type: function. The function to wrap from LightGBM. Requires the following order of arguments fo...
/man/lgb.wrap.loss.Rd
no_license
Laurae2/LauraeDS
R
false
true
1,320
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lgb.wrap.loss.R \name{lgb.wrap.loss} \alias{lgb.wrap.loss} \title{LightGBM loss function wrapper} \usage{ lgb.wrap.loss(f) } \arguments{ \item{f}{Type: function. The function to wrap from LightGBM. Requires the following order of arguments fo...
#Code aim: to convert the raw data of self-report and IQ measures to clean data-files with the correct sub-scales. #Contributors: Nitzan Shahar # initiate ---------------------------------------------------------------- rm(list=ls()) library(dplyr) library(magrittr) maindir<-'myfolder/03_data/02_aggregated_data/' ...
/04_preprocess_session3.R
no_license
idoba2030/0002_Maayan-Pereg_free_vs_forced_learning
R
false
false
3,762
r
#Code aim: to convert the raw data of self-report and IQ measures to clean data-files with the correct sub-scales. #Contributors: Nitzan Shahar # initiate ---------------------------------------------------------------- rm(list=ls()) library(dplyr) library(magrittr) maindir<-'myfolder/03_data/02_aggregated_data/' ...
# Una matriz es una forma de estructurar los datos que tiene filas y columnas (bidimensional). Del mismo tipo ##################################### # creando matrices en R ##################################### # crear vectores para las columnas de la matriz warner <- c(20, 20, 16, 17, 17, 22, 17, 18, 19) disney <- c...
/matrices.R
no_license
SergioMateosSanz/Rexamples
R
false
false
1,710
r
# Una matriz es una forma de estructurar los datos que tiene filas y columnas (bidimensional). Del mismo tipo ##################################### # creando matrices en R ##################################### # crear vectores para las columnas de la matriz warner <- c(20, 20, 16, 17, 17, 22, 17, 18, 19) disney <- c...
#' Read and write tpl files #' #' read_tpl reads in a tpl file and returns a tplStruct. write_tpl creates a tpl file #' from a tplStruct which must have a DATA, PARAMETERS and PROCEDURE list element. #' #' @usage read_tpl(tplfile) #' #' write_tpl(tplStruct,tplfile) #' @param tplfile base name of tpl f...
/ADMButils/R/read_write_tpl.r
no_license
jlaake/ADMButils
R
false
false
5,350
r
#' Read and write tpl files #' #' read_tpl reads in a tpl file and returns a tplStruct. write_tpl creates a tpl file #' from a tplStruct which must have a DATA, PARAMETERS and PROCEDURE list element. #' #' @usage read_tpl(tplfile) #' #' write_tpl(tplStruct,tplfile) #' @param tplfile base name of tpl f...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/events_to_activitylog.R \name{events_to_activitylog} \alias{events_to_activitylog} \title{Events to activities} \usage{ events_to_activitylog( eventlog, case_id, activity_id, activity_instance_id, lifecycle_id, timestamp, resour...
/man/events_to_activitylog.Rd
no_license
ehsankhoshkhoy/bupaR
R
false
true
1,347
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/events_to_activitylog.R \name{events_to_activitylog} \alias{events_to_activitylog} \title{Events to activities} \usage{ events_to_activitylog( eventlog, case_id, activity_id, activity_instance_id, lifecycle_id, timestamp, resour...
#' Power Calculations for Factorial ANCOVAs #' #' Complete power analyses for ANCOVA omnibus tests and contrasts. This function does not support within subjects factors. #' #' @param design Output from the ANOVA_design function #' @param mu Vector specifying mean for each condition #' @param n Sample size in each con...
/R/ANCOVA_analytic.R
permissive
arcaldwell49/Superpower
R
false
false
18,862
r
#' Power Calculations for Factorial ANCOVAs #' #' Complete power analyses for ANCOVA omnibus tests and contrasts. This function does not support within subjects factors. #' #' @param design Output from the ANOVA_design function #' @param mu Vector specifying mean for each condition #' @param n Sample size in each con...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/aasim_classes.r \name{nCF.sim} \alias{nCF.sim} \title{Number of cash flows in a sim(ulation) object} \usage{ nCF.sim(sim) } \arguments{ \item{sim}{Simulation object} } \value{ Number of cash flows in object } \description{ Number of cash flow...
/man/nCF.sim.Rd
no_license
ihavenoahidea/aasim
R
false
true
386
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/aasim_classes.r \name{nCF.sim} \alias{nCF.sim} \title{Number of cash flows in a sim(ulation) object} \usage{ nCF.sim(sim) } \arguments{ \item{sim}{Simulation object} } \value{ Number of cash flows in object } \description{ Number of cash flow...
###################################################################################################### ### Simulation Script for the paper: # Modeling semi-competing risks data as a longitudinal bivariate process by Nevo et al. ###########################################################################################...
/Simulations/Scripts/Scenario 1/Scen1Cens20N5000f.R
no_license
daniel258/LongitSemiCompReproduce
R
false
false
5,117
r
###################################################################################################### ### Simulation Script for the paper: # Modeling semi-competing risks data as a longitudinal bivariate process by Nevo et al. ###########################################################################################...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/setHyperPars.R \name{setHyperPars} \alias{setHyperPars} \title{Set the hyperparameters of a learner object.} \usage{ setHyperPars(learner, ..., par.vals = list()) } \arguments{ \item{learner}{[\code{\link{Learner}} | \code{character(1)}]\cr T...
/man/setHyperPars.Rd
no_license
kerschke/mlr
R
false
true
1,265
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/setHyperPars.R \name{setHyperPars} \alias{setHyperPars} \title{Set the hyperparameters of a learner object.} \usage{ setHyperPars(learner, ..., par.vals = list()) } \arguments{ \item{learner}{[\code{\link{Learner}} | \code{character(1)}]\cr T...
library(tidyverse) library(moderndive) greenbuildings = read.csv('../data/greenbuildings.csv') # Let's examine the "green premium" # starting point: define revenue per sq ft, as the rent times # the leasing rate (0-100 scale), divided by 100. # this is how much actual revenue the property brings in per square ft. gre...
/r/green_starter.R
permissive
jgscott/SDS383D
R
false
false
669
r
library(tidyverse) library(moderndive) greenbuildings = read.csv('../data/greenbuildings.csv') # Let's examine the "green premium" # starting point: define revenue per sq ft, as the rent times # the leasing rate (0-100 scale), divided by 100. # this is how much actual revenue the property brings in per square ft. gre...
testlist <- list(m = 0L, r = 0, y = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) result <- do.call(mcmcsae:::CrCRT,testlist) str(result)
/mcmcsae/inst/testfiles/CrCRT/libFuzzer_CrCRT/CrCRT_valgrind_files/1612890413-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
176
r
testlist <- list(m = 0L, r = 0, y = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) result <- do.call(mcmcsae:::CrCRT,testlist) str(result)
library(actuar) library(copula) library(nCopula) library(xtable) library(ggplot2) library(Deriv) library(stringr) library(pracma) ########################################################## Alpha0 # log == frank et geo == amh #calcul du tau de kendall pour variables mixtes ## Ici binom et exp a 4 fct ###### Calcul tau...
/Code_Alex/Estimation de paramètres/tau_kendall_Diamilatou.R
no_license
alexlepage07/Recherche_ete_2019
R
false
false
14,919
r
library(actuar) library(copula) library(nCopula) library(xtable) library(ggplot2) library(Deriv) library(stringr) library(pracma) ########################################################## Alpha0 # log == frank et geo == amh #calcul du tau de kendall pour variables mixtes ## Ici binom et exp a 4 fct ###### Calcul tau...
\name{pan} \alias{pan} \title{ Imputation of multivariate panel or cluster data } \description{ Gibbs sampler for the multivariate linear mixed model with incomplete data described by Schafer (1997). This function will typically be used to produce multiple imputations of missing data values in multivariate panel data o...
/pan/man/pan.Rd
no_license
jinghuazhao/R
R
false
false
12,920
rd
\name{pan} \alias{pan} \title{ Imputation of multivariate panel or cluster data } \description{ Gibbs sampler for the multivariate linear mixed model with incomplete data described by Schafer (1997). This function will typically be used to produce multiple imputations of missing data values in multivariate panel data o...
# UI-Output for exporting the imputation data output$ui_exportimpute_data_btn <- renderUI({ req(input$dat_expimpute_type,input$dataexport_path) if (!dir.exists(input$dataexport_path)) { return(myActionButton("btn_export_impute_data_xxx", "Error: The specified directory does not exist!", btn.style="danger"))...
/ui_export_impute_data.R
no_license
Abson-dev/sdcMicro
R
false
false
7,478
r
# UI-Output for exporting the imputation data output$ui_exportimpute_data_btn <- renderUI({ req(input$dat_expimpute_type,input$dataexport_path) if (!dir.exists(input$dataexport_path)) { return(myActionButton("btn_export_impute_data_xxx", "Error: The specified directory does not exist!", btn.style="danger"))...
# # vim:set ff=unix expandtab ts=2 sw=2: #setMethod( # f= "getAccumulatedRelease14", # ### This function integrates the release Flux over time # signature= "Model_14", # definition=function(object){ # times=object@times # R=getReleaseFlux14(object) # n=ncol(R) # #transform the array...
/pkg/R/Model_14.R
no_license
Dong-po/SoilR-exp
R
false
false
18,520
r
# # vim:set ff=unix expandtab ts=2 sw=2: #setMethod( # f= "getAccumulatedRelease14", # ### This function integrates the release Flux over time # signature= "Model_14", # definition=function(object){ # times=object@times # R=getReleaseFlux14(object) # n=ncol(R) # #transform the array...
context("Formatting for reversed names") test_that("Simple reverse-formatted names can be handled", { expect_true(format_reverse("Keyes, Oliver") == "Oliver Keyes") }) test_that("Non-comma-delimited names are not modified", { expect_true(format_reverse("Oliver Keyes") == "Oliver Keyes") }) test_that("Multipart c...
/tests/testthat/test_reverse_formatter.R
permissive
mcdelaney/humaniformat
R
false
false
680
r
context("Formatting for reversed names") test_that("Simple reverse-formatted names can be handled", { expect_true(format_reverse("Keyes, Oliver") == "Oliver Keyes") }) test_that("Non-comma-delimited names are not modified", { expect_true(format_reverse("Oliver Keyes") == "Oliver Keyes") }) test_that("Multipart c...
# input 1 is clonal threshold (0.5 / 0.7 / 1 ...) # input 2 is a table of input files library(jaccard) library(reshape2) library(tidyr) library(pheatmap) library(ggplot2) barcode_split_stat<-function(x){ return(unlist(strsplit(x,";"))) } jaccard_stat<-function(x){ ind<-which(clone_tab$Var1==x) j...
/script/similarity_multigroup.R
no_license
mana-W/virus_barcode
R
false
false
12,363
r
# input 1 is clonal threshold (0.5 / 0.7 / 1 ...) # input 2 is a table of input files library(jaccard) library(reshape2) library(tidyr) library(pheatmap) library(ggplot2) barcode_split_stat<-function(x){ return(unlist(strsplit(x,";"))) } jaccard_stat<-function(x){ ind<-which(clone_tab$Var1==x) j...