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
\name{firstlook} \alias{firstlook} %- Also NEED an '\alias' for EACH other topic documented here. \title{ FirstLook - which AOI was the first look? } \description{ This function specifies which AOI participants look to first for a given trial. This function only deals with 2 AOIs - typically used in infant/child studie...
/man/firstlook.Rd
permissive
sofiawhitley/aoianalysis
R
false
false
1,734
rd
\name{firstlook} \alias{firstlook} %- Also NEED an '\alias' for EACH other topic documented here. \title{ FirstLook - which AOI was the first look? } \description{ This function specifies which AOI participants look to first for a given trial. This function only deals with 2 AOIs - typically used in infant/child studie...
#' Get APG names #' #' Generic names and their replacements from the Angiosperm Phylogeny #' Group III system of flowering plant classification. #' #' @param ... Curl args passed on to \code{\link[httr]{GET}} #' @references \url{http://www.mobot.org/MOBOT/research/APweb/} #' @name apg #' @examples \dontrun{ #' head(apg...
/R/apg.R
permissive
Dmirandae/taxize
R
false
false
3,005
r
#' Get APG names #' #' Generic names and their replacements from the Angiosperm Phylogeny #' Group III system of flowering plant classification. #' #' @param ... Curl args passed on to \code{\link[httr]{GET}} #' @references \url{http://www.mobot.org/MOBOT/research/APweb/} #' @name apg #' @examples \dontrun{ #' head(apg...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Do not modify this file since it was automatically generated from: % % processTime.R % % by the Rdoc compiler part of the R.oo package. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{processTime} \alias{pr...
/man/processTime.Rd
no_license
HenrikBengtsson/aroma.core
R
false
false
1,781
rd
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Do not modify this file since it was automatically generated from: % % processTime.R % % by the Rdoc compiler part of the R.oo package. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{processTime} \alias{pr...
context("Pixiedust Colors") x <- dust(lm(mpg ~ qsec + factor(am) + wt + factor(gear), data = mtcars)) test_that( "lowercase color", { expect_silent(sprinkle(x, bg = "red")) } ) test_that( "uppercase color", { expect_silent(sprinkle(x, bg = "RED")) } ) test_that( "mixed-case color", { exp...
/tests/testthat/test-colors.R
no_license
rpietro/pixiedust
R
false
false
1,167
r
context("Pixiedust Colors") x <- dust(lm(mpg ~ qsec + factor(am) + wt + factor(gear), data = mtcars)) test_that( "lowercase color", { expect_silent(sprinkle(x, bg = "red")) } ) test_that( "uppercase color", { expect_silent(sprinkle(x, bg = "RED")) } ) test_that( "mixed-case color", { exp...
#' The application User-Interface #' #' @param request Internal parameter for `{shiny}`. #' DO NOT REMOVE. #' @import shiny #' @noRd app_ui <- function(request) { tagList( # Leave this function for adding external resources golem_add_external_resources(), # List the first level UI elements here ...
/R/app_ui.R
permissive
astrzalka/smoother
R
false
false
7,699
r
#' The application User-Interface #' #' @param request Internal parameter for `{shiny}`. #' DO NOT REMOVE. #' @import shiny #' @noRd app_ui <- function(request) { tagList( # Leave this function for adding external resources golem_add_external_resources(), # List the first level UI elements here ...
## Read full dataset setwd("/Users/olivia/Documents/COURSE") data <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?", stringsAsFactors=F, quote='\"') data$Date <- as.Date(data$Date, format="%d/%m/%Y") head(data) ## Subset the data data1 <- subset(data, subset=(Date == "2...
/plot4.R
no_license
oliviazhao/ExData_Plotting1
R
false
false
1,165
r
## Read full dataset setwd("/Users/olivia/Documents/COURSE") data <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?", stringsAsFactors=F, quote='\"') data$Date <- as.Date(data$Date, format="%d/%m/%Y") head(data) ## Subset the data data1 <- subset(data, subset=(Date == "2...
#!/usr/bin/env Rscript args=commandArgs(trailingOnly=TRUE) ## R-job for downscaling Nordic temperatures for KSS print('--- R-job for downscaling Nordic temperatures for KSS ---') print(args) #library(devtools) #install.packages('esd',repos=NULL) library(esd) ## Function definitions: downscale <- function(Y,predict...
/KSS/dse4KSS.R
no_license
zejiang-unsw/esd_Rmarkdown
R
false
false
4,961
r
#!/usr/bin/env Rscript args=commandArgs(trailingOnly=TRUE) ## R-job for downscaling Nordic temperatures for KSS print('--- R-job for downscaling Nordic temperatures for KSS ---') print(args) #library(devtools) #install.packages('esd',repos=NULL) library(esd) ## Function definitions: downscale <- function(Y,predict...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_utils.R \name{plot_hd_bars} \alias{plot_hd_bars} \title{Add bars marking quantiles to ggplot object created by \code{\link{plot_scat2}}. See examples in the README file and the vignettes.} \usage{ plot_hd_bars( p, q_seq = seq(0.1, 0....
/man/plot_hd_bars.Rd
permissive
GRousselet/rogme
R
false
true
927
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_utils.R \name{plot_hd_bars} \alias{plot_hd_bars} \title{Add bars marking quantiles to ggplot object created by \code{\link{plot_scat2}}. See examples in the README file and the vignettes.} \usage{ plot_hd_bars( p, q_seq = seq(0.1, 0....
# functions for plotting metaProfiles: # default color scheme for heatmaps #.jets <- colorRampPalette(c("#334b8e", "#456ca7", "#71c6cd", "#8fc56c", # "#f3e92b","#e6762b","#d9272a")) .jets<-colorRampPalette(c("#00007F", "blue", "#007FFF", "cyan", "#7FFF7F", "yellow...
/R/plotMatrix.R
no_license
DoaneAS/genomation
R
false
false
62,098
r
# functions for plotting metaProfiles: # default color scheme for heatmaps #.jets <- colorRampPalette(c("#334b8e", "#456ca7", "#71c6cd", "#8fc56c", # "#f3e92b","#e6762b","#d9272a")) .jets<-colorRampPalette(c("#00007F", "blue", "#007FFF", "cyan", "#7FFF7F", "yellow...
### ========================================================================= ### keys() and keytype() - related functions for gene-centric Dbs ### ------------------------------------------------------------------------- ## Three helpers for deprecating keytypes ## One to just list the bum keytypes .listDeprecatedKe...
/R/methods-geneCentricDbs-keys.R
no_license
LeaSeep/AnnotationDbi
R
false
false
20,490
r
### ========================================================================= ### keys() and keytype() - related functions for gene-centric Dbs ### ------------------------------------------------------------------------- ## Three helpers for deprecating keytypes ## One to just list the bum keytypes .listDeprecatedKe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{print_fmr} \alias{print_fmr} \title{Print fingerprint minutiae record} \usage{ printFMR(filepath, type) } \arguments{ \item{filepath}{character path to file containing the fingerprint minutiae record (e.g. a "*.ist" file)....
/man/print_fmr.Rd
permissive
OlivierBinette/fingermatchR
R
false
true
1,190
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{print_fmr} \alias{print_fmr} \title{Print fingerprint minutiae record} \usage{ printFMR(filepath, type) } \arguments{ \item{filepath}{character path to file containing the fingerprint minutiae record (e.g. a "*.ist" file)....
swishInterxPair <- function(infRepsArray, condition, covariate, pair, nperms=100, pc=5, fast, quiet=FALSE) { stopifnot(is.numeric(pair) | is.character(pair) | is.factor(pair)) stopifnot(!anyNA(covariate)) stopifnot(!anyNA(pair)) pair <- as.integer(factor(pair)) if (!all(table(pai...
/R/interaction.R
no_license
lianos/fishpond
R
false
false
6,975
r
swishInterxPair <- function(infRepsArray, condition, covariate, pair, nperms=100, pc=5, fast, quiet=FALSE) { stopifnot(is.numeric(pair) | is.character(pair) | is.factor(pair)) stopifnot(!anyNA(covariate)) stopifnot(!anyNA(pair)) pair <- as.integer(factor(pair)) if (!all(table(pai...
library(BioGeoBEARS) ### Name: bears_5param_standard_fast ### Title: 5-parameter model, adding j (founder-event speciation), v ### (vicariance proportion), and maxent_constraint_01 (weighting for size ### of smaller-ranged descendant lineage) ### Aliases: bears_5param_standard_fast ### ** Examples test=1 # Get...
/data/genthat_extracted_code/BioGeoBEARS/examples/bears_5param_standard_fast.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
963
r
library(BioGeoBEARS) ### Name: bears_5param_standard_fast ### Title: 5-parameter model, adding j (founder-event speciation), v ### (vicariance proportion), and maxent_constraint_01 (weighting for size ### of smaller-ranged descendant lineage) ### Aliases: bears_5param_standard_fast ### ** Examples test=1 # Get...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/waf_operations.R \name{waf_create_regex_match_set} \alias{waf_create_regex_match_set} \title{This is AWS WAF CLASSIC documentation} \usage{ waf_create_regex_match_set(Name, ChangeToken) } \arguments{ \item{Name}{[required] A friendly name or ...
/paws/man/waf_create_regex_match_set.Rd
permissive
jcheng5/paws
R
false
true
2,507
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/waf_operations.R \name{waf_create_regex_match_set} \alias{waf_create_regex_match_set} \title{This is AWS WAF CLASSIC documentation} \usage{ waf_create_regex_match_set(Name, ChangeToken) } \arguments{ \item{Name}{[required] A friendly name or ...
data(uj) names(uj) attach(uj) #BOXPLOT boxplot(work_yrs,main="Work Years",horizontal=TRUE) #HISTOGRAM hist(work_yrs) hist(work_yrs,probability=TRUE) # proportions (or probabilities) hist(work_yrs,breaks=10) # 10 breaks, or just hist(x,10) hist(work_yrs,breaks=c(0,1,2,3,4,5,10,20,max(work_yrs))) # specify b...
/Assignment-24-Jun-18.R
no_license
ujwalaraj/ujwala
R
false
false
1,299
r
data(uj) names(uj) attach(uj) #BOXPLOT boxplot(work_yrs,main="Work Years",horizontal=TRUE) #HISTOGRAM hist(work_yrs) hist(work_yrs,probability=TRUE) # proportions (or probabilities) hist(work_yrs,breaks=10) # 10 breaks, or just hist(x,10) hist(work_yrs,breaks=c(0,1,2,3,4,5,10,20,max(work_yrs))) # specify b...
#Wor, on merge between docs and drugs and companies and drugs #Add more of a data dictionary for each variable #add in dummy tables # #Objective: To study the association between obstetrician-gynecologists physicians’ receipt of industry-sponsored money, and rates of prescribing the promoted drug to Medicare benefic...
/pharma_influence_6_4_2019.R
no_license
mufflyt/Pharma_influence
R
false
false
25,105
r
#Wor, on merge between docs and drugs and companies and drugs #Add more of a data dictionary for each variable #add in dummy tables # #Objective: To study the association between obstetrician-gynecologists physicians’ receipt of industry-sponsored money, and rates of prescribing the promoted drug to Medicare benefic...
#' @name exportMetaData #' #' @title Export Meta Data from a REDCap Database #' @description Retrieves the meta data for a REDcap database, including #' field names, labels, types, formulas, etc. This file can be used to parse #' levels of factors, apply labels, and other data management tasks once the #' data are...
/R/exportMetaData.R
no_license
cran/redcapAPI
R
false
false
4,902
r
#' @name exportMetaData #' #' @title Export Meta Data from a REDCap Database #' @description Retrieves the meta data for a REDcap database, including #' field names, labels, types, formulas, etc. This file can be used to parse #' levels of factors, apply labels, and other data management tasks once the #' data are...
#' Euler 19 #' #' Solves Euler 19 using the lubridate package. This effectively acts as a counter of Sundays #' that fall on the first day of the month #' #' @param start Start date #' @param end End date #' #' @return Total Sundays on the First of the month #' @export euler19 <- function(start = as.Date("1901-01-01"),...
/R Files/ProjectEuler/R/Euler19.R
no_license
glenMoutrie/ProjectEuler
R
false
false
611
r
#' Euler 19 #' #' Solves Euler 19 using the lubridate package. This effectively acts as a counter of Sundays #' that fall on the first day of the month #' #' @param start Start date #' @param end End date #' #' @return Total Sundays on the First of the month #' @export euler19 <- function(start = as.Date("1901-01-01"),...
#!/usr/bin/env Rscript library(shaRing) library(JJHmisc) df <- shaRing::GetDF() # Granularity verus unpredictability-------------------------------------------- df.gran <- subset(df, !is.na(granular.index) & !is.na(predict.index))[, list( ...
/analysis/granularity_versus_predictability.R
no_license
johnjosephhorton/sharing
R
false
false
2,394
r
#!/usr/bin/env Rscript library(shaRing) library(JJHmisc) df <- shaRing::GetDF() # Granularity verus unpredictability-------------------------------------------- df.gran <- subset(df, !is.na(granular.index) & !is.na(predict.index))[, list( ...
##' Simulate model ##' ##' Simulate data from a general SEM model including non-linear effects and ##' general link and distribution of variables. ##' ##' @aliases sim sim.lvmfit sim.lvm ##' simulate.lvmfit simulate.lvm ##' transform<- transform<-.lvm transform.lvm ##' functional functional<- functional.lvm functional...
/lava/R/sim.R
no_license
ingted/R-Examples
R
false
false
26,242
r
##' Simulate model ##' ##' Simulate data from a general SEM model including non-linear effects and ##' general link and distribution of variables. ##' ##' @aliases sim sim.lvmfit sim.lvm ##' simulate.lvmfit simulate.lvm ##' transform<- transform<-.lvm transform.lvm ##' functional functional<- functional.lvm functional...
coefMulti<-function(distance){ coef_multi<-switch(as.character(distance), XS=1, S=2, M=3, L=4, XL=5, XXL=6) return (coef_multi) }
/client/coefMulti.R
no_license
badnane/RProject
R
false
false
268
r
coefMulti<-function(distance){ coef_multi<-switch(as.character(distance), XS=1, S=2, M=3, L=4, XL=5, XXL=6) return (coef_multi) }
#library(confusion_matrix) # Test to make sure our preventative "if statements" protect our function # Should only pass in a factor vector test_that("actual_y should be a vector.", { expect_error(confusion_matrix(tibble::tibble(""), c("1", "0")), "Sorry, actual_y should be a vector or factor.") }) test_that("pre...
/tests/testthat/test-confusion_matrix.R
permissive
UBC-MDS/RMLViz
R
false
false
1,289
r
#library(confusion_matrix) # Test to make sure our preventative "if statements" protect our function # Should only pass in a factor vector test_that("actual_y should be a vector.", { expect_error(confusion_matrix(tibble::tibble(""), c("1", "0")), "Sorry, actual_y should be a vector or factor.") }) test_that("pre...
#Julian Ramirez #Opens a connection over a zip or gzfile and reads the data require(raster) zipWrite <- function(rs, path, fname) { infile <- paste(path, "/", fname, sep="") #automatically detect the file type (zip or gzip) splt <- unlist(strsplit(fname, ".", fixed=T)) ext <- splt[length(splt)] ...
/gap-analysis/tomato/000.zipWrite.R
no_license
CIAT-DAPA/cwr_gap-analysis-cwr
R
false
false
1,412
r
#Julian Ramirez #Opens a connection over a zip or gzfile and reads the data require(raster) zipWrite <- function(rs, path, fname) { infile <- paste(path, "/", fname, sep="") #automatically detect the file type (zip or gzip) splt <- unlist(strsplit(fname, ".", fixed=T)) ext <- splt[length(splt)] ...
#!/usr/bin/env Rscript source("~/CMWT/common.R") source("topic.R") suppressPackageStartupMessages(require(mailR)) input_dates <- Sys.Date() - 1 if (lubridate::wday(input_dates) == 1) { input_dates <- as.Date((input_dates - 2):input_dates, "1970-01-01") } cat(paste0("[", Sys.time(), "]", " Start download file list...
/daily_tv.R
no_license
RomanKyrychenko/CMWT
R
false
false
3,115
r
#!/usr/bin/env Rscript source("~/CMWT/common.R") source("topic.R") suppressPackageStartupMessages(require(mailR)) input_dates <- Sys.Date() - 1 if (lubridate::wday(input_dates) == 1) { input_dates <- as.Date((input_dates - 2):input_dates, "1970-01-01") } cat(paste0("[", Sys.time(), "]", " Start download file list...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nightlights.R \name{getCtryRasterOutputFname} \alias{getCtryRasterOutputFname} \title{Constructs the name of the output raster} \usage{ getCtryRasterOutputFname(ctryCode, nlType, configName = pkgOptions(paste0("configName_", nlType)), mul...
/man/getCtryRasterOutputFname.Rd
no_license
anhnguyendepocen/Rnightlights
R
false
true
1,273
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nightlights.R \name{getCtryRasterOutputFname} \alias{getCtryRasterOutputFname} \title{Constructs the name of the output raster} \usage{ getCtryRasterOutputFname(ctryCode, nlType, configName = pkgOptions(paste0("configName_", nlType)), mul...
app <- ShinyDriver$new("../") app$snapshotInit("esdi_test_1") app$snapshot() app$setInputs(gi1_step = 0.475) app$setInputs(gi1_step = 0.3) app$setInputs(gi1_step = 0.8) app$setInputs(gg_step = 0.5) app$setInputs(gg_end = 1) app$setInputs(recalc = "click") app$snapshot()
/tests/esdi_test_1.R
permissive
gasparl/esdi
R
false
false
272
r
app <- ShinyDriver$new("../") app$snapshotInit("esdi_test_1") app$snapshot() app$setInputs(gi1_step = 0.475) app$setInputs(gi1_step = 0.3) app$setInputs(gi1_step = 0.8) app$setInputs(gg_step = 0.5) app$setInputs(gg_end = 1) app$setInputs(recalc = "click") app$snapshot()
#' Rainfall event determination from tipping bucket data #' #' @description #' Compute rainfall event variables based on time series of tipping bucket data with only one bucket. #' #' @param df dataframe with tipping bucket data #' @param ieHr numeric Interevent period in hours, defaults to 6, #' @param tips string C...
/R/RMeventsBuckets.R
permissive
jlthomps/Rainmaker
R
false
false
3,774
r
#' Rainfall event determination from tipping bucket data #' #' @description #' Compute rainfall event variables based on time series of tipping bucket data with only one bucket. #' #' @param df dataframe with tipping bucket data #' @param ieHr numeric Interevent period in hours, defaults to 6, #' @param tips string C...
if(getRversion() >= "2.15.1") utils::globalVariables(c("anglers", "trueeffort")) GetTotalValues <- structure( function # Conduct a creel survey of a population of anglers at a site # ############################################################################## # File: GetTotalValues.R ## author<< Steven H. R...
/R/GetTotalValues.R
no_license
stevenranney/creelSurvey
R
false
false
9,037
r
if(getRversion() >= "2.15.1") utils::globalVariables(c("anglers", "trueeffort")) GetTotalValues <- structure( function # Conduct a creel survey of a population of anglers at a site # ############################################################################## # File: GetTotalValues.R ## author<< Steven H. R...
#### # load term document matrices to calculate its sorted term frequency #### source('~/GitHub/jh_capstone/JHCap_lib.R') outpath <- "rawdata" x <- .002 input.idx <- c(seq(.002, .022, .002), seq(.03, .15, .01)) #input.idx <- seq(.002, .008, .002) for (x in input.idx) { print(x) ptm <- proc.time() subdir <- f...
/collate_coverage.R
no_license
alishway/jh_capstone
R
false
false
571
r
#### # load term document matrices to calculate its sorted term frequency #### source('~/GitHub/jh_capstone/JHCap_lib.R') outpath <- "rawdata" x <- .002 input.idx <- c(seq(.002, .022, .002), seq(.03, .15, .01)) #input.idx <- seq(.002, .008, .002) for (x in input.idx) { print(x) ptm <- proc.time() subdir <- f...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/calPlot.R \name{calPlot} \alias{calPlot} \title{Calibration plots for right censored data} \usage{ calPlot(object, time, formula, data, splitMethod = "none", B = 1, M, pseudo, type, showPseudo, pseudo.col = NULL, pseudo.pch = NULL, method...
/man/calPlot.Rd
no_license
jinshuai886/pec
R
false
true
7,867
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/calPlot.R \name{calPlot} \alias{calPlot} \title{Calibration plots for right censored data} \usage{ calPlot(object, time, formula, data, splitMethod = "none", B = 1, M, pseudo, type, showPseudo, pseudo.col = NULL, pseudo.pch = NULL, method...
dataset = read.csv('Social_Network_Ads.csv') dataset = dataset[2:5] #encode categorical variable as a factor dataset$Purchased = factor(dataset$Purchased, levels = c(0, 1)) dataset$Gender = ifelse(dataset$Gender == "Male", 1, 0) dataset$Gender = factor(dataset$Gender, levels = c(0, 1)) #train/test split sample = samp...
/logisticRegression/logReg1.R
no_license
SalDev40/R-Machine-Learning
R
false
false
878
r
dataset = read.csv('Social_Network_Ads.csv') dataset = dataset[2:5] #encode categorical variable as a factor dataset$Purchased = factor(dataset$Purchased, levels = c(0, 1)) dataset$Gender = ifelse(dataset$Gender == "Male", 1, 0) dataset$Gender = factor(dataset$Gender, levels = c(0, 1)) #train/test split sample = samp...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/adsensehost_functions.R \name{urlchannels.list} \alias{urlchannels.list} \title{List all host URL channels in the host AdSense account.} \usage{ urlchannels.list(adClientId, maxResults = NULL, pageToken = NULL) } \arguments{ \item{adClientId}...
/googleadsensehostv41.auto/man/urlchannels.list.Rd
permissive
Phippsy/autoGoogleAPI
R
false
true
1,042
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/adsensehost_functions.R \name{urlchannels.list} \alias{urlchannels.list} \title{List all host URL channels in the host AdSense account.} \usage{ urlchannels.list(adClientId, maxResults = NULL, pageToken = NULL) } \arguments{ \item{adClientId}...
library(ISLR); library(tidyverse); library(class) library(MASS); library(boot) set.seed(10) ### LOGISTIC REGRESSION ### # use the variables from the subset selection to create a logistic regression model logreg.fit <- glm(up~lag1+lag2+lag5+volume.today+volume.lag1+volume.lag4+volume.lag5, ...
/data_model_building.R
no_license
nominpurevj/stock_market_proj
R
false
false
2,097
r
library(ISLR); library(tidyverse); library(class) library(MASS); library(boot) set.seed(10) ### LOGISTIC REGRESSION ### # use the variables from the subset selection to create a logistic regression model logreg.fit <- glm(up~lag1+lag2+lag5+volume.today+volume.lag1+volume.lag4+volume.lag5, ...
/04_住基データ_24区別人口_5歳以下マップ.R
no_license
tadakazu1972/ggplot2_geom_bar
R
false
false
1,819
r
spring <- function () { .C("spring", PACKAGE = "metaIbasam") invisible(NULL) }
/master/R/spring.R
no_license
Ibasam/MetaIBASAM
R
false
false
88
r
spring <- function () { .C("spring", PACKAGE = "metaIbasam") invisible(NULL) }
# ---------------------------------------------------------------------- # Information # ---------------------------------------------------------------------- # # 14D006 Stochastic Models and Optimization # # (Authors) Daniel Bestard Delgado, Michael Cameron, # Hans-Peter Höllwirth, Akhil Lohia # (Date) ...
/project/code/project.R
no_license
bgse-a-team/Stoch
R
false
false
14,690
r
# ---------------------------------------------------------------------- # Information # ---------------------------------------------------------------------- # # 14D006 Stochastic Models and Optimization # # (Authors) Daniel Bestard Delgado, Michael Cameron, # Hans-Peter Höllwirth, Akhil Lohia # (Date) ...
\name{bioinfer.new.JGR} \alias{bioinfer.new.JGR} \title{Dialog box for predicting env. conditions from biological observations} \description{ This module estimates environmental conditions from observations of benthic macroinvertebrates for a set of sites, by combining observations of each particular taxon ...
/man/bioinfer.new.JGR.Rd
no_license
cran/CADStat
R
false
false
5,081
rd
\name{bioinfer.new.JGR} \alias{bioinfer.new.JGR} \title{Dialog box for predicting env. conditions from biological observations} \description{ This module estimates environmental conditions from observations of benthic macroinvertebrates for a set of sites, by combining observations of each particular taxon ...
data <- read.csv("./Database/DataFrame.csv") FTable <- read.csv("./Database/tabelaF.5per.csv") #Analise das variaveis e divisão dos pontos n <- length(data$Local) GeralMean <- mean(data$Computador) pValorMaximo <- FTable$X2[n-3] InvestimentoD1 <- quantile(data$Investimento, probs = 1/3) InvestimentoD2 <- quantile(dat...
/Manova.R
no_license
GabrielJospin/MQA_Atividade_3
R
false
false
6,116
r
data <- read.csv("./Database/DataFrame.csv") FTable <- read.csv("./Database/tabelaF.5per.csv") #Analise das variaveis e divisão dos pontos n <- length(data$Local) GeralMean <- mean(data$Computador) pValorMaximo <- FTable$X2[n-3] InvestimentoD1 <- quantile(data$Investimento, probs = 1/3) InvestimentoD2 <- quantile(dat...
\name{varimp} \alias{varimp} \alias{varimp.constparty} \alias{varimp.cforest} \title{ Variable Importance } \description{ Standard and conditional variable importance for `cforest', following the permutation principle of the `mean decrease in accuracy' importance in `randomForest'. } \usage{ \method{varimp}{con...
/partykit-master/man/varimp.Rd
no_license
tulliapadellini/energytree
R
false
false
5,206
rd
\name{varimp} \alias{varimp} \alias{varimp.constparty} \alias{varimp.cforest} \title{ Variable Importance } \description{ Standard and conditional variable importance for `cforest', following the permutation principle of the `mean decrease in accuracy' importance in `randomForest'. } \usage{ \method{varimp}{con...
dat.normand1999 <- read.table("data-raw/dat.normand1999.txt", header=TRUE, stringsAsFactors=FALSE) save(dat.normand1999, file="data/dat.normand1999.rda")
/data-raw/dat.normand1999.r
no_license
qsh7950/metadat
R
false
false
156
r
dat.normand1999 <- read.table("data-raw/dat.normand1999.txt", header=TRUE, stringsAsFactors=FALSE) save(dat.normand1999, file="data/dat.normand1999.rda")
# Internal functions that do useful things frequently required in other functions cancensus_base_url <- function(){ url <- getOption("cancensus.base_url") if (is.null(url)) url <- "https://censusmapper.ca" url } robust_api_key <- function(api_key){ api_key <- if (is.null(api_key) && nchar(Sys.getenv("CM_API_K...
/R/helpers.R
no_license
minghao2016/cancensus
R
false
false
2,910
r
# Internal functions that do useful things frequently required in other functions cancensus_base_url <- function(){ url <- getOption("cancensus.base_url") if (is.null(url)) url <- "https://censusmapper.ca" url } robust_api_key <- function(api_key){ api_key <- if (is.null(api_key) && nchar(Sys.getenv("CM_API_K...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/push.R \name{push_imgur_config} \alias{push_imgur_config} \title{Opens a dialog with settings.} \usage{ push_imgur_config() } \value{ Nothing. } \description{ Opens a dialog with settings. } \examples{ \dontrun{push_imgur_config()} }
/man/push_imgur_config.Rd
no_license
luisdamiano/PushPlots
R
false
true
312
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/push.R \name{push_imgur_config} \alias{push_imgur_config} \title{Opens a dialog with settings.} \usage{ push_imgur_config() } \value{ Nothing. } \description{ Opens a dialog with settings. } \examples{ \dontrun{push_imgur_config()} }
library(shape) ### Name: filledellipse ### Title: adds a colored and rotated ellipse to a plot ### Aliases: filledellipse ### Keywords: aplot ### ** Examples color <- greycol(50) dr <- 0.05 emptyplot(xlim = c(-2, 2), ylim = c(-2, 2), col = color[length(color)], main = "filledellipse") filledellipse(rx...
/data/genthat_extracted_code/shape/examples/filledellipse.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,380
r
library(shape) ### Name: filledellipse ### Title: adds a colored and rotated ellipse to a plot ### Aliases: filledellipse ### Keywords: aplot ### ** Examples color <- greycol(50) dr <- 0.05 emptyplot(xlim = c(-2, 2), ylim = c(-2, 2), col = color[length(color)], main = "filledellipse") filledellipse(rx...
library(RMariaDB) library(tidyverse) library(lubridate) source("01_functions.R") source("02_variables.R") HRSAMPLE <- dbConnect(RMariaDB::MariaDB(), user='newuser', password='newuser', dbname='hrsample', host='localhost') dbListTables(HRSAMPLE) # Build contact table ---------------------------------------------------...
/11_contact_info.R
no_license
nagaraja06/sample-hr-database
R
false
false
6,784
r
library(RMariaDB) library(tidyverse) library(lubridate) source("01_functions.R") source("02_variables.R") HRSAMPLE <- dbConnect(RMariaDB::MariaDB(), user='newuser', password='newuser', dbname='hrsample', host='localhost') dbListTables(HRSAMPLE) # Build contact table ---------------------------------------------------...
# pp_score -------------------------------------------------------------------- #' @title pp_score #' #' @description Calculates predictive power score for `x` predicts `y`. Where #' `x` can be multiple features in `df`. This is a light (wip) implementation #' which for now only supports binary classification and x as...
/R/functions.R
permissive
Gulde91/Predictive_power_score
R
false
false
4,810
r
# pp_score -------------------------------------------------------------------- #' @title pp_score #' #' @description Calculates predictive power score for `x` predicts `y`. Where #' `x` can be multiple features in `df`. This is a light (wip) implementation #' which for now only supports binary classification and x as...
library(glmnet) mydata = read.table("./TrainingSet/Correlation/skin.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.02,family="gaussian",standardize=FALSE) sink('./Model/EN/Correlation/skin/skin_012.txt',append=...
/Model/EN/Correlation/skin/skin_012.R
no_license
leon1003/QSMART
R
false
false
355
r
library(glmnet) mydata = read.table("./TrainingSet/Correlation/skin.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.02,family="gaussian",standardize=FALSE) sink('./Model/EN/Correlation/skin/skin_012.txt',append=...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/var_error_tsa.R \name{var_error_r_bvirr} \alias{var_error_r_bvirr} \title{Taylor series approximation of the sampling variance of correlations corrected using the bivariate indirect range restriction correction (Case V)} \usage{ var_error_r_b...
/man/var_error_r_bvirr.Rd
no_license
abblake/psychmeta
R
false
true
8,911
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/var_error_tsa.R \name{var_error_r_bvirr} \alias{var_error_r_bvirr} \title{Taylor series approximation of the sampling variance of correlations corrected using the bivariate indirect range restriction correction (Case V)} \usage{ var_error_r_b...
surfacearea.estimate = function( bcp, O ) { nms = O$plotdata[ O$bottom.contact,] if (! ( exists( "wingspread", nms) & exists( "doorspread", nms) ) ) { warning( "Wingspread and doorspread were not found" ) return(NA) } nms$sm.wingspread = NA nms$sm.doorspread = NA nd = nrow(nms) if (0) { ...
/netmensuration/src/_Rfunctions/surfacearea.estimate.r
no_license
fernandomayer/ecomod
R
false
false
7,115
r
surfacearea.estimate = function( bcp, O ) { nms = O$plotdata[ O$bottom.contact,] if (! ( exists( "wingspread", nms) & exists( "doorspread", nms) ) ) { warning( "Wingspread and doorspread were not found" ) return(NA) } nms$sm.wingspread = NA nms$sm.doorspread = NA nd = nrow(nms) if (0) { ...
function (m, id, cm1, d) { e <- get("data.env", .GlobalEnv) e[["muP1"]][[length(e[["muP1"]]) + 1]] <- list(m = m, id = id, cm1 = cm1, d = d) .Call("_trackdem_muP1", PACKAGE = "trackdem", m, id, cm1, d) }
/valgrind_test_dir/muP1-test.R
no_license
akhikolla/RcppDeepStateTest
R
false
false
235
r
function (m, id, cm1, d) { e <- get("data.env", .GlobalEnv) e[["muP1"]][[length(e[["muP1"]]) + 1]] <- list(m = m, id = id, cm1 = cm1, d = d) .Call("_trackdem_muP1", PACKAGE = "trackdem", m, id, cm1, d) }
library(readr) library("jsonlite") #visit the following links to download .csv files survey (1970 to present). # right-click "Access" button next to Dataset, English and select "copy link address" # then paste the URL into the download.file() function below. # https://open.canada.ca/data/en/dataset/86af7918-c2ab-4f1a...
/R/download_cpac.R
permissive
pinskylab/OceanAdapt
R
false
false
4,638
r
library(readr) library("jsonlite") #visit the following links to download .csv files survey (1970 to present). # right-click "Access" button next to Dataset, English and select "copy link address" # then paste the URL into the download.file() function below. # https://open.canada.ca/data/en/dataset/86af7918-c2ab-4f1a...
\name{corres.fnc} \alias{corres.fnc} %- Also NEED an '\alias' for EACH other topic documented here. \title{Correspondence Analysis} \description{ Correspondence analysis for a contingency table. } \usage{ corres.fnc(xtab) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{xtab}{A data frame...
/man/corres.fnc.Rd
no_license
cran/languageR
R
false
false
2,603
rd
\name{corres.fnc} \alias{corres.fnc} %- Also NEED an '\alias' for EACH other topic documented here. \title{Correspondence Analysis} \description{ Correspondence analysis for a contingency table. } \usage{ corres.fnc(xtab) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{xtab}{A data frame...
#-----Rcode starts----- #--clear the variable list and set the working directory----# rm(list = ls()) #--clears all lists------# cat("\14") options(warn=0) #----set packages--------------------------------------------------------# library("ncdf") library("raster") library("sp") library("rgeos") library("rgdal") li...
/agmesh-netcdf_read.R
no_license
erichseamon/dmine
R
false
false
3,269
r
#-----Rcode starts----- #--clear the variable list and set the working directory----# rm(list = ls()) #--clears all lists------# cat("\14") options(warn=0) #----set packages--------------------------------------------------------# library("ncdf") library("raster") library("sp") library("rgeos") library("rgdal") li...
### STANDALONE STRENGTH RATING library(mgcv) # read data from 100, cleaned dataset, preprocessed from excel. d100 <- read.csv("dataset-N100.csv", sep = ";", dec = ".") ### factorize things d100$D_Gender <- factor(d100$D_Gender,levels=c("Male","Female"),labels=c("Male","Female")) d100$D_ComputerScienceBackground <- f...
/statistics/personality/study-02/tmp.R
no_license
joydo/Dissertation
R
false
false
2,432
r
### STANDALONE STRENGTH RATING library(mgcv) # read data from 100, cleaned dataset, preprocessed from excel. d100 <- read.csv("dataset-N100.csv", sep = ";", dec = ".") ### factorize things d100$D_Gender <- factor(d100$D_Gender,levels=c("Male","Female"),labels=c("Male","Female")) d100$D_ComputerScienceBackground <- f...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SER.R \name{SER} \alias{SER} \title{Short-period Environmental Regime (SER)} \usage{ SER( env_date, env_val, sample_date, days_bf = NULL, type = NULL, include_sample.date = FALSE, include_successive = FALSE, simplify = TRUE ) ...
/man/SER.Rd
no_license
kun-ecology/SER
R
false
true
4,509
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SER.R \name{SER} \alias{SER} \title{Short-period Environmental Regime (SER)} \usage{ SER( env_date, env_val, sample_date, days_bf = NULL, type = NULL, include_sample.date = FALSE, include_successive = FALSE, simplify = TRUE ) ...
summary.MCA <- function(object,nb.dec=3,nbelements=10,nbind=nbelements,ncp=3,align.names=TRUE,file="",...){ print2 <- function(mat,file=""){ if (file=="") print(mat, quote = FALSE, right = TRUE) else { mat <- cbind(format(rownames(mat)),mat) mat <- rbind(colnames(mat),mat) mat2 <- cbind(format(m...
/FactoMineR/R/summary.MCA.r
no_license
Etjean/M1stuff
R
false
false
6,446
r
summary.MCA <- function(object,nb.dec=3,nbelements=10,nbind=nbelements,ncp=3,align.names=TRUE,file="",...){ print2 <- function(mat,file=""){ if (file=="") print(mat, quote = FALSE, right = TRUE) else { mat <- cbind(format(rownames(mat)),mat) mat <- rbind(colnames(mat),mat) mat2 <- cbind(format(m...
#Notes: #This has been updated to work with the most recent version of MGCV - 1.8 - 17 #Local version of R uses MGCV 1.8-7 at time of initial creation #Key changes: #pls and gdi have additonal parameters in their C functions #SmoothCon uses a different methodology to scale the penalty matrix - changes reflexted in...
/Functions.R
no_license
KhalimCK/Single-Index-Model
R
false
false
388,005
r
#Notes: #This has been updated to work with the most recent version of MGCV - 1.8 - 17 #Local version of R uses MGCV 1.8-7 at time of initial creation #Key changes: #pls and gdi have additonal parameters in their C functions #SmoothCon uses a different methodology to scale the penalty matrix - changes reflexted in...
#' Run multiple Stock Synthesis models #' #' Loops over a vector of directories and iteratively runs SS in each one #' #' @param dirvec List of directories containing the model files #' @param model Executable name or path to executable (absolute path, or relative #' to the working directory). First, if exe_in_path is...
/R/run_SS_models.R
no_license
cgrandin/r4ss
R
false
false
6,680
r
#' Run multiple Stock Synthesis models #' #' Loops over a vector of directories and iteratively runs SS in each one #' #' @param dirvec List of directories containing the model files #' @param model Executable name or path to executable (absolute path, or relative #' to the working directory). First, if exe_in_path is...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_expression_data_gemma.R \name{get_expression_data_gemma} \alias{get_expression_data_gemma} \title{Obtain expression matrix from the GEMMA database} \usage{ get_expression_data_gemma(gseid, filtered = "true") } \arguments{ \item{gseid}{GEO...
/EGAD/man/get_expression_data_gemma.Rd
no_license
kantale/EGAD
R
false
true
680
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_expression_data_gemma.R \name{get_expression_data_gemma} \alias{get_expression_data_gemma} \title{Obtain expression matrix from the GEMMA database} \usage{ get_expression_data_gemma(gseid, filtered = "true") } \arguments{ \item{gseid}{GEO...
# Converting to tible object # # 2020-01-22 T10:48 RT df_ts <- subset %>% tibble::rownames_to_column() %>% as_tibble() %>% mutate(date = as.POSIXct(timestamp)) %>% select(-one_of('rowname')) # Head of sample data head(df_ts)
/Anomaly detection/converte_to_tibble_03.R
no_license
tarasevic-r/Vibro-acoustic
R
false
false
236
r
# Converting to tible object # # 2020-01-22 T10:48 RT df_ts <- subset %>% tibble::rownames_to_column() %>% as_tibble() %>% mutate(date = as.POSIXct(timestamp)) %>% select(-one_of('rowname')) # Head of sample data head(df_ts)
# .onLoad <- function(lib, pkg){ # require(methods) # } setClass("amList", contains = "list") `lamodified` <- function (list, FUN, applyFUN2X = function(X, FUN, ...) FUN(X, ...), ...) { fits <- lapply(list, function(X) applyFUN2X(X, FUN, ...)) result <- new("amList", fits) if ...
/R/amList.R
no_license
cran/richards
R
false
false
3,900
r
# .onLoad <- function(lib, pkg){ # require(methods) # } setClass("amList", contains = "list") `lamodified` <- function (list, FUN, applyFUN2X = function(X, FUN, ...) FUN(X, ...), ...) { fits <- lapply(list, function(X) applyFUN2X(X, FUN, ...)) result <- new("amList", fits) if ...
#' A nice, pastel color palette #' #' A nice, pastel color palette #' #' A nice, pastel color palette. The \code{f2pal} and \code{f2leg} convert #' factors to colors. \code{f2pal} converts a factors to colors directly, #' while \code{f2pal} returns a data frame with one column corresponding to #' factor levels, and ano...
/R/mypalette.R
no_license
january3/myfuncs
R
false
false
2,418
r
#' A nice, pastel color palette #' #' A nice, pastel color palette #' #' A nice, pastel color palette. The \code{f2pal} and \code{f2leg} convert #' factors to colors. \code{f2pal} converts a factors to colors directly, #' while \code{f2pal} returns a data frame with one column corresponding to #' factor levels, and ano...
#' Find the closest NOAA station #' #' Finds the closest NOAA station based on a given latitude, longitude. Only considers NOAA stations that contain temperature, precipitation, and wind speed for the provided dates and are within +/- 1 degree. #' #' @param .date_start the starting date that the NOAA station should con...
/R/helpers.R
permissive
joemarlo/simpleweather
R
false
false
2,875
r
#' Find the closest NOAA station #' #' Finds the closest NOAA station based on a given latitude, longitude. Only considers NOAA stations that contain temperature, precipitation, and wind speed for the provided dates and are within +/- 1 degree. #' #' @param .date_start the starting date that the NOAA station should con...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methylSig-package.R \docType{package} \name{methylSig} \alias{methylSig} \alias{methylSig-package} \title{MethylSig: Differential Methylation Testing for WGBS and RRBS Data} \description{ MethylSig is a package for testing for differential...
/man/methylSig.Rd
no_license
ajpatel2007/methylSig
R
false
true
1,243
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methylSig-package.R \docType{package} \name{methylSig} \alias{methylSig} \alias{methylSig-package} \title{MethylSig: Differential Methylation Testing for WGBS and RRBS Data} \description{ MethylSig is a package for testing for differential...
library(chromVAR) library(motifmatchr) library(BSgenome.Hsapiens.NCBI.GRCh38) library(RColorBrewer) args = commandArgs(trailingOnly=TRUE) peak_file = args[1] bam_list = args[2:length(args)] read_Narrowpeaks = function (filename, width=500, non_overlapping = TRUE) { cn <- c("chr", "start", "end", "name", "score", "s...
/steps/chromvar-entry-point.R
no_license
mruffalo/chromvar-cwl
R
false
false
2,873
r
library(chromVAR) library(motifmatchr) library(BSgenome.Hsapiens.NCBI.GRCh38) library(RColorBrewer) args = commandArgs(trailingOnly=TRUE) peak_file = args[1] bam_list = args[2:length(args)] read_Narrowpeaks = function (filename, width=500, non_overlapping = TRUE) { cn <- c("chr", "start", "end", "name", "score", "s...
library(BTYD) ### Name: bgnbd.PlotFreqVsConditionalExpectedFrequency ### Title: BG/NBD Plot Frequency vs. Conditional Expected Frequency ### Aliases: bgnbd.PlotFreqVsConditionalExpectedFrequency ### ** Examples data(cdnowSummary) cal.cbs <- cdnowSummary$cbs # cal.cbs already has column names required by method # ...
/data/genthat_extracted_code/BTYD/examples/bgnbd.PlotFreqVsConditionalExpectedFrequency.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
811
r
library(BTYD) ### Name: bgnbd.PlotFreqVsConditionalExpectedFrequency ### Title: BG/NBD Plot Frequency vs. Conditional Expected Frequency ### Aliases: bgnbd.PlotFreqVsConditionalExpectedFrequency ### ** Examples data(cdnowSummary) cal.cbs <- cdnowSummary$cbs # cal.cbs already has column names required by method # ...
library(raster) # Source files with functions useful/data prep ifelse(dir.exists("/Users/amina/Documents/Stanford/precip-price"), setwd("/Users/amina/Documents/Stanford/precip-price"), setwd("/oak/stanford/groups/omramom/group_members/aminaly/precip-price")) list_files <- list.files(paste0(getwd(), "/do...
/merge_croplands.R
no_license
aminaly/precip-price
R
false
false
493
r
library(raster) # Source files with functions useful/data prep ifelse(dir.exists("/Users/amina/Documents/Stanford/precip-price"), setwd("/Users/amina/Documents/Stanford/precip-price"), setwd("/oak/stanford/groups/omramom/group_members/aminaly/precip-price")) list_files <- list.files(paste0(getwd(), "/do...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/labelMutationGroup.R \name{labelMutationGroup} \alias{labelMutationGroup} \title{Title function for labelling mutation group} \usage{ labelMutationGroup(data) } \arguments{ \item{data}{: data with tumor type (i.e. T1, T2, N) labelled} } \valu...
/man/labelMutationGroup.Rd
no_license
liujohnson118/FluidigmValidation
R
false
true
526
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/labelMutationGroup.R \name{labelMutationGroup} \alias{labelMutationGroup} \title{Title function for labelling mutation group} \usage{ labelMutationGroup(data) } \arguments{ \item{data}{: data with tumor type (i.e. T1, T2, N) labelled} } \valu...
msc.courses <- read.csv("./www/msc_courses.csv", check.names=FALSE) bsc.courses <- read.csv("./www/bsc_courses.csv", check.names=FALSE) scholar <- read.csv("./www/scholarships.csv", check.names=FALSE) # Create a list of the taught languages on all courses ## Found in format as a comma seperated list, so is split ## an...
/tags.R
no_license
ruparee/data-courses
R
false
false
1,117
r
msc.courses <- read.csv("./www/msc_courses.csv", check.names=FALSE) bsc.courses <- read.csv("./www/bsc_courses.csv", check.names=FALSE) scholar <- read.csv("./www/scholarships.csv", check.names=FALSE) # Create a list of the taught languages on all courses ## Found in format as a comma seperated list, so is split ## an...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tar_make_future.R \name{tar_make_future} \alias{tar_make_future} \title{Run a pipeline of targets in parallel with transient \code{future} workers.} \usage{ tar_make_future( names = NULL, reporter = Sys.getenv("TAR_MAKE_REPORTER", unset =...
/man/tar_make_future.Rd
permissive
matthiasgomolka/targets
R
false
true
2,909
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tar_make_future.R \name{tar_make_future} \alias{tar_make_future} \title{Run a pipeline of targets in parallel with transient \code{future} workers.} \usage{ tar_make_future( names = NULL, reporter = Sys.getenv("TAR_MAKE_REPORTER", unset =...
#' Determines Prior ESS for fixed values of sigma_alpha^2 and sigmabeta^2 #' #'Uses the prior means for the intercept and slope parameters and the number of doses to obtain an approximate prior ESS for the given prior variances. The user should calibrate varint and varbeta with varint>varbeta such that the ESS value ...
/fuzzedpackages/SubTite/R/GETESS.R
no_license
akhikolla/testpackages
R
false
false
9,033
r
#' Determines Prior ESS for fixed values of sigma_alpha^2 and sigmabeta^2 #' #'Uses the prior means for the intercept and slope parameters and the number of doses to obtain an approximate prior ESS for the given prior variances. The user should calibrate varint and varbeta with varint>varbeta such that the ESS value ...
------------------------------------------------------------------------------- # Master of Science in Artificial Intelligence # Authors: Guillermo López # Date: 2020, September 27th ------------------------------------------------------------------------------ library(dplyr) library(ggplot2) library(caret) # r...
/sistemas_inteligentes/complementary_analysis.R
no_license
JgLgRigel/MINTA
R
false
false
1,838
r
------------------------------------------------------------------------------- # Master of Science in Artificial Intelligence # Authors: Guillermo López # Date: 2020, September 27th ------------------------------------------------------------------------------ library(dplyr) library(ggplot2) library(caret) # r...
#Create a form from a folder with json documents describing the fields fncCreateUI <- function(path, verbose = F,...){ form <- unlist(strsplit(path,"/"))[length(unlist(strsplit(path,"/")))] #function to replace null with NA if needed and evaluate a function that was given in the field description f <- functio...
/source/formparser.R
no_license
joelgsponer/ngs-dashboard
R
false
false
17,309
r
#Create a form from a folder with json documents describing the fields fncCreateUI <- function(path, verbose = F,...){ form <- unlist(strsplit(path,"/"))[length(unlist(strsplit(path,"/")))] #function to replace null with NA if needed and evaluate a function that was given in the field description f <- functio...
#' @title Plot the evolution of fitness values #' @name plotEvolution #' @description Plot the evolution of energy outputs and efficiency rates #' over the whole generations. Plots min, mean and max values. #' @export #' #' @importFrom graphics plot lines grid points par #' #' @param result The output matrix of \code{...
/R/plotEvolution.R
no_license
joaoneves1/windfarmGA
R
false
false
2,852
r
#' @title Plot the evolution of fitness values #' @name plotEvolution #' @description Plot the evolution of energy outputs and efficiency rates #' over the whole generations. Plots min, mean and max values. #' @export #' #' @importFrom graphics plot lines grid points par #' #' @param result The output matrix of \code{...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ttsdf2raster.R \name{ttsdf2raster} \alias{ttsdf2raster} \title{Function to convert TIMESAT tts data.frame an R raster.} \usage{ ttsdf2raster(x, base_image) } \arguments{ \item{x}{A TTS data.frame as output by tts2df} \item{base_image}{A stri...
/man/ttsdf2raster.Rd
no_license
sumanjnu/teamlucc
R
false
true
691
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ttsdf2raster.R \name{ttsdf2raster} \alias{ttsdf2raster} \title{Function to convert TIMESAT tts data.frame an R raster.} \usage{ ttsdf2raster(x, base_image) } \arguments{ \item{x}{A TTS data.frame as output by tts2df} \item{base_image}{A stri...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/h2otools_base.R \name{h2oToRDF} \alias{h2oToRDF} \title{H2OParsedData object to R data.frame object} \usage{ h2oToRDF(h2oParsedData, use_hex_string = FALSE, stringsAsFactors = FALSE, blank.lines.skip = FALSE, ...) } \description{ \code{h2oT...
/man/h2oToRDF.Rd
no_license
rocalabern/h2otools
R
false
true
520
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/h2otools_base.R \name{h2oToRDF} \alias{h2oToRDF} \title{H2OParsedData object to R data.frame object} \usage{ h2oToRDF(h2oParsedData, use_hex_string = FALSE, stringsAsFactors = FALSE, blank.lines.skip = FALSE, ...) } \description{ \code{h2oT...
# Chapter 07. Practice # 2-Sample T test # 1. mtcars 데이터셋에서 자동차 기어 종류(am: 오토/수동)에 따른 mpg의 차이가 # 통계적으로 유의한지 t-test를 통해 확인해 보시오. head(mtcars) str(mtcars) auto <- subset(mtcars$mpg, mtcars$am==1); length(auto); mean(auto) manu <- subset(mtcars$mpg, mtcars$am==0); length(manu); mean(manu) sd(auto) sd(manu) t.test(mtcars...
/Chapter07/ch07_Practice.R
no_license
Blockhead4/R-Statistics
R
false
false
8,637
r
# Chapter 07. Practice # 2-Sample T test # 1. mtcars 데이터셋에서 자동차 기어 종류(am: 오토/수동)에 따른 mpg의 차이가 # 통계적으로 유의한지 t-test를 통해 확인해 보시오. head(mtcars) str(mtcars) auto <- subset(mtcars$mpg, mtcars$am==1); length(auto); mean(auto) manu <- subset(mtcars$mpg, mtcars$am==0); length(manu); mean(manu) sd(auto) sd(manu) t.test(mtcars...
library(testit) imgVisList <- read.csv("/home/alina/Documents/Universität/2016W/Multimedia Search and Retrieval/Project/MMSearch-Retrieval_2016_MainProject/MMSR_Project_ImagerRetrieval/src/scripts/finalProduct/retrievedImages.csv", header = FALSE) monumentList <- list.dirs(path="/home/alina/Docu...
/MMSR_Project_ImagerRetrieval/src/scripts/finalProduct/R/combineVisTxtDesc.R
no_license
ntsmwk/MMSearch-Retrieval_2016_MainProject
R
false
false
3,489
r
library(testit) imgVisList <- read.csv("/home/alina/Documents/Universität/2016W/Multimedia Search and Retrieval/Project/MMSearch-Retrieval_2016_MainProject/MMSR_Project_ImagerRetrieval/src/scripts/finalProduct/retrievedImages.csv", header = FALSE) monumentList <- list.dirs(path="/home/alina/Docu...
mediacontaminante<- function(directorio="~/GitHub/Programacion_Actuarial_III_OT16/specdata/specdata",contaminante,id=1:332){ getwd() setwd("~/GitHub/Programacion_Actuarial_III_OT16/specdata/specdata") promedio<-0 for (i in id){ if (contaminante=="sulfato"){ if(i<10){ c<- paste("00",i,".csv",se...
/mediacontaminante.R
no_license
FranciscoGarCar/Programacion_Actuarial_III_OT16
R
false
false
1,828
r
mediacontaminante<- function(directorio="~/GitHub/Programacion_Actuarial_III_OT16/specdata/specdata",contaminante,id=1:332){ getwd() setwd("~/GitHub/Programacion_Actuarial_III_OT16/specdata/specdata") promedio<-0 for (i in id){ if (contaminante=="sulfato"){ if(i<10){ c<- paste("00",i,".csv",se...
read.emsa = function(File) { File = file(File, 'r') Lines = readLines(File) close(File) r(Header, Lines) %=% read.emsa.header(Lines) read.emsa.spectrum(Header, Lines) } read.emsa.header = function(Lines) { II = 1 Header = list() while (1) { if (II > length(Lines)) { break } Line = Lines[[...
/rate-peak-fit/emsa.R
no_license
ellbur/little-stuff
R
false
false
3,205
r
read.emsa = function(File) { File = file(File, 'r') Lines = readLines(File) close(File) r(Header, Lines) %=% read.emsa.header(Lines) read.emsa.spectrum(Header, Lines) } read.emsa.header = function(Lines) { II = 1 Header = list() while (1) { if (II > length(Lines)) { break } Line = Lines[[...
library("RSQLite") #### Create Sqlite DB #### # db <- dbConnect(SQLite(), dbname = "./data/DB/D.db") # # for (i in 1:nrow(data.loc)){ # data.Daily[[i]]$Date <- as.character(data.Daily[[i]]$Date) # dbWriteTable(db, gsub(".F","",data.loc$Ticker[i], fixed = TRUE), data.Daily[[i]], append = FALSE) # } # ...
/DBSqlite.R
no_license
florintoth/TrendTrekker
R
false
false
3,043
r
library("RSQLite") #### Create Sqlite DB #### # db <- dbConnect(SQLite(), dbname = "./data/DB/D.db") # # for (i in 1:nrow(data.loc)){ # data.Daily[[i]]$Date <- as.character(data.Daily[[i]]$Date) # dbWriteTable(db, gsub(".F","",data.loc$Ticker[i], fixed = TRUE), data.Daily[[i]], append = FALSE) # } # ...
ll <- function( string="" , human=TRUE , sortBy="name", own=FALSE , lines=FALSE , threads=getOption("threads",1L) ){ s <- paste0(string,collapse=" ") #print(s) if(sortBy=="name"){ sortarg = "" } else if(sortBy=="size"){ sortarg = "S" } else if(sortBy=="date" | sortBy=="time"){ sortarg = "t" } ...
/R/tools.R
permissive
dvera/conifur
R
false
false
9,327
r
ll <- function( string="" , human=TRUE , sortBy="name", own=FALSE , lines=FALSE , threads=getOption("threads",1L) ){ s <- paste0(string,collapse=" ") #print(s) if(sortBy=="name"){ sortarg = "" } else if(sortBy=="size"){ sortarg = "S" } else if(sortBy=="date" | sortBy=="time"){ sortarg = "t" } ...
Clean_Pollution_Historical <- function(df, write_out = TRUE) { # Clean All Historical Data df <- tbl_df(df) %>% setNames(toupper(gsub(" ","_", names(.)))) %>% rename(DATE = DATE_LOCAL) %>% group_by(ADDRESS, DATE, STATE, CITY, COUNTY, SITE_NUM) %>% summarise(NO2_MEAN = me...
/Model Code/Clean Code/2 - US Pollution Historical Clean.R
no_license
dantetrick/US-Pollution-R-Server-Demo
R
false
false
2,129
r
Clean_Pollution_Historical <- function(df, write_out = TRUE) { # Clean All Historical Data df <- tbl_df(df) %>% setNames(toupper(gsub(" ","_", names(.)))) %>% rename(DATE = DATE_LOCAL) %>% group_by(ADDRESS, DATE, STATE, CITY, COUNTY, SITE_NUM) %>% summarise(NO2_MEAN = me...
#' @name lgb.plot.interpretation #' @title Plot feature contribution as a bar graph #' @description Plot previously calculated feature contribution as a bar graph. #' @param tree_interpretation_dt a \code{data.table} returned by \code{\link{lgb.interprete}}. #' @param top_n maximal number of top features to include int...
/R-package/R/lgb.plot.interpretation.R
permissive
feedzai/LightGBM
R
false
false
4,667
r
#' @name lgb.plot.interpretation #' @title Plot feature contribution as a bar graph #' @description Plot previously calculated feature contribution as a bar graph. #' @param tree_interpretation_dt a \code{data.table} returned by \code{\link{lgb.interprete}}. #' @param top_n maximal number of top features to include int...
## Matrix inversion is usually a costly computation and there may be some ## benefit to caching the inverse of a matrix rather than computing it ## repeatedly. ## The following pair of functions cache the inverse of a matrix. ## This function creates a special "matrix" object that can cache its inverse. makeCache...
/cachematrix.R
no_license
Lambert-Shirzad/Coursera_R_Programming_Assignment2
R
false
false
1,548
r
## Matrix inversion is usually a costly computation and there may be some ## benefit to caching the inverse of a matrix rather than computing it ## repeatedly. ## The following pair of functions cache the inverse of a matrix. ## This function creates a special "matrix" object that can cache its inverse. makeCache...
context("data") tech.data = suppressWarnings(foreign::read.spss("http://wiki.q-researchsoftware.com/images/f/f1/Technology_2017.sav", to.data.frame = TRUE)) tech.design = read.csv("http://wiki.q-researchsoftware.com/images/7/78/Technology_MaxDiff_Design.csv") best = tech.data[, c("Q5a_left", "Q5b_left", "Q5c_left", "Q...
/tests/testthat/test-data.R
no_license
anhnguyendepocen/flipMaxDiff
R
false
false
7,394
r
context("data") tech.data = suppressWarnings(foreign::read.spss("http://wiki.q-researchsoftware.com/images/f/f1/Technology_2017.sav", to.data.frame = TRUE)) tech.design = read.csv("http://wiki.q-researchsoftware.com/images/7/78/Technology_MaxDiff_Design.csv") best = tech.data[, c("Q5a_left", "Q5b_left", "Q5c_left", "Q...
#' Simulation from a Bivariate Copula #' #' This function simulates from a given parametric bivariate copula. #' #' If the family and parameter specification is stored in a \code{\link{BiCop}} #' object \code{obj}, the alternative version #' \preformatted{BiCopSim(N, obj)} #' can be used. #' #' @param N Number of bivar...
/R/BiCopSim.R
no_license
tvatter/VineCopula
R
false
false
5,305
r
#' Simulation from a Bivariate Copula #' #' This function simulates from a given parametric bivariate copula. #' #' If the family and parameter specification is stored in a \code{\link{BiCop}} #' object \code{obj}, the alternative version #' \preformatted{BiCopSim(N, obj)} #' can be used. #' #' @param N Number of bivar...
panel.cor <- function(x, y, digits=2, prefix="", cex.cor) { usr <- par("usr"); on.exit(par(usr)) par(usr = c(0, 1, 0, 1)) r <- abs(cor(x, y)) txt <- format(c(r, 0.123456789), digits=digits)[1] txt <- paste(prefix, txt, sep="") if(missing(cex.cor)) cex <- 0.8/strwidth(txt) test <- cor.te...
/R/rgg_code0137.R
no_license
skinnybob/r-matrix-school
R
false
false
721
r
panel.cor <- function(x, y, digits=2, prefix="", cex.cor) { usr <- par("usr"); on.exit(par(usr)) par(usr = c(0, 1, 0, 1)) r <- abs(cor(x, y)) txt <- format(c(r, 0.123456789), digits=digits)[1] txt <- paste(prefix, txt, sep="") if(missing(cex.cor)) cex <- 0.8/strwidth(txt) test <- cor.te...
this_tot <- tot%>%filter(year==2016) this_tot$chosen=as.numeric((this_tot$state==thisstate)) this_tot%>% ggplot(aes(x=from_pct,y=to_pct,fill=cut(within_pct,5,include.lowest = TRUE)))+ ggrepel::geom_label_repel(aes(label=state_grade),alpha=.7)+ scale_fill_brewer(palette = "RdYlBu",direction = -1,name='Internal...
/gunflow_scripts/scatter.R
no_license
yonicd/blog
R
false
false
775
r
this_tot <- tot%>%filter(year==2016) this_tot$chosen=as.numeric((this_tot$state==thisstate)) this_tot%>% ggplot(aes(x=from_pct,y=to_pct,fill=cut(within_pct,5,include.lowest = TRUE)))+ ggrepel::geom_label_repel(aes(label=state_grade),alpha=.7)+ scale_fill_brewer(palette = "RdYlBu",direction = -1,name='Internal...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CalculateRoadPerformance.R \name{calculateCongestion} \alias{calculateCongestion} \title{Calculate DVMT or DVHT by congestion level.} \usage{ calculateCongestion(MeasureType, RoadType, LaneMi, DVMT, DVHT = NULL) } \arguments{ \item{MeasureTyp...
/sources/modules/VETravelPerformance/man/calculateCongestion.Rd
permissive
mrspeel/VisionEval-Dev
R
false
true
1,628
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CalculateRoadPerformance.R \name{calculateCongestion} \alias{calculateCongestion} \title{Calculate DVMT or DVHT by congestion level.} \usage{ calculateCongestion(MeasureType, RoadType, LaneMi, DVMT, DVHT = NULL) } \arguments{ \item{MeasureTyp...
# IMPORTS #require(TDA) #require(mvtnorm) #require(combinat) #require(plyr) #require(clue) #--------------- # auxillary functions in_region <- function(p,xlims = c(0,Inf), ylims = c(0, Inf)){ # p: numeric representing a sample from a gaussian mixutre c1 = p[1] >= xlims[1] c2 = p[1] <= xlims[2] ...
/R/ph_kde.R
no_license
maroulaslab/NonParDensTDA
R
false
false
9,527
r
# IMPORTS #require(TDA) #require(mvtnorm) #require(combinat) #require(plyr) #require(clue) #--------------- # auxillary functions in_region <- function(p,xlims = c(0,Inf), ylims = c(0, Inf)){ # p: numeric representing a sample from a gaussian mixutre c1 = p[1] >= xlims[1] c2 = p[1] <= xlims[2] ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/readfile.R \name{readFile} \alias{readFile} \title{This function reads in a raw data file from disk.} \usage{ readFile(filename,classificationFlag,transpose) } \arguments{ \item{filename}{- path and input filename as a string} \item{classifi...
/man/readFile.Rd
no_license
guoweier/TSPmap
R
false
true
1,172
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/readfile.R \name{readFile} \alias{readFile} \title{This function reads in a raw data file from disk.} \usage{ readFile(filename,classificationFlag,transpose) } \arguments{ \item{filename}{- path and input filename as a string} \item{classifi...
## read data read_and_merge_data <- function () { test_labels <- read.table(file.path("UCI HAR Dataset", "test", "y_test.txt"), sep = "\n", col.names = "label") message("read and merge data, please wait...") test_subjects <- read.table(file.path("UCI HAR Dataset", "test", "subject_test.txt"), se...
/read_and_merge_data.R
no_license
vaanxy/Getting-and-Cleaning-Data-Project
R
false
false
1,496
r
## read data read_and_merge_data <- function () { test_labels <- read.table(file.path("UCI HAR Dataset", "test", "y_test.txt"), sep = "\n", col.names = "label") message("read and merge data, please wait...") test_subjects <- read.table(file.path("UCI HAR Dataset", "test", "subject_test.txt"), se...
setwd("~/projects/2020_presidential_primary_polling") library(ggplot2) library(dplyr) library(plyr) # ++++++++++++++++++++++++++++++++ read files +++++++++++++++++++++++++++++++++++ fund_biden = read.csv("./dat/funding/biden.csv", header = TRUE) fund_bloomberg = read.csv("./dat/funding/bloomberg.csv", header = TRUE) ...
/src/funding_graph.R
no_license
safrannn/2020_presidential_primary_poll
R
false
false
14,826
r
setwd("~/projects/2020_presidential_primary_polling") library(ggplot2) library(dplyr) library(plyr) # ++++++++++++++++++++++++++++++++ read files +++++++++++++++++++++++++++++++++++ fund_biden = read.csv("./dat/funding/biden.csv", header = TRUE) fund_bloomberg = read.csv("./dat/funding/bloomberg.csv", header = TRUE) ...
\name{examScor} \docType{data} \alias{examScor} \title{Open/Closed book data} \description{ Dataset from Mardia, Kent and Bibby on 88 students who took examinations in five subjects. The first two subjects were tested with closed book exams and the last three were tested with open book exams. } \usage{data(examSco...
/man/examScor.Rd
no_license
cran/MVT
R
false
false
802
rd
\name{examScor} \docType{data} \alias{examScor} \title{Open/Closed book data} \description{ Dataset from Mardia, Kent and Bibby on 88 students who took examinations in five subjects. The first two subjects were tested with closed book exams and the last three were tested with open book exams. } \usage{data(examSco...
source("G:/stock/code/path_define.txt") setwd(main_path) #source("../main.r") source("./function/buy_sell_ratio.r") source("./function/read_stock_data.r") data_path='G:/stock/data/daily_price_volume' market="shenzhen" stk_numbers=list.files(file.path(data_path,market)) stk_num="000001" #data_path='/home/qyu/hq185/qyu/...
/sto_analysis/price_volume/price_distribition/v1.r
no_license
davidyuqiwei/davidyu_v1
R
false
false
1,419
r
source("G:/stock/code/path_define.txt") setwd(main_path) #source("../main.r") source("./function/buy_sell_ratio.r") source("./function/read_stock_data.r") data_path='G:/stock/data/daily_price_volume' market="shenzhen" stk_numbers=list.files(file.path(data_path,market)) stk_num="000001" #data_path='/home/qyu/hq185/qyu/...
#------------------------------------------------------------------------------- # Author: Carlos Guio # Contact: macguiob@gmail.com # Organization: Terrae # Project: TCI-Paz de Ariporo-Glifosato # Date last modified: 13-07-2020 # Output: MODELS OF 4 SOIL PROFILES WHERE GLYPHOSATE OCCURRED #---------------------------...
/R/Alternative_Figure 4_Perfiles DeJusticia-PECIG.R
no_license
cmguiob/Glyphosate_GeohealthPaper
R
false
false
4,503
r
#------------------------------------------------------------------------------- # Author: Carlos Guio # Contact: macguiob@gmail.com # Organization: Terrae # Project: TCI-Paz de Ariporo-Glifosato # Date last modified: 13-07-2020 # Output: MODELS OF 4 SOIL PROFILES WHERE GLYPHOSATE OCCURRED #---------------------------...
################################################################### # EXTRACT CD-HIT RESULTS ################################################################### library(readr) library(plyr) args <- commandArgs(trailingOnly = TRUE) # print file name print(paste("Working on file: ",args)) filename = substr(args, 1, nc...
/extract_cdhit2.R
no_license
solomonchak/TERAD
R
false
false
1,261
r
################################################################### # EXTRACT CD-HIT RESULTS ################################################################### library(readr) library(plyr) args <- commandArgs(trailingOnly = TRUE) # print file name print(paste("Working on file: ",args)) filename = substr(args, 1, nc...
#' @title Radial super-efficiency basic DEA model #' #' @description Solve Andersen and Petersen radial Super-efficiency DEA model. #' #' @usage model_supereff(datadea, #' dmu_eval = NULL, #' dmu_ref = NULL, #' supereff_modelname = c("basic"), #' ...
/R/model_supereff.R
no_license
cran/deaR
R
false
false
5,644
r
#' @title Radial super-efficiency basic DEA model #' #' @description Solve Andersen and Petersen radial Super-efficiency DEA model. #' #' @usage model_supereff(datadea, #' dmu_eval = NULL, #' dmu_ref = NULL, #' supereff_modelname = c("basic"), #' ...
library(shiny) shinyUI(pageWithSidebar( headerPanel("Example plot"), sidebarPanel( sliderInput('mu', 'Guess at the mu',value = 70, min = 60, max = 80, step = 0.05,) ), mainPanel( plotOutput('newHist') ) ))
/testapp/ui.R
no_license
umdocc/DataProc
R
false
false
223
r
library(shiny) shinyUI(pageWithSidebar( headerPanel("Example plot"), sidebarPanel( sliderInput('mu', 'Guess at the mu',value = 70, min = 60, max = 80, step = 0.05,) ), mainPanel( plotOutput('newHist') ) ))
#!/usr/bin/env Rscript library(tidyverse) source("run-utils.R") incidences <- parameters %>% filter(name == "incidence") %>% with({ c(lower, estimate, upper) }) tic <- Sys.time() sims <- crossing( iter = 1:base_par$n_iter, incidence = incidences ) %>% mutate( par = map(incidence, ~ assign_in(base_par,...
/run-incid.R
no_license
openbiome/sars-screen-strategy
R
false
false
490
r
#!/usr/bin/env Rscript library(tidyverse) source("run-utils.R") incidences <- parameters %>% filter(name == "incidence") %>% with({ c(lower, estimate, upper) }) tic <- Sys.time() sims <- crossing( iter = 1:base_par$n_iter, incidence = incidences ) %>% mutate( par = map(incidence, ~ assign_in(base_par,...