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
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/readTexts.R \name{readTexts} \alias{readTexts} \title{Read text, rtf, or docx files into a dataframe and convert to tidy text format.} \usage{ readTexts(directory, tidy = TRUE, split = NULL) } \arguments{ \item{directory}{The directory where ...
/man/readTexts.Rd
permissive
smmurphy/convenience
R
false
true
820
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/readTexts.R \name{readTexts} \alias{readTexts} \title{Read text, rtf, or docx files into a dataframe and convert to tidy text format.} \usage{ readTexts(directory, tidy = TRUE, split = NULL) } \arguments{ \item{directory}{The directory where ...
#' @name spict2DLMtool #' @title Get function to estimate TAC for the DLMtool package #' #' #' @details This function creates harvest control rules (HCRs) which can be incorporated into a #' management strategy evaluation framework (DLMtool package). HCRs are saved with a #' generic name to the global environment and ...
/spict/R/dlmtool.R
no_license
Lijiuqi/spict
R
false
false
6,870
r
#' @name spict2DLMtool #' @title Get function to estimate TAC for the DLMtool package #' #' #' @details This function creates harvest control rules (HCRs) which can be incorporated into a #' management strategy evaluation framework (DLMtool package). HCRs are saved with a #' generic name to the global environment and ...
testlist <- list(a = -11206656L, b = 16711935L, x = c(505085951L, -1L, -15007745L, -1L, -16383233L, -16320513L, NA, -1L, -12583129L, -57830L, -42470L, 452927231L, -2147483616L, 786687L, -163L, -14024705L, -16384000L, -2359297L, 1577058078L, 452984577L, 0L, -100861657L, -11206656L, 16719386L, -1L, -1L, -1L, 50508595...
/grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610128652-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
480
r
testlist <- list(a = -11206656L, b = 16711935L, x = c(505085951L, -1L, -15007745L, -1L, -16383233L, -16320513L, NA, -1L, -12583129L, -57830L, -42470L, 452927231L, -2147483616L, 786687L, -163L, -14024705L, -16384000L, -2359297L, 1577058078L, 452984577L, 0L, -100861657L, -11206656L, 16719386L, -1L, -1L, -1L, 50508595...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/drugDbInterface.R \name{makeDrugSelectionWorksheet} \alias{makeDrugSelectionWorksheet} \title{Uses genomic data from the provided Study object to produce a table of pertinent drug-gene associations.} \usage{ makeDrugSelectionWorksheet...
/packageDir/man/makeDrugSelectionWorksheet.Rd
no_license
stochasticTreat/pathLayerDistributionVersion2
R
false
false
830
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/drugDbInterface.R \name{makeDrugSelectionWorksheet} \alias{makeDrugSelectionWorksheet} \title{Uses genomic data from the provided Study object to produce a table of pertinent drug-gene associations.} \usage{ makeDrugSelectionWorksheet...
#' Install causact's python dependencies like numpyro, arviz, and xarray. #' #' `install_causact_deps()` installs python, the numpyro and arviz packages, and their #' direct dependencies. #' #' @details You may be prompted to download and install miniconda if reticulate #' did not find a non-system installation of py...
/R/install_causact_deps.R
permissive
flyaflya/causact
R
false
false
4,162
r
#' Install causact's python dependencies like numpyro, arviz, and xarray. #' #' `install_causact_deps()` installs python, the numpyro and arviz packages, and their #' direct dependencies. #' #' @details You may be prompted to download and install miniconda if reticulate #' did not find a non-system installation of py...
memory.limit(size=16384) payer_dropdown <- data.frame(PAYOR_ID=c("001"), search=c("001-Payer 1"))
/examples/PayPredict/rss/DownloadCptLinesWithNoEob/init/000.init.R
no_license
paypredict/paypredict
R
false
false
98
r
memory.limit(size=16384) payer_dropdown <- data.frame(PAYOR_ID=c("001"), search=c("001-Payer 1"))
## ##################################################################################################### ## ##################################################################################################### ## AUTHOR: Joshua Poirier ## COURSE: exdata-006 ## PROJECT: Course Project 2, plot2.r ## ## PURP...
/plot2.r
no_license
joshuaadampoirier/exdata-006_courseproject2
R
false
false
2,261
r
## ##################################################################################################### ## ##################################################################################################### ## AUTHOR: Joshua Poirier ## COURSE: exdata-006 ## PROJECT: Course Project 2, plot2.r ## ## PURP...
### Plotting trends of groupers and snappers biomass with changes in coral cover library(rio) library("magrittr") library("tidyverse") setwd("C:/Users/cara.estes/Documents/Spring_2020/RVC_CREMP_by_REEF/DT") snapper_spp_list = c("OCY CHRY", "LUT GRIS", "LUT ANAL", "LUT APOD", "LUT SYNA", "LUT MAHO", "LUT ...
/CREMP_Reef_code/EwE_grouper_snapper_type.R
no_license
cestes-19/rvc18
R
false
false
951,839
r
### Plotting trends of groupers and snappers biomass with changes in coral cover library(rio) library("magrittr") library("tidyverse") setwd("C:/Users/cara.estes/Documents/Spring_2020/RVC_CREMP_by_REEF/DT") snapper_spp_list = c("OCY CHRY", "LUT GRIS", "LUT ANAL", "LUT APOD", "LUT SYNA", "LUT MAHO", "LUT ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/six_panels.R \docType{data} \name{six_panels} \alias{six_panels} \title{Simulated Digital PCR data} \format{An object of class \code{\linkS4class{adpcr}} containing six runs from three experiments (two runs per each experiment).} \descriptio...
/man/six_panels.Rd
no_license
gaoce/dpcR
R
false
true
1,014
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/six_panels.R \docType{data} \name{six_panels} \alias{six_panels} \title{Simulated Digital PCR data} \format{An object of class \code{\linkS4class{adpcr}} containing six runs from three experiments (two runs per each experiment).} \descriptio...
#' @title Hierarchical cluster analysis #' @description Hierarchical cluster analysis using several methods such as #' ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), #' "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC). #' @param tabDF is a dataframe or numeric matrix, each row represen...
/R/analyze.R
no_license
jonaszierer/TCGAbiolinks
R
false
false
81,819
r
#' @title Hierarchical cluster analysis #' @description Hierarchical cluster analysis using several methods such as #' ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), #' "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC). #' @param tabDF is a dataframe or numeric matrix, each row represen...
#------------------ # Autor: Carlos Ortega # Date: 2021_07_23 # Inputs: Training, test, labels from Drivendata.org (Pump). # Output: Charts, submission. # Changes: Initial Version #------------------ #------ Libraries suppressPackageStartupMessages( { library(data.table) # Fast Data processing. library(t...
/Algoritmo Clase/01_categ_.R
no_license
Danitg95/Concurso_Water_Table_DrivenData
R
false
false
6,423
r
#------------------ # Autor: Carlos Ortega # Date: 2021_07_23 # Inputs: Training, test, labels from Drivendata.org (Pump). # Output: Charts, submission. # Changes: Initial Version #------------------ #------ Libraries suppressPackageStartupMessages( { library(data.table) # Fast Data processing. library(t...
library(LACPD) library(parallel) set.seed(1234) x <- replicate(500,arima.sim(168,model=list(ar=0.5)),simplify = FALSE) ########################################################### other methods library(strucchange) FP.str <- unlist(lapply(X=1:length(x), function(i){ if(i<length(x)) { cat(paste(i),",") flush.co...
/SImulation study/AR data/FP_others.R
no_license
mmontesinosanmartin/LACPD_Article
R
false
false
2,187
r
library(LACPD) library(parallel) set.seed(1234) x <- replicate(500,arima.sim(168,model=list(ar=0.5)),simplify = FALSE) ########################################################### other methods library(strucchange) FP.str <- unlist(lapply(X=1:length(x), function(i){ if(i<length(x)) { cat(paste(i),",") flush.co...
################################################################################ # # RunDimensionalityCC.R # # R Versions: 3.02 # # # # Author(s): Maria Fernanda Zarate Jimenez # # # # SABER # # Description: Creates Excel outputs of dimensionality exporatory analysis for each # # block of items # # # # Inp...
/AnalisisItem/Src/04Exploratorio.R
no_license
gromero01/ACC
R
false
false
41,311
r
################################################################################ # # RunDimensionalityCC.R # # R Versions: 3.02 # # # # Author(s): Maria Fernanda Zarate Jimenez # # # # SABER # # Description: Creates Excel outputs of dimensionality exporatory analysis for each # # block of items # # # # Inp...
#' Get Exchange Rate vs EUR from ECB #' #' This function implements the API to the \href{https://sdw.ecb.europa.eu/home.do}{ECB Statistical Data Warehouse} to #' fetch reference exchange rates vs the Euro. #' #' @param cur Currency - three letter standard #' @param start_date First day of time series #' @param end_dat...
/R/get_ecb_fx.R
no_license
ojessen/ecbfx
R
false
false
2,131
r
#' Get Exchange Rate vs EUR from ECB #' #' This function implements the API to the \href{https://sdw.ecb.europa.eu/home.do}{ECB Statistical Data Warehouse} to #' fetch reference exchange rates vs the Euro. #' #' @param cur Currency - three letter standard #' @param start_date First day of time series #' @param end_dat...
### HISTORY ############################################################################## # Version Date Coder Comments # 1.0 16/06/2017 Ema & Jacek & Stefano # # Contact: Emanuela, Jacek, Stefano (e.gadaleta@qmul.ac.uk; j.marzec@qmul.ac.uk, s.pirro@qmul.ac.uk) # # Barts Cancer Institute # Quee...
/mut/TopMuts_PANCREAS.R
no_license
JMarzec/data_portal
R
false
false
4,901
r
### HISTORY ############################################################################## # Version Date Coder Comments # 1.0 16/06/2017 Ema & Jacek & Stefano # # Contact: Emanuela, Jacek, Stefano (e.gadaleta@qmul.ac.uk; j.marzec@qmul.ac.uk, s.pirro@qmul.ac.uk) # # Barts Cancer Institute # Quee...
#' Create a timeline visualization #' #' \code{timevis} lets you create rich and fully interactive timeline visualizations. #' Timelines can be included in Shiny apps and R markdown documents, or viewed #' from the R console and RStudio Viewer. \code{timevis} Includes an extensive #' API to manipulate a timeline after ...
/R/timevis.R
no_license
Tutuchan/timevis
R
false
false
18,476
r
#' Create a timeline visualization #' #' \code{timevis} lets you create rich and fully interactive timeline visualizations. #' Timelines can be included in Shiny apps and R markdown documents, or viewed #' from the R console and RStudio Viewer. \code{timevis} Includes an extensive #' API to manipulate a timeline after ...
job.titles.path = "https://raw.githubusercontent.com/h2oai/sparkling-water/rel-1.6/examples/smalldata/craigslistJobTitles.csv" job.titles <- h2o.importFile(job.titles.path, destination_frame = "jobtitles", col.names = c("category", "jobtitle"), col.types = c("Enum", "String"), header = TRU...
/h2o-r/demos/rdemo.word2vec.craigslistjobtitles.R
permissive
MrShoks/h2o-3
R
false
false
3,104
r
job.titles.path = "https://raw.githubusercontent.com/h2oai/sparkling-water/rel-1.6/examples/smalldata/craigslistJobTitles.csv" job.titles <- h2o.importFile(job.titles.path, destination_frame = "jobtitles", col.names = c("category", "jobtitle"), col.types = c("Enum", "String"), header = TRU...
#' @title HarkinsJura Isotherm Linear Analysis #' @name harkinsjura.LM #' @description A model that assumes the possibility of multilayer adsorption #' on the surface of absorbents having heterogenous pore distribution. #' @param Ce the numerical value for the equilibrium capacity #' @param Qe the numerical value ...
/R/harkinsjuraLM.R
no_license
cran/PUPAIM
R
false
false
3,147
r
#' @title HarkinsJura Isotherm Linear Analysis #' @name harkinsjura.LM #' @description A model that assumes the possibility of multilayer adsorption #' on the surface of absorbents having heterogenous pore distribution. #' @param Ce the numerical value for the equilibrium capacity #' @param Qe the numerical value ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/XFlowStats.R \name{NWMFlowStats} \alias{NWMFlowStats} \title{NWMFlowStats} \usage{ NWMFlowStats(comID, flowfile) } \arguments{ \item{comID}{a reach ID (corresponds to the feature IDs in the NHD Plus dataset)} \item{flowfile}{.csv file of tim...
/man/NWMFlowStats.Rd
no_license
cahhansen/NWMLowFlows
R
false
true
527
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/XFlowStats.R \name{NWMFlowStats} \alias{NWMFlowStats} \title{NWMFlowStats} \usage{ NWMFlowStats(comID, flowfile) } \arguments{ \item{comID}{a reach ID (corresponds to the feature IDs in the NHD Plus dataset)} \item{flowfile}{.csv file of tim...
context("Test occurrence-related functions") ## ala_reasons thischeck <- function() { test_that("ala_reasons works as expected", { skip_on_cran() expect_named(ala_reasons(), c("rkey", "name", "id")) expect_equal(nrow(ala_reasons()), 12) expect_equal(sort(ala_reasons()$id), c(0:8, 10...
/tests/testthat/test-occurrences.R
no_license
Invasive-Mammal-dynamics/ALA4R
R
false
false
7,884
r
context("Test occurrence-related functions") ## ala_reasons thischeck <- function() { test_that("ala_reasons works as expected", { skip_on_cran() expect_named(ala_reasons(), c("rkey", "name", "id")) expect_equal(nrow(ala_reasons()), 12) expect_equal(sort(ala_reasons()$id), c(0:8, 10...
# Script for creating moisture maps from NDRE model predictions # import Libraries library(rgdal) library(rasterVis) library(RColorBrewer) library(scales) library(viridis) library(ggthemes) library(gridExtra) library(grid) # load data for soil moisture map plotting data_for_predict <- read_csv(file = "./HydroSatML/da...
/2_code/3_utilities/visualization_scripts/soilM_precision_maps.R
permissive
MichaelRGrant/HydroSatML
R
false
false
3,832
r
# Script for creating moisture maps from NDRE model predictions # import Libraries library(rgdal) library(rasterVis) library(RColorBrewer) library(scales) library(viridis) library(ggthemes) library(gridExtra) library(grid) # load data for soil moisture map plotting data_for_predict <- read_csv(file = "./HydroSatML/da...
# Loading spatial data for the paper. ecoregions <- spTransform(readOGR('data/Ecoregions_NA/na_regns.shp', 'na_regns'), CRSobj=CRS('+proj=longlat +ellps=WGS84')) ecoregions <- ecoregions[!ecoregions@data$DIVISION == 'Lake',] indiv.sites <- data.frame(site = unique(compiled_pollen$site.name...
/R/load_spatial.R
no_license
SimonGoring/NonAnalogues
R
false
false
953
r
# Loading spatial data for the paper. ecoregions <- spTransform(readOGR('data/Ecoregions_NA/na_regns.shp', 'na_regns'), CRSobj=CRS('+proj=longlat +ellps=WGS84')) ecoregions <- ecoregions[!ecoregions@data$DIVISION == 'Lake',] indiv.sites <- data.frame(site = unique(compiled_pollen$site.name...
L <- 40 # number of knots to use for the basis functions cv <- 5 cvs <- seq_len(5) # cross-validation sets process <- "ebf" # ebf: empirical basis functions, gsk: gaussian kernels margin <- "gsk" # ebf: empirical basis functions, gsk: gaussian kernels times <- c("current", "future") # for (...
/markdown/precip-rev-3/fit-ebf-40-5.R
permissive
sammorris81/extreme-decomp
R
false
false
609
r
L <- 40 # number of knots to use for the basis functions cv <- 5 cvs <- seq_len(5) # cross-validation sets process <- "ebf" # ebf: empirical basis functions, gsk: gaussian kernels margin <- "gsk" # ebf: empirical basis functions, gsk: gaussian kernels times <- c("current", "future") # for (...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model.R \name{model-method-compile} \alias{model-method-compile} \alias{compile} \title{Compile a Stan program} \description{ The \verb{$compile()} method of a \code{\link{CmdStanModel}} object translates the Stan program to C++ and creates a...
/man/model-method-compile.Rd
permissive
johnlees/cmdstanr
R
false
true
4,589
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model.R \name{model-method-compile} \alias{model-method-compile} \alias{compile} \title{Compile a Stan program} \description{ The \verb{$compile()} method of a \code{\link{CmdStanModel}} object translates the Stan program to C++ and creates a...
#' asciiToChar: conversion between letters and ASCII codes #' #' asciiToChar converts ASCII codes to vector of single characters and vice #' versa #' #' @param ascii.codes #' An integer vector specifying individual characters by ASCII code, with #' values in the range 1:255 OR a vector of individual ...
/R/asciiToChar.R
no_license
mwrowe/microRutils
R
false
false
2,374
r
#' asciiToChar: conversion between letters and ASCII codes #' #' asciiToChar converts ASCII codes to vector of single characters and vice #' versa #' #' @param ascii.codes #' An integer vector specifying individual characters by ASCII code, with #' values in the range 1:255 OR a vector of individual ...
data <- read.table("~/householdpowerconsumption.txt", header=TRUE, sep=";",stringsAsFactors=FALSE) data$Date <- as.Date(data$Date, format='%d/%m/%Y') dateone <- as.Date('2007-02-01') datetwo <- as.Date('2007-02-02') datatwo <- data[data$Date >= dateone & data$Date <= datetwo,] datatwo[,3:9] <- apply(datatwo[,3:9], 2, a...
/figure/plot1.R
no_license
rbrianaaron/ExData_Plotting1
R
false
false
673
r
data <- read.table("~/householdpowerconsumption.txt", header=TRUE, sep=";",stringsAsFactors=FALSE) data$Date <- as.Date(data$Date, format='%d/%m/%Y') dateone <- as.Date('2007-02-01') datetwo <- as.Date('2007-02-02') datatwo <- data[data$Date >= dateone & data$Date <= datetwo,] datatwo[,3:9] <- apply(datatwo[,3:9], 2, a...
#'tipify #' #'\code{tipify} can be wrapped around any shiny UI element to add a tooltip to the #'wrapped element. This should be a safer way to add tooltips to elements created with #'\code{\link{renderUI}}. #' #'@param el A shiny UI element. #'@param title The content of the tooltip. #'@param placement Where t...
/R/tipify.R
no_license
cran/shinyBS
R
false
false
1,286
r
#'tipify #' #'\code{tipify} can be wrapped around any shiny UI element to add a tooltip to the #'wrapped element. This should be a safer way to add tooltips to elements created with #'\code{\link{renderUI}}. #' #'@param el A shiny UI element. #'@param title The content of the tooltip. #'@param placement Where t...
# DESCRIPTION ========================================================= # Author: Ashesh Rambachan <asheshr@g.havard.edu> # # This script contains functions to implement the methods # described in Rambachan & Roth (2019) for robust inference # in difference-in-differences and event study designs. # # Implements fun...
/R/sensitivityresults.R
no_license
HDccer/HonestDiD
R
false
false
23,217
r
# DESCRIPTION ========================================================= # Author: Ashesh Rambachan <asheshr@g.havard.edu> # # This script contains functions to implement the methods # described in Rambachan & Roth (2019) for robust inference # in difference-in-differences and event study designs. # # Implements fun...
getKeyRateDuration<-function(r,bond,id = NULL) { CFd = getCFdisc(r,bond) t = getCFTime(bond) price = getBondPrice(bond,r) krd = CFd*t/price if(!is.null(id)) { n = length(id) result = 1:n for(i in 1:n) { result[i] = krd[which(round(id[i],4)==round(t,4))] } } else resu...
/R/getKeyRateDuration.R
no_license
zzawadz/BondProc
R
false
false
458
r
getKeyRateDuration<-function(r,bond,id = NULL) { CFd = getCFdisc(r,bond) t = getCFTime(bond) price = getBondPrice(bond,r) krd = CFd*t/price if(!is.null(id)) { n = length(id) result = 1:n for(i in 1:n) { result[i] = krd[which(round(id[i],4)==round(t,4))] } } else resu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/log.R \name{ilog10} \alias{ilog10} \title{Inverse Log Base 10 Transformation} \usage{ ilog10(x) } \arguments{ \item{x}{An object.} } \value{ A numeric atomic object. } \description{ Inverse log transforms a numeric atomic object with base 10....
/man/ilog10.Rd
permissive
poissonconsulting/extras
R
false
true
849
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/log.R \name{ilog10} \alias{ilog10} \title{Inverse Log Base 10 Transformation} \usage{ ilog10(x) } \arguments{ \item{x}{An object.} } \value{ A numeric atomic object. } \description{ Inverse log transforms a numeric atomic object with base 10....
## ----setup, include = FALSE---------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ---- include=FALSE------------------------------------------------------ library(GenEst) vers <- packageVersion("GenEst") today <- Sys.Date() ## ----------------------...
/inst/doc/wind-examples.R
permissive
cwhitman/GenEst
R
false
false
8,428
r
## ----setup, include = FALSE---------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ---- include=FALSE------------------------------------------------------ library(GenEst) vers <- packageVersion("GenEst") today <- Sys.Date() ## ----------------------...
# The emails vector has already been defined for you emails <- c("john.doe@ivyleague.edu", "education@world.gov", "global@peace.org", "invalid.edu", "quant@bigdatacollege.edu", "cookie.monster@sesame.tv") # Use sub() to convert the email domains to datacamp.edu sub(pattern = "@.*\\.edu$", replacement ...
/2. Intermediate R/gsub_sub1.R
no_license
ThanitsornMsr/Datacamp
R
false
false
350
r
# The emails vector has already been defined for you emails <- c("john.doe@ivyleague.edu", "education@world.gov", "global@peace.org", "invalid.edu", "quant@bigdatacollege.edu", "cookie.monster@sesame.tv") # Use sub() to convert the email domains to datacamp.edu sub(pattern = "@.*\\.edu$", replacement ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/catcher.R \name{init_argh} \alias{init_argh} \alias{stop_argh} \title{Initialize argh} \usage{ init_argh(lang = c("en", "fr", "ko")) stop_argh() } \arguments{ \item{lang}{Language of the error to parse. Default is English. Now support "en", ...
/man/init.Rd
permissive
kant/argh
R
false
true
435
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/catcher.R \name{init_argh} \alias{init_argh} \alias{stop_argh} \title{Initialize argh} \usage{ init_argh(lang = c("en", "fr", "ko")) stop_argh() } \arguments{ \item{lang}{Language of the error to parse. Default is English. Now support "en", ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rrepast-aoe.R \name{AoE.Base} \alias{AoE.Base} \title{AoE.Base} \usage{ AoE.Base(m, factors = c(), fun = NULL) } \arguments{ \item{m}{The base design matrix} \item{factors}{A subset of model parameters} \item{fun}{The function which will be...
/man/AoE.Base.Rd
permissive
antonio-pgarcia/RRepast
R
false
true
421
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rrepast-aoe.R \name{AoE.Base} \alias{AoE.Base} \title{AoE.Base} \usage{ AoE.Base(m, factors = c(), fun = NULL) } \arguments{ \item{m}{The base design matrix} \item{factors}{A subset of model parameters} \item{fun}{The function which will be...
#' Cohort Method Data #' #' Reformat a data frame into a CohortMethodData object for use with OHDSI package #' #' This function takes a data frame containing an observational study dataset and reformats #' into an object of type CohortMethodData that can be used with the OHDSI CohortMethod library. #' #' @param data D...
/R/psCohortMethodData.R
no_license
OHDSI/Centaur
R
false
false
4,210
r
#' Cohort Method Data #' #' Reformat a data frame into a CohortMethodData object for use with OHDSI package #' #' This function takes a data frame containing an observational study dataset and reformats #' into an object of type CohortMethodData that can be used with the OHDSI CohortMethod library. #' #' @param data D...
library(ape) testtree <- read.tree("2941_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="2941_0_unrooted.txt")
/codeml_files/newick_trees_processed/2941_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("2941_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="2941_0_unrooted.txt")
ci.paired <- function(n,dbar,s.d,conf.level=0.95, vname="[difference between the quantitative variables]") { # Example: ci.paired(8,3.625,2.066,vname="difference between number of recalled words") t.star <- NULL ME <- NULL cint <- NULL if(!is.null(s.d)) { t.star <- qt(conf.l...
/cipaired.R
no_license
Mulliszl/R-Functions
R
false
false
752
r
ci.paired <- function(n,dbar,s.d,conf.level=0.95, vname="[difference between the quantitative variables]") { # Example: ci.paired(8,3.625,2.066,vname="difference between number of recalled words") t.star <- NULL ME <- NULL cint <- NULL if(!is.null(s.d)) { t.star <- qt(conf.l...
##makeCacheMatrix creates a special matrix object that can cache its inverse ##cacheSolve computes the inverse of the special matrix created by makeCacheMatrix. ##makeCacheMatrix #1. Sets up the matrix #2. Gets the matrix #3. Sets the inverse #4. Gets the inverse makeCacheMatrix<-function(x=matrix()){ m<-NULL se...
/cachematrix.R
no_license
natashawlee/ProgrammingAssignment2
R
false
false
1,054
r
##makeCacheMatrix creates a special matrix object that can cache its inverse ##cacheSolve computes the inverse of the special matrix created by makeCacheMatrix. ##makeCacheMatrix #1. Sets up the matrix #2. Gets the matrix #3. Sets the inverse #4. Gets the inverse makeCacheMatrix<-function(x=matrix()){ m<-NULL se...
# Combine all three SCTC dataset to one setwd("Y:/Kirchner/GIS Projects/SCTC/DATA/EMA DATA/EMA") # read in three files individually washu<- read.csv("purchase_EmaSurvey_washu.csv", header=TRUE) unc<- read.csv("purchase_EmaSurvey_unc.csv", header=TRUE) stanford<- read.csv("purchase_EmaSurvey_stanford.csv", header=TRUE)...
/EMA_summaries.R
no_license
thomaskirchner/SCTC
R
false
false
5,163
r
# Combine all three SCTC dataset to one setwd("Y:/Kirchner/GIS Projects/SCTC/DATA/EMA DATA/EMA") # read in three files individually washu<- read.csv("purchase_EmaSurvey_washu.csv", header=TRUE) unc<- read.csv("purchase_EmaSurvey_unc.csv", header=TRUE) stanford<- read.csv("purchase_EmaSurvey_stanford.csv", header=TRUE)...
rls<-function(response = NA, data = NA, lambda = NA, delta = NA, intercept = FALSE, cp = FALSE, n.tes = 10, n.ref = 10, alpha = 2){ # Input: a dataframe with the top row being the most recent data set # with one column of data and the most recent one at the end # Output: the ...
/Src/rls.R
no_license
XingLLiu/Stats-Modelling-for-Streaming-Data
R
false
false
8,290
r
rls<-function(response = NA, data = NA, lambda = NA, delta = NA, intercept = FALSE, cp = FALSE, n.tes = 10, n.ref = 10, alpha = 2){ # Input: a dataframe with the top row being the most recent data set # with one column of data and the most recent one at the end # Output: the ...
reversenum<-function(x) as.numeric(paste(rev(strsplit(as.character(x),"")[[1]]),collapse="")) is.palin <- function(x){ i<-strsplit(as.character(x),"")[[1]] all(i==rev(i)) } t<-c() for(j in 1:10000){ p<-j for(i in 1:50){ n<-p+reversenum(p) if(is.palin(n)==TRUE) break p<-n } if(i==50) t<-c(t,j) }...
/R/055.R
no_license
gslinger/project_euler
R
false
false
387
r
reversenum<-function(x) as.numeric(paste(rev(strsplit(as.character(x),"")[[1]]),collapse="")) is.palin <- function(x){ i<-strsplit(as.character(x),"")[[1]] all(i==rev(i)) } t<-c() for(j in 1:10000){ p<-j for(i in 1:50){ n<-p+reversenum(p) if(is.palin(n)==TRUE) break p<-n } if(i==50) t<-c(t,j) }...
library(dfped) ### Name: Clch.Linear ### Title: Paediatric clearance according to the linear adjustment (LA) for ### a specific age. ### Aliases: Clch.Linear ### ** Examples ## Not run: ##D ######## ##D # Note: For this example we are using a paediatric database that we have including data of ##D # ...
/data/genthat_extracted_code/dfped/examples/Clch.Linear.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
630
r
library(dfped) ### Name: Clch.Linear ### Title: Paediatric clearance according to the linear adjustment (LA) for ### a specific age. ### Aliases: Clch.Linear ### ** Examples ## Not run: ##D ######## ##D # Note: For this example we are using a paediatric database that we have including data of ##D # ...
\docType{package} \name{kylemisc} \alias{kylemisc} \alias{kylemisc-package} \title{A collection of miscellaneous utility functions from Kyle} \description{ A collection of miscellaneous utility functions from Kyle }
/man/kylemisc.Rd
no_license
eclarke/kylemisc
R
false
false
217
rd
\docType{package} \name{kylemisc} \alias{kylemisc} \alias{kylemisc-package} \title{A collection of miscellaneous utility functions from Kyle} \description{ A collection of miscellaneous utility functions from Kyle }
## Install & Load necesssary packages #source("http://www.bioconductor.org/biocLite.R") biocLite("GEOquery") require(gdata) library(Biobase) library(GEOquery) library(stringr) require(data.table) library(rmeta) ## read table with sample info and expression values for each twin sample twinsExpression <- readRDS('/grou...
/Wright Twin Study (MZ Discordant) scripts/wright_discordant_analysis_script.R
no_license
stejat98/disctwinexpr
R
false
false
10,563
r
## Install & Load necesssary packages #source("http://www.bioconductor.org/biocLite.R") biocLite("GEOquery") require(gdata) library(Biobase) library(GEOquery) library(stringr) require(data.table) library(rmeta) ## read table with sample info and expression values for each twin sample twinsExpression <- readRDS('/grou...
# Note that in this experiment I beleive that clone #035 has been swapped with #039 # See my lab book #2 pg 95 source('~/Documents/Rscripts/140211_multiplotGgplot2.R') ############################################## Analyse invasion assay ############################################### backgroundMeanSD <- function (da...
/PhD/141015_cellBiolAssay041_039.R
no_license
dvbrown/Rscripts
R
false
false
6,512
r
# Note that in this experiment I beleive that clone #035 has been swapped with #039 # See my lab book #2 pg 95 source('~/Documents/Rscripts/140211_multiplotGgplot2.R') ############################################## Analyse invasion assay ############################################### backgroundMeanSD <- function (da...
library(QPot) ### Name: VecDecomRem ### Title: Vector decomposition and remainder fields ### Aliases: VecDecomRem ### Keywords: decompoosition, field remainder vector ### ** Examples # First, the system of equations equationx <- "1.54*x*(1.0-(x/10.14)) - (y*x*x)/(1.0+x*x)" equationy <- "((0.476*x*x*y)/(1+x*x)) - ...
/data/genthat_extracted_code/QPot/examples/VecDecomRem.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,450
r
library(QPot) ### Name: VecDecomRem ### Title: Vector decomposition and remainder fields ### Aliases: VecDecomRem ### Keywords: decompoosition, field remainder vector ### ** Examples # First, the system of equations equationx <- "1.54*x*(1.0-(x/10.14)) - (y*x*x)/(1.0+x*x)" equationy <- "((0.476*x*x*y)/(1+x*x)) - ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pval.xtable.R \name{pval.xtable} \alias{pval.xtable} \alias{p.xtable} \alias{p.val.xtable} \alias{p.value} \alias{p.values} \title{Convert p-values into strings with inequalities.} \usage{ pval.xtable(p.values, round.digits = 4, threshold = 1...
/man/pval.xtable.Rd
no_license
fenrir849/fifer
R
false
true
1,361
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pval.xtable.R \name{pval.xtable} \alias{pval.xtable} \alias{p.xtable} \alias{p.val.xtable} \alias{p.value} \alias{p.values} \title{Convert p-values into strings with inequalities.} \usage{ pval.xtable(p.values, round.digits = 4, threshold = 1...
# Varians versus repeats reachData <- read.csv("~/Dropbox/Thesis/Data/Logs/variansData.csv", header = TRUE) nd <- reachData[c("ProtocolType","FoundPercentage")] nd <- subset(nd, nd$ProtocolType != "BLA" & nd$ProtocolType != "ZRPP4") nd$ProtocolType <- factor(nd$ProtocolType) n <- aggregate(FoundPercentage ~ ProtocolTy...
/Moddeling/RepeatVarians.R
no_license
thomamo/ThesisLnSimulator
R
false
false
2,448
r
# Varians versus repeats reachData <- read.csv("~/Dropbox/Thesis/Data/Logs/variansData.csv", header = TRUE) nd <- reachData[c("ProtocolType","FoundPercentage")] nd <- subset(nd, nd$ProtocolType != "BLA" & nd$ProtocolType != "ZRPP4") nd$ProtocolType <- factor(nd$ProtocolType) n <- aggregate(FoundPercentage ~ ProtocolTy...
#Distributions plots library(ggplot2) geiser <- read.csv("../data/tema7/geiser.csv") head(geiser) plot <- ggplot(geiser, aes(x=waiting)) plot + geom_histogram() plot + geom_histogram(binwidth = 5, fill = "white", color = "black") ggplot(geiser, aes(x=waiting, y = ..density..)) + geom_histogram(fill = "cornsilk", ...
/rstudio/r-course/scripts/tema7/04-distribution.R
no_license
danidepo/repo-cursos
R
false
false
535
r
#Distributions plots library(ggplot2) geiser <- read.csv("../data/tema7/geiser.csv") head(geiser) plot <- ggplot(geiser, aes(x=waiting)) plot + geom_histogram() plot + geom_histogram(binwidth = 5, fill = "white", color = "black") ggplot(geiser, aes(x=waiting, y = ..density..)) + geom_histogram(fill = "cornsilk", ...
\name{printIfNotNull} \alias{printIfNotNull} \title{ Provide basic summary of each object if that object is not NULL. } \description{ Provide basic summary of each object if that object is not NULL. This function is mainly used in the \code{summary} function from the \code{linkS4class{SimSet}} object. } \usa...
/simsem/man/printIfNotNull.Rd
no_license
pairach/simsem
R
false
false
850
rd
\name{printIfNotNull} \alias{printIfNotNull} \title{ Provide basic summary of each object if that object is not NULL. } \description{ Provide basic summary of each object if that object is not NULL. This function is mainly used in the \code{summary} function from the \code{linkS4class{SimSet}} object. } \usa...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_distribution.R \name{plot_distribution} \alias{plot_distribution} \title{This function visualizes the distribution of the test-statistic of choice, using the output of any of the 'simulate_...()' functions.} \usage{ plot_distribution(df,...
/man/plot_distribution.Rd
no_license
mvb25/smesp
R
false
true
491
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_distribution.R \name{plot_distribution} \alias{plot_distribution} \title{This function visualizes the distribution of the test-statistic of choice, using the output of any of the 'simulate_...()' functions.} \usage{ plot_distribution(df,...
library(datarobot) ### Name: RequestNewRatingTableModel ### Title: Create a new model from a rating table. ### Aliases: RequestNewRatingTableModel ### ** Examples ## Not run: ##D projectId <- "59a5af20c80891534e3c2bde" ##D ratingTableId <- "5984b4d7100d2b31c1166529" ##D RequestNewModel(projectId, ratingTable...
/data/genthat_extracted_code/datarobot/examples/RequestNewRatingTableModel.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
343
r
library(datarobot) ### Name: RequestNewRatingTableModel ### Title: Create a new model from a rating table. ### Aliases: RequestNewRatingTableModel ### ** Examples ## Not run: ##D projectId <- "59a5af20c80891534e3c2bde" ##D ratingTableId <- "5984b4d7100d2b31c1166529" ##D RequestNewModel(projectId, ratingTable...
#' Get total degree distribution data for a graph #' #' @description #' #' Get degree distribution data for a graph. Graph degree is represented as a #' frequency of total degree values over all nodes in the graph. #' #' @inheritParams render_graph #' @param mode using `total` (the default), degree considered for each ...
/R/get_degree_distribution.R
permissive
rich-iannone/DiagrammeR
R
false
false
2,477
r
#' Get total degree distribution data for a graph #' #' @description #' #' Get degree distribution data for a graph. Graph degree is represented as a #' frequency of total degree values over all nodes in the graph. #' #' @inheritParams render_graph #' @param mode using `total` (the default), degree considered for each ...
# Copyright 2019 Battelle Memorial Institute; see the LICENSE file. #' module_water_L102.water.supply.unlimited #' #' Summarize the water price values by water type and GCAM region. #' #' @param command API command to execute #' @param ... other optional parameters, depending on command #' @return Depends on \code{com...
/R/zchunk_L102.water.supply.unlimited.R
permissive
almondtea/gcamdata
R
false
false
2,940
r
# Copyright 2019 Battelle Memorial Institute; see the LICENSE file. #' module_water_L102.water.supply.unlimited #' #' Summarize the water price values by water type and GCAM region. #' #' @param command API command to execute #' @param ... other optional parameters, depending on command #' @return Depends on \code{com...
# RELATE CHANNEL GEOMETRY TO BASIN SIZE basnArea_to_chanGeom <- function(sites) { # Log tranform all parameters: sitesLog <- log10(sites) vars <- names(sitesLog) sitesRegs <- sitesSumm <- list() rStt <- data.frame(matrix(data = 0, nrow = 4, n...
/basnArea_to_chanGeom.R
no_license
DEQrshojin/Siletz_DO
R
false
false
1,004
r
# RELATE CHANNEL GEOMETRY TO BASIN SIZE basnArea_to_chanGeom <- function(sites) { # Log tranform all parameters: sitesLog <- log10(sites) vars <- names(sitesLog) sitesRegs <- sitesSumm <- list() rStt <- data.frame(matrix(data = 0, nrow = 4, n...
## Copyright (c) 2010 Ossi Koivistoinen ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to deal ## in the Software without restriction, including without limitation the rights ## to use, copy, modify, merge, publis...
/R/bp2.normalize.complexes.R
no_license
openresearchlabs/biopax2
R
false
false
2,465
r
## Copyright (c) 2010 Ossi Koivistoinen ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to deal ## in the Software without restriction, including without limitation the rights ## to use, copy, modify, merge, publis...
# See Assignment1.R for code to get the file, etc. # We start out with transformed data in my working directory. setwd ('C:\\Users\\SethG\\Documents\\Coursera\\ExploratoryDataAnalysis\\ExData_Plotting1') #load("powerdf.rda") #######################################We'll get the data here for submission #install.packag...
/plot4.R
no_license
SethGSavvy/ExData_Plotting1
R
false
false
3,047
r
# See Assignment1.R for code to get the file, etc. # We start out with transformed data in my working directory. setwd ('C:\\Users\\SethG\\Documents\\Coursera\\ExploratoryDataAnalysis\\ExData_Plotting1') #load("powerdf.rda") #######################################We'll get the data here for submission #install.packag...
AOPT <- function(Train,Test=NULL, P, lambda=1e-5, C=NULL){ PTrain<-P[rownames(P)%in%Train,] if (!is.null(C)){ D<-mean(diag(C%*%solve(crossprod(PTrain)+lambda*diag(ncol(PTrain)), t(C)))) }else { D<-mean(diag(solve(crossprod(PTrain)+lambda*diag(ncol(PTrain))))) } return(D) }
/R/AOPT.R
no_license
marcopxt/STPGA
R
false
false
315
r
AOPT <- function(Train,Test=NULL, P, lambda=1e-5, C=NULL){ PTrain<-P[rownames(P)%in%Train,] if (!is.null(C)){ D<-mean(diag(C%*%solve(crossprod(PTrain)+lambda*diag(ncol(PTrain)), t(C)))) }else { D<-mean(diag(solve(crossprod(PTrain)+lambda*diag(ncol(PTrain))))) } return(D) }
library(ggplot2) #' Title #' #' @param df #' @param dnacol #' #' @return #' @export #' #' @examples plot_bases_distribution <- function(df, dnacol = 2){ require(TraMineR) require(ggplot2) require(gtable) require(scales) require(grid) require(tools) # calcolo la distribuzione di probabilità delle basi p...
/R/plot_bases_dist.R
no_license
WAFI-CNR/ddna-rpackage
R
false
false
1,917
r
library(ggplot2) #' Title #' #' @param df #' @param dnacol #' #' @return #' @export #' #' @examples plot_bases_distribution <- function(df, dnacol = 2){ require(TraMineR) require(ggplot2) require(gtable) require(scales) require(grid) require(tools) # calcolo la distribuzione di probabilità delle basi p...
llll kkkkl require(R2wd) # install packages required # install software RCOM, RDCOMClient # (I had to restart the R-Session after the above step to get it work) wdGet() # Regression: data(iris) mod <- lm(Sepal.Length ~ Species, data = iris) regr_tab <- data.frame(summary(mod)$coefficients) colnames(regr_tab) <...
/output/R2wd.r
no_license
AnselZhangGit/Data-Mining-With-R
R
false
false
704
r
llll kkkkl require(R2wd) # install packages required # install software RCOM, RDCOMClient # (I had to restart the R-Session after the above step to get it work) wdGet() # Regression: data(iris) mod <- lm(Sepal.Length ~ Species, data = iris) regr_tab <- data.frame(summary(mod)$coefficients) colnames(regr_tab) <...
#' Stratified permutation testing #' #' Calculates permutation p-values for testing independence in 2x2 case-control tables, while adjusting for categorical covariates. #' Inputs are given as a vector of counts in each strata defined by the covariate(s). #' @param m0list Number of control subjects in each strata...
/AUtests/R/perm.test.strat.r
no_license
ingted/R-Examples
R
false
false
2,646
r
#' Stratified permutation testing #' #' Calculates permutation p-values for testing independence in 2x2 case-control tables, while adjusting for categorical covariates. #' Inputs are given as a vector of counts in each strata defined by the covariate(s). #' @param m0list Number of control subjects in each strata...
################################################################# ## ## ## Project: Medication Alignment Algorithm (Medal) ## ## Author: Arturo Lopez Pineda (arturolp[at]stanford[dot]edu) ## ## Date: Feb 27, 2019 ...
/R/01_medal.R
permissive
utsw-bicf/medal
R
false
false
7,459
r
################################################################# ## ## ## Project: Medication Alignment Algorithm (Medal) ## ## Author: Arturo Lopez Pineda (arturolp[at]stanford[dot]edu) ## ## Date: Feb 27, 2019 ...
library(prospectr) ### Name: resample ### Title: Resample spectral data ### Aliases: resample ### ** Examples data(NIRsoil) wav <- as.numeric(colnames(NIRsoil$spc)) spc <- 1/10^NIRsoil$spc # conversion to reflectance resampled <- resample(spc,wav,1100:2498) # increase spectral resolution by 2 dim(spc);dim(resampled...
/data/genthat_extracted_code/prospectr/examples/resample.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
325
r
library(prospectr) ### Name: resample ### Title: Resample spectral data ### Aliases: resample ### ** Examples data(NIRsoil) wav <- as.numeric(colnames(NIRsoil$spc)) spc <- 1/10^NIRsoil$spc # conversion to reflectance resampled <- resample(spc,wav,1100:2498) # increase spectral resolution by 2 dim(spc);dim(resampled...
library(igraph) ### Name: rev.igraph.es ### Title: Reverse the order in an edge sequence ### Aliases: rev.igraph.es ### ** Examples g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) E(g) E(g) %>% rev()
/data/genthat_extracted_code/igraph/examples/rev.igraph.es.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
216
r
library(igraph) ### Name: rev.igraph.es ### Title: Reverse the order in an edge sequence ### Aliases: rev.igraph.es ### ** Examples g <- make_(ring(10), with_vertex_(name = LETTERS[1:10])) E(g) E(g) %>% rev()
library(shiny) library(mongolite) library(plotly) shinyServer(function(input, output, session) { #### UI code -------------------------------------------------------------- output$ui <- renderUI({ if (user_input$authenticated == FALSE) { ##### UI code for login page fluidPage( fluidRow( ...
/logger_data_tool/server.R
no_license
cunybpl/shinyapps
R
false
false
20,035
r
library(shiny) library(mongolite) library(plotly) shinyServer(function(input, output, session) { #### UI code -------------------------------------------------------------- output$ui <- renderUI({ if (user_input$authenticated == FALSE) { ##### UI code for login page fluidPage( fluidRow( ...
# Setup ################################################################################# # Packages library(raster) library(ggplot2) library(tidyverse) # Read EEZs eezdir <- "data/eezs" eezs <- raster(file.path(eezdir, "eezs_v10_raster_10km.grd")) eez_key <- read.csv(file.path(eezdir, "eezs_v10_key.csv"), as.is=T) ...
/code/aquacast_v3.R
no_license
cfree14/aquacast
R
false
false
10,831
r
# Setup ################################################################################# # Packages library(raster) library(ggplot2) library(tidyverse) # Read EEZs eezdir <- "data/eezs" eezs <- raster(file.path(eezdir, "eezs_v10_raster_10km.grd")) eez_key <- read.csv(file.path(eezdir, "eezs_v10_key.csv"), as.is=T) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/visGetUtils.R \name{visGetPositions} \alias{visGetPositions} \title{Network visualization getPositions method} \usage{ visGetPositions(graph, nodes = NULL, input = paste0(graph$id, "_positions")) } \arguments{ \item{graph}{: a \co...
/man/visGetPositions.Rd
no_license
42-Discworld/visNetwork
R
false
true
1,352
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/visGetUtils.R \name{visGetPositions} \alias{visGetPositions} \title{Network visualization getPositions method} \usage{ visGetPositions(graph, nodes = NULL, input = paste0(graph$id, "_positions")) } \arguments{ \item{graph}{: a \co...
context("timeIdToDate") suppressPackageStartupMessages(require(lubridate)) describe("timeIdToDate", { opts <- list( start = as.POSIXlt("2017-01-01", tz = "UTC"), firstWeekday = "Monday" ) it ("works for hourly time step", { res <- timeIdToDate(1:(365*24), "hourly", opts) expect_is(res, "P...
/tests/testthat/test-timeIdToDate.R
no_license
rte-antares-rpackage/antaresDev
R
false
false
1,786
r
context("timeIdToDate") suppressPackageStartupMessages(require(lubridate)) describe("timeIdToDate", { opts <- list( start = as.POSIXlt("2017-01-01", tz = "UTC"), firstWeekday = "Monday" ) it ("works for hourly time step", { res <- timeIdToDate(1:(365*24), "hourly", opts) expect_is(res, "P...
#' @importFrom grid grid.newpage #' @importFrom grid pushViewport #' @importFrom grid viewport #' @importFrom grid grid.layout #' @importFrom grid grid.draw #' @importFrom grid popViewport #' @importFrom grid legendGrob #' @importFrom grid gpar ## Assemble plots to make UpSet plot Make_base_plot <- function(Main_bar_p...
/R/23-UpSet.plot.r
no_license
nicoballarini/SubgrPlots
R
false
false
5,069
r
#' @importFrom grid grid.newpage #' @importFrom grid pushViewport #' @importFrom grid viewport #' @importFrom grid grid.layout #' @importFrom grid grid.draw #' @importFrom grid popViewport #' @importFrom grid legendGrob #' @importFrom grid gpar ## Assemble plots to make UpSet plot Make_base_plot <- function(Main_bar_p...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MSE.mode.R \name{calc.MSE.mode} \alias{calc.MSE.mode} \title{Calculate mean squared error based on the mode of the posterior} \usage{ calc.MSE.mode( prior, prob.range = c(0.5, 1), length = 20, n.binom = 30, mc.cores = 1, posterior...
/StudyPrior/man/calc.MSE.mode.Rd
no_license
igrave/StudyPrior
R
false
true
987
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MSE.mode.R \name{calc.MSE.mode} \alias{calc.MSE.mode} \title{Calculate mean squared error based on the mode of the posterior} \usage{ calc.MSE.mode( prior, prob.range = c(0.5, 1), length = 20, n.binom = 30, mc.cores = 1, posterior...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/to-Metabase.R \name{as_MicrobiomeSetList} \alias{as_MicrobiomeSetList} \title{Convert a SummarizedPhyloseq object to a list of MicrobiomeSet} \usage{ as_MicrobiomeSetList(spy) } \arguments{ \item{spy}{a \code{\link{SummarizedPhyloseq-class}} ...
/man/as_MicrobiomeSetList.Rd
no_license
zhuchcn/phylox
R
false
true
515
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/to-Metabase.R \name{as_MicrobiomeSetList} \alias{as_MicrobiomeSetList} \title{Convert a SummarizedPhyloseq object to a list of MicrobiomeSet} \usage{ as_MicrobiomeSetList(spy) } \arguments{ \item{spy}{a \code{\link{SummarizedPhyloseq-class}} ...
controlled_direct_effect <- function(theta1, a, a_star, theta3, m, out.reg, ...) { CDE <- as.numeric(theta1 * (a - a_star) + theta3 * m * (a - a_star)) if (out.reg %in% c("logistic","coxph")){ CDE <- exp(CDE) } else { CDE } } total_effect <- function(NDE, NIE, out.reg) { if (out.reg %in% c("lo...
/R/effect_estimates.R
permissive
GerkeLab/mediator
R
false
false
2,971
r
controlled_direct_effect <- function(theta1, a, a_star, theta3, m, out.reg, ...) { CDE <- as.numeric(theta1 * (a - a_star) + theta3 * m * (a - a_star)) if (out.reg %in% c("logistic","coxph")){ CDE <- exp(CDE) } else { CDE } } total_effect <- function(NDE, NIE, out.reg) { if (out.reg %in% c("lo...
library(ggQQunif) ### Name: geom_QQ_unif ### Title: geom_QQ_unif ### Aliases: geom_QQ_unif ### ** Examples library(ggplot2) library(dplyr) set.seed(27599) d <- data.frame(s = runif(n = 5e3)) d %>% ggplot(mapping = aes(sample = s)) + geom_QQ_unif() + scale_x_QQ() + scale_y_QQ() + theme_minimal()
/data/genthat_extracted_code/ggQQunif/examples/geom_QQ_unif.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
310
r
library(ggQQunif) ### Name: geom_QQ_unif ### Title: geom_QQ_unif ### Aliases: geom_QQ_unif ### ** Examples library(ggplot2) library(dplyr) set.seed(27599) d <- data.frame(s = runif(n = 5e3)) d %>% ggplot(mapping = aes(sample = s)) + geom_QQ_unif() + scale_x_QQ() + scale_y_QQ() + theme_minimal()
# @author: J.W.Spaak # Example how to compute the ND and FD for a given differential equation setting # The script is originally written in python, we run python code from within R # make sure that python is installed on the system used # This is not part of the install.packages("reticulate") command! library(reticula...
/Rscript/AnnualPlant2_NDF.R
no_license
Buchel9844/Meta-analysis_NFD
R
false
false
2,379
r
# @author: J.W.Spaak # Example how to compute the ND and FD for a given differential equation setting # The script is originally written in python, we run python code from within R # make sure that python is installed on the system used # This is not part of the install.packages("reticulate") command! library(reticula...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/extractDataFromLinks.R \name{extractDataFromLinks} \alias{extractDataFromLinks} \title{A Webscrape Function} \usage{ extractDataFromLinks(url, links) } \arguments{ \item{url}{url where table exists.} \item{links}{a vector containing links} }...
/man/extractDataFromLinks.Rd
no_license
kunalnitt/ezscrape
R
false
true
575
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/extractDataFromLinks.R \name{extractDataFromLinks} \alias{extractDataFromLinks} \title{A Webscrape Function} \usage{ extractDataFromLinks(url, links) } \arguments{ \item{url}{url where table exists.} \item{links}{a vector containing links} }...
library(ape) testtree <- read.tree("9516_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="9516_0_unrooted.txt")
/codeml_files/newick_trees_processed/9516_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("9516_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="9516_0_unrooted.txt")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Function_qqplot.R \name{qq_plot} \alias{qq_plot} \title{Function to create a QQ plot} \usage{ qq_plot(GM, pvals, QTN_index = c(), trait = "unknown") } \arguments{ \item{GM}{genetic map of data with chr and position of each SNP} \item{pvals}{...
/man/qq_plot.Rd
no_license
stp4freedom/HW4_GLM_GWAS
R
false
true
519
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Function_qqplot.R \name{qq_plot} \alias{qq_plot} \title{Function to create a QQ plot} \usage{ qq_plot(GM, pvals, QTN_index = c(), trait = "unknown") } \arguments{ \item{GM}{genetic map of data with chr and position of each SNP} \item{pvals}{...
#' Model Control Constructor #' @param cv_folds Number of cross-validation folds. Default is 5 #' @param cv_repeats Number of cross-validation repeats. Default is 10 #' @param cv_strata Strata to be used for cross-validation. Default is \code{NULL} #' @param boot_type Type of bootstrap confidence interval ("bca" and "p...
/R/model-control.R
permissive
mladenjovanovic/bmbstats
R
false
false
1,422
r
#' Model Control Constructor #' @param cv_folds Number of cross-validation folds. Default is 5 #' @param cv_repeats Number of cross-validation repeats. Default is 10 #' @param cv_strata Strata to be used for cross-validation. Default is \code{NULL} #' @param boot_type Type of bootstrap confidence interval ("bca" and "p...
#' Upload a CSV file to googledrive #' #' This function uploads a data.frame as a CSV file to Google Drive. If the #' name of the spreadsheet exists already, then it gets updated. Otherwise #' it uploads it for the first time. Unlike using #' `drive_upload(overwrite = TRUE)` directly, this function allows you to #' kee...
/R/googledrive_csv.R
no_license
KrotosBenjamin/jaffelab
R
false
false
2,053
r
#' Upload a CSV file to googledrive #' #' This function uploads a data.frame as a CSV file to Google Drive. If the #' name of the spreadsheet exists already, then it gets updated. Otherwise #' it uploads it for the first time. Unlike using #' `drive_upload(overwrite = TRUE)` directly, this function allows you to #' kee...
#' Refactor Code #' #' Both original and refactored expressions are run. The function will fail if #' the outputs are different. `%refactor2%` will also fail if the refactored #' expression runs slower. #' #' @param original original expression #' @param refactored refactored expression #' @name refactor #' @export #' ...
/R/refactor.r
no_license
lnsongxf/refactor
R
false
false
1,877
r
#' Refactor Code #' #' Both original and refactored expressions are run. The function will fail if #' the outputs are different. `%refactor2%` will also fail if the refactored #' expression runs slower. #' #' @param original original expression #' @param refactored refactored expression #' @name refactor #' @export #' ...
library(tidyverse) df <- tibble( date = seq(1:13), done = c("yes","yes","yes","yes","yes","yes","yes","no","no","no","no","yes","no"), y = rep(1,13) ) p<-ggplot(df, aes(x = date, y = y, fill = done))+ geom_tile(aes(width=0.5), color = "black")+ scale_fill_manual(values = c("#f0b99e", "#95f2f5"))...
/Code/Day_12.R
no_license
tessaeagle/30DayChartChallenge
R
false
false
1,542
r
library(tidyverse) df <- tibble( date = seq(1:13), done = c("yes","yes","yes","yes","yes","yes","yes","no","no","no","no","yes","no"), y = rep(1,13) ) p<-ggplot(df, aes(x = date, y = y, fill = done))+ geom_tile(aes(width=0.5), color = "black")+ scale_fill_manual(values = c("#f0b99e", "#95f2f5"))...
#' @include reporter.r NULL #' Test reporter: summary of errors. #' #' This is the most useful reporting reporter as it lets you know both which #' tests have run successfully, as well as fully reporting information about #' failures and errors. It is the default reporting reporter used by #' \code{\link{test_dir}} a...
/h2o-r/src/test/resources/testthat/R/reporter-summary.r
permissive
milzod/h2o-dev
R
false
false
3,370
r
#' @include reporter.r NULL #' Test reporter: summary of errors. #' #' This is the most useful reporting reporter as it lets you know both which #' tests have run successfully, as well as fully reporting information about #' failures and errors. It is the default reporting reporter used by #' \code{\link{test_dir}} a...
## select genes gl <- readRDS('/home-4/whou10@jhu.edu/scratch/Wenpin/GBM/res/gl/GBM_allen.rds') gl <- row.names(gl)[gl[,'fdr'] > 0.1] ctgl <- readRDS('/home-4/whou10@jhu.edu/scratch/Wenpin/GBM/res/gl/allen_ct.rds') ctgl <- unique(unlist(sapply(ctgl,function(i) { row.names(i)[i[,'fdr'] < 0.05 & abs(i[,'log2FoldChange'...
/old/20200329/code/05_seurat/01_integrate_atlas_and_allGBM.R
no_license
Winnie09/GBM
R
false
false
2,131
r
## select genes gl <- readRDS('/home-4/whou10@jhu.edu/scratch/Wenpin/GBM/res/gl/GBM_allen.rds') gl <- row.names(gl)[gl[,'fdr'] > 0.1] ctgl <- readRDS('/home-4/whou10@jhu.edu/scratch/Wenpin/GBM/res/gl/allen_ct.rds') ctgl <- unique(unlist(sapply(ctgl,function(i) { row.names(i)[i[,'fdr'] < 0.05 & abs(i[,'log2FoldChange'...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/replicate_correlation.R \name{replicate_correlation} \alias{replicate_correlation} \title{Measure replicate correlation of variables.} \usage{ replicate_correlation(sample, variables, strata, replicates, replicate_by = NULL, split_by = NULL...
/man/replicate_correlation.Rd
permissive
tojojames/cytominer
R
false
true
1,923
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/replicate_correlation.R \name{replicate_correlation} \alias{replicate_correlation} \title{Measure replicate correlation of variables.} \usage{ replicate_correlation(sample, variables, strata, replicates, replicate_by = NULL, split_by = NULL...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/vcov.glmb.R \name{vcov.glmb} \alias{vcov.glmb} \title{Calculate Variance-Covariance Matrux for a Fitted Model Object} \usage{ \method{vcov}{glmb}(object, ...) } \arguments{ \item{object}{fitted model object, typically the result of a call to ...
/man/vcov.glmb.Rd
no_license
knygren/glmbayes
R
false
true
1,368
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/vcov.glmb.R \name{vcov.glmb} \alias{vcov.glmb} \title{Calculate Variance-Covariance Matrux for a Fitted Model Object} \usage{ \method{vcov}{glmb}(object, ...) } \arguments{ \item{object}{fitted model object, typically the result of a call to ...
library(osmose) ### Name: getOsmoseParameter ### Title: Get a parameter from a name chain (error if not found). ### Aliases: getOsmoseParameter ### ** Examples { filename = system.file("extdata", "inputs/osm_all-parameters.csv", package="osmose") par = readOsmoseConfiguration(filename) getOsmoseParameter(p...
/data/genthat_extracted_code/osmose/examples/getOsmoseParameter.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
385
r
library(osmose) ### Name: getOsmoseParameter ### Title: Get a parameter from a name chain (error if not found). ### Aliases: getOsmoseParameter ### ** Examples { filename = system.file("extdata", "inputs/osm_all-parameters.csv", package="osmose") par = readOsmoseConfiguration(filename) getOsmoseParameter(p...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/steamR-package.R \name{steamR_methods} \alias{steamR_methods} \title{Methods} \usage{ steamR_methods() } \value{ A list of methods available in the steamR package. } \description{ Returns a list of available steamR methods. }
/man/steamR_methods.Rd
permissive
josegallegos07/steamR
R
false
true
305
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/steamR-package.R \name{steamR_methods} \alias{steamR_methods} \title{Methods} \usage{ steamR_methods() } \value{ A list of methods available in the steamR package. } \description{ Returns a list of available steamR methods. }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getTokenList.R \name{getTokenList} \alias{getTokenList} \title{Gets tokens from character vector of lines} \usage{ getTokenList(lines) } \arguments{ \item{lines}{character vector with text from configuration file} } \value{ First right and le...
/man/getTokenList.Rd
permissive
jhagberg/nprcgenekeepr
R
false
true
1,185
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getTokenList.R \name{getTokenList} \alias{getTokenList} \title{Gets tokens from character vector of lines} \usage{ getTokenList(lines) } \arguments{ \item{lines}{character vector with text from configuration file} } \value{ First right and le...
\name{enve.recplot} \alias{enve.recplot} \title{enve recplot} \description{Produces recruitment plots provided that BlastTab.catsbj.pl has been previously executed. Requires the gplots library.} \usage{enve.recplot(prefix, id.min = NULL, id.max = NULL, id.binsize = NULL, id.splines = 0, id.metric = "id", id....
/enveomics.R/man/enve.recplot.Rd
permissive
tkiryuti/enveomics-R-doc-updates
R
false
false
4,608
rd
\name{enve.recplot} \alias{enve.recplot} \title{enve recplot} \description{Produces recruitment plots provided that BlastTab.catsbj.pl has been previously executed. Requires the gplots library.} \usage{enve.recplot(prefix, id.min = NULL, id.max = NULL, id.binsize = NULL, id.splines = 0, id.metric = "id", id....
caseonly <- function(data,treatment,BaselineMarker,extra=NULL,fraction=0.5) { ### data: a data matrix with cases only ### BaselineMarker: baseline biomarker ### extra: the extra covariates that may be adjusted for in case-only data ### fraction: the randomization fraction of active treatment assignment ...
/TwoPhaseInd/R/caseonly.R
no_license
ingted/R-Examples
R
false
false
2,752
r
caseonly <- function(data,treatment,BaselineMarker,extra=NULL,fraction=0.5) { ### data: a data matrix with cases only ### BaselineMarker: baseline biomarker ### extra: the extra covariates that may be adjusted for in case-only data ### fraction: the randomization fraction of active treatment assignment ...
Udemy Training by Stephen Grider. https://www.udemy.com/ethereum-and-solidity-the-complete-developers-guide/learn/v4/overview STRONGLY RECOMMEND TAKE THE TRAINING -> Create a node project "npm init" - File "compile.js" configure the compile process to *.sol files -> Install the compiler "solc" package: "npm ins...
/inbox/README.rd
no_license
Alysonlv/solidity_training
R
false
false
927
rd
Udemy Training by Stephen Grider. https://www.udemy.com/ethereum-and-solidity-the-complete-developers-guide/learn/v4/overview STRONGLY RECOMMEND TAKE THE TRAINING -> Create a node project "npm init" - File "compile.js" configure the compile process to *.sol files -> Install the compiler "solc" package: "npm ins...
#' Getting formattable tables #' #' This function transforms two columns and three column dataframes into a presentable form to be used in official reports. #' Dataframes with more variables were not typically used in my analysis. #' #' #' @param table A dataframe #' @param names Column names of the table #' @param Num...
/functions/create_table.R
no_license
Isuru657/LISTEN
R
false
false
1,123
r
#' Getting formattable tables #' #' This function transforms two columns and three column dataframes into a presentable form to be used in official reports. #' Dataframes with more variables were not typically used in my analysis. #' #' #' @param table A dataframe #' @param names Column names of the table #' @param Num...
#' Retrieves the most recent value of the capital account #' @param Account string identifier of account #' @param Date last date to retrieve calculated equity for, as string #' @return Numeric value of the equity account #' @export getEndEq <- function(Account, Date) { # @author Peter Carl aname<-Account Accou...
/R/getEndEq.R
no_license
redmode/blotter
R
false
false
1,160
r
#' Retrieves the most recent value of the capital account #' @param Account string identifier of account #' @param Date last date to retrieve calculated equity for, as string #' @return Numeric value of the equity account #' @export getEndEq <- function(Account, Date) { # @author Peter Carl aname<-Account Accou...
testlist <- list(b = c(50401144L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L)) result <- do.call(mcga:::ByteVectorToDoubles,testlist) str(result)
/mcga/inst/testfiles/ByteVectorToDoubles/AFL_ByteVectorToDoubles/ByteVectorToDoubles_valgrind_files/1613101682-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
182
r
testlist <- list(b = c(50401144L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L)) result <- do.call(mcga:::ByteVectorToDoubles,testlist) str(result)
#' Run the ames sampling distribution shiny app #' #' @export ames_sampling_dist = function() { if (!allow_shiny()) stop("Shiny app will only run when built within RStudio.") ames = statsr::ames shinyApp( ui <- fluidPage( # Sidebar with a slider input for number of bins sidebarLayout(...
/R/ames_sampling_dist.R
no_license
jaekookang/statsr
R
false
false
2,310
r
#' Run the ames sampling distribution shiny app #' #' @export ames_sampling_dist = function() { if (!allow_shiny()) stop("Shiny app will only run when built within RStudio.") ames = statsr::ames shinyApp( ui <- fluidPage( # Sidebar with a slider input for number of bins sidebarLayout(...
##'@inheritParams posterior.predictive3D ##' @export ##' @rdname posterior.predictive.pb posterior.predictive.nl <- function( post.sample , ## from pb.post.sample from = post.sample$Nbin+1, to = post.sample$Nsim, thin = 50, npoints=40,eps=1e-3, equi = T, displ=T, ... ) { predictiv...
/R/posterior.predictive.nl.r
no_license
cran/BMAmevt
R
false
false
2,015
r
##'@inheritParams posterior.predictive3D ##' @export ##' @rdname posterior.predictive.pb posterior.predictive.nl <- function( post.sample , ## from pb.post.sample from = post.sample$Nbin+1, to = post.sample$Nsim, thin = 50, npoints=40,eps=1e-3, equi = T, displ=T, ... ) { predictiv...
## Overwrite a Symbol in a Package ## ## Replaces a symbol with name \code{x} with a symbol \code{value}, in the ## package \code{package}. ## ## The value of the old symbol is returned. overwrite <- function(x, value, package=NULL) { if (!is.character(x)) { call <- match.call() x <- capture.output(call$x)...
/R/overwrite.R
no_license
dpastoor/Kmisc
R
false
false
1,251
r
## Overwrite a Symbol in a Package ## ## Replaces a symbol with name \code{x} with a symbol \code{value}, in the ## package \code{package}. ## ## The value of the old symbol is returned. overwrite <- function(x, value, package=NULL) { if (!is.character(x)) { call <- match.call() x <- capture.output(call$x)...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/network.R \name{terminal_reaches} \alias{terminal_reaches} \title{Return terminal reaches from collection intersecting lake} \usage{ terminal_reaches( lon = NA, lat = NA, buffer_dist = 0.01, network = NA, lakepoly = NA, lakewise =...
/man/terminal_reaches.Rd
no_license
jcmartinmu/nhdR
R
false
true
3,083
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/network.R \name{terminal_reaches} \alias{terminal_reaches} \title{Return terminal reaches from collection intersecting lake} \usage{ terminal_reaches( lon = NA, lat = NA, buffer_dist = 0.01, network = NA, lakepoly = NA, lakewise =...
context("av") test_that(".avtable_import_set_entity() works", { .data <- data.frame(x=1:3, y=1:3, z_id=1:3) expect_identical( names(.avtable_import_set_entity(.data, "x")), c("entity:x_id", "y", "z_id") ) expect_identical( names(.avtable_import_set_entity(.data, "y")), ...
/tests/testthat/test_av.R
no_license
vjcitn/AnVIL
R
false
false
2,508
r
context("av") test_that(".avtable_import_set_entity() works", { .data <- data.frame(x=1:3, y=1:3, z_id=1:3) expect_identical( names(.avtable_import_set_entity(.data, "x")), c("entity:x_id", "y", "z_id") ) expect_identical( names(.avtable_import_set_entity(.data, "y")), ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/massbalance.R \name{loads_in_swt_month} \alias{loads_in_swt_month} \title{Aggregate loads per Mass balance area, term, substance and month} \usage{ loads_in_swt_month(df, f.subs = "all", debug = F) } \arguments{ \item{df}{the mass balance inp...
/man/loads_in_swt_month.Rd
no_license
EMMeijers/Waternet
R
false
true
697
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/massbalance.R \name{loads_in_swt_month} \alias{loads_in_swt_month} \title{Aggregate loads per Mass balance area, term, substance and month} \usage{ loads_in_swt_month(df, f.subs = "all", debug = F) } \arguments{ \item{df}{the mass balance inp...