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 |
|---|---|---|---|---|---|---|---|---|---|
tryCatch(utils::globalVariables(c('RStudioGD')),
error=function(e) message('Looks like you should update R.'))
#' @details
#' \code{.do.safe.call} avoids conflicts between named arguments and ... by taking named arguments
#' preferentially.
#'
#' @rdname mosaic-internal
#'
#' @param what either a function ... | /R/utils.R | no_license | fboehm/mosaic | R | false | false | 1,970 | r |
tryCatch(utils::globalVariables(c('RStudioGD')),
error=function(e) message('Looks like you should update R.'))
#' @details
#' \code{.do.safe.call} avoids conflicts between named arguments and ... by taking named arguments
#' preferentially.
#'
#' @rdname mosaic-internal
#'
#' @param what either a function ... |
# *** PROCESSING UW CLIMATE DATA ***
# AUTHOR: HEIDI NGUYEN
# email: htn5098@psu.edu
inputs = commandArgs(trailingOnly=T)
ncfile=as.character(inputs[1])
gcm=as.character(inputs[2])
period=as.character(inputs[3])
var=as.character(inputs[4])
timeLength=as.numeric(inputs[5])
varname=as.character(inputs[6])
... | /src/Rcodes/RET_processing_rawdata.R | no_license | htn5098/heidi_master_repo | R | false | false | 3,394 | r | # *** PROCESSING UW CLIMATE DATA ***
# AUTHOR: HEIDI NGUYEN
# email: htn5098@psu.edu
inputs = commandArgs(trailingOnly=T)
ncfile=as.character(inputs[1])
gcm=as.character(inputs[2])
period=as.character(inputs[3])
var=as.character(inputs[4])
timeLength=as.numeric(inputs[5])
varname=as.character(inputs[6])
... |
#' @title Make PCA Plot from Comparison Matrix
#' @description
#' From a user-inputted value, creates a PCA plot from
#' the sample data and colors each point by the subtype
#' information provided.
#' @param compare.matrix The comparison matrix generated from
#' the compMatrix() function
#' @param value The value to b... | /R/epiPCA.R | no_license | wisekh6/epihet | R | false | false | 5,162 | r | #' @title Make PCA Plot from Comparison Matrix
#' @description
#' From a user-inputted value, creates a PCA plot from
#' the sample data and colors each point by the subtype
#' information provided.
#' @param compare.matrix The comparison matrix generated from
#' the compMatrix() function
#' @param value The value to b... |
library(RLLVMCompile)
f =
function(x)
!x
fc = compileFunction(f, Int32Type, Int32Type)
.llvm(fc, 0)
.llvm(fc, 1)
| /tests/unaryLogical.R | no_license | duncantl/RLLVMCompile | R | false | false | 122 | r | library(RLLVMCompile)
f =
function(x)
!x
fc = compileFunction(f, Int32Type, Int32Type)
.llvm(fc, 0)
.llvm(fc, 1)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualize_functions.R
\name{visualize_data_frame}
\alias{visualize_data_frame}
\title{Visualize a data frame}
\usage{
visualize_data_frame(data, edit = F)
}
\arguments{
\item{data}{A data frame}
\item{edit}{Do you wish to edit the data}
}
\d... | /man/visualize_data_frame.Rd | permissive | fxcebx/fundManageR | R | false | true | 400 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualize_functions.R
\name{visualize_data_frame}
\alias{visualize_data_frame}
\title{Visualize a data frame}
\usage{
visualize_data_frame(data, edit = F)
}
\arguments{
\item{data}{A data frame}
\item{edit}{Do you wish to edit the data}
}
\d... |
\name{Arith-methods}
\docType{methods}
\alias{+}
\alias{Arith}
\alias{+-methods}
\alias{+,LINCbio,LINCfeature-method}
\alias{+,LINCcluster,LINCfeature-method}
\alias{+,LINCmatrix,LINCfeature-method}
\title{Plus Operator '+' In \pkg{LINC}}
\description{
\code{plotlinc} is the generic function that creates plots based ... | /man/Arith-methods.Rd | no_license | ManuelGoepferich/LINC | R | false | false | 841 | rd | \name{Arith-methods}
\docType{methods}
\alias{+}
\alias{Arith}
\alias{+-methods}
\alias{+,LINCbio,LINCfeature-method}
\alias{+,LINCcluster,LINCfeature-method}
\alias{+,LINCmatrix,LINCfeature-method}
\title{Plus Operator '+' In \pkg{LINC}}
\description{
\code{plotlinc} is the generic function that creates plots based ... |
\name{pull.rf}
\alias{pull.rf}
\title{Pull out recombination fractions or LOD scores from a cross object}
\description{
Pull out either the pairwise recombination fractions or the LOD
scores, as calculated by \code{\link{est.rf}}, from a cross object.
}
\usage{pull.rf(cross, what=c("rf", "lod"), chr)}
\argument... | /man/pull.rf.Rd | no_license | smoe/qtl | R | false | false | 1,631 | rd | \name{pull.rf}
\alias{pull.rf}
\title{Pull out recombination fractions or LOD scores from a cross object}
\description{
Pull out either the pairwise recombination fractions or the LOD
scores, as calculated by \code{\link{est.rf}}, from a cross object.
}
\usage{pull.rf(cross, what=c("rf", "lod"), chr)}
\argument... |
surv_sim <- function(n.trt, n.pbo, med.surv.pbo, med.surv.trt, end.study){
# potential future options: drp.out.rate = .1
lam.pbo <- log(2) / med.surv.pbo
lam.trt <- log(2) / med.surv.trt
sv.pbo <- rexp(n.pbo, lam.pbo)
sv.trt <- rexp(n.trt, lam.trt)
sv.out <- Surv(c(sv.pbo, sv.trt))
# cens.sub... | /R/surv_sim.R | no_license | paulmanser/cafs | R | false | false | 553 | r |
surv_sim <- function(n.trt, n.pbo, med.surv.pbo, med.surv.trt, end.study){
# potential future options: drp.out.rate = .1
lam.pbo <- log(2) / med.surv.pbo
lam.trt <- log(2) / med.surv.trt
sv.pbo <- rexp(n.pbo, lam.pbo)
sv.trt <- rexp(n.trt, lam.trt)
sv.out <- Surv(c(sv.pbo, sv.trt))
# cens.sub... |
#!/applications/R/R-3.5.0/bin/Rscript
# Generate genome-wide plots of chromosome profiles
# Usage:
# Rscript ./log2_ChIPinput_genomewideZscore_perwin_PLOTONLY_REC8_control_GC_v280319.R 10kb
args <- commandArgs(trailingOnly = T)
winName <- as.character(args[1])
library(parallel)
# Genomic definitions
chrs <- c("Chr... | /coverage/common_input_MYC_Rep1/log2ChIPinput/genomeProfiles/genomewideZscore/log2_ChIPinput_genomewideZscore_perwin_PLOTONLY_REC8_control_GC_v280319.R | no_license | ajtock/REC8_pooled | R | false | false | 8,377 | r | #!/applications/R/R-3.5.0/bin/Rscript
# Generate genome-wide plots of chromosome profiles
# Usage:
# Rscript ./log2_ChIPinput_genomewideZscore_perwin_PLOTONLY_REC8_control_GC_v280319.R 10kb
args <- commandArgs(trailingOnly = T)
winName <- as.character(args[1])
library(parallel)
# Genomic definitions
chrs <- c("Chr... |
#'dplyr
#'
#
order_by(10:1, cumsum(1:10))
[1] 55 54 52 49 45 40 34 27 19 10
filter(tw50_data, Volume > 0)
arrange(tw50_data1,desc(Date))
slice(tw50_data,c(1,2,4,3)) | /packages/dplyr.R | no_license | kaiyu33/R_Repository | R | false | false | 169 | r | #'dplyr
#'
#
order_by(10:1, cumsum(1:10))
[1] 55 54 52 49 45 40 34 27 19 10
filter(tw50_data, Volume > 0)
arrange(tw50_data1,desc(Date))
slice(tw50_data,c(1,2,4,3)) |
#' Marine Reserve patch model
#' @param r is the intrinisc growth rate, output from the DLSA.R function
#' @param K is the fishery's carrying capcity, output from the DLSA.R function
#' @param Fishing is the fishing effort, output from the DLSA.R function
#' @param B is the available biomass, output from the DLSA.R ... | /R/MPA_model.R | no_license | sjcruz/midriffswatch | R | false | false | 3,858 | r | #' Marine Reserve patch model
#' @param r is the intrinisc growth rate, output from the DLSA.R function
#' @param K is the fishery's carrying capcity, output from the DLSA.R function
#' @param Fishing is the fishing effort, output from the DLSA.R function
#' @param B is the available biomass, output from the DLSA.R ... |
#' Read MAF files.
#' @description Takes tab delimited MAF (can be plain text or gz compressed) file as an input and summarizes it in various ways. Also creates oncomatrix - helpful for visualization.
#' @details This function takes MAF file as input and summarizes them. If copy number data is available, e.g from GISTI... | /R/read_maf_dt.R | permissive | OmarAshkar/maftools | R | false | false | 11,196 | r | #' Read MAF files.
#' @description Takes tab delimited MAF (can be plain text or gz compressed) file as an input and summarizes it in various ways. Also creates oncomatrix - helpful for visualization.
#' @details This function takes MAF file as input and summarizes them. If copy number data is available, e.g from GISTI... |
\name{get_tag_cor}
\alias{get_tag_cor}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
%% ~~function to do ... ~~
Get the Pearson Correlation for each Tag in an APCD df
}
\description{
For each tag it calculates the pearson correlation in respect to the median bundle price. An absolute value tra... | /man/get_tag_cor.Rd | no_license | utah-osa/hcctools | R | false | false | 1,018 | rd | \name{get_tag_cor}
\alias{get_tag_cor}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
%% ~~function to do ... ~~
Get the Pearson Correlation for each Tag in an APCD df
}
\description{
For each tag it calculates the pearson correlation in respect to the median bundle price. An absolute value tra... |
## Get MODIS Data
#phen_sites = data.frame( SITE_NAME = c("Coweeta","Shalehillsczo","Howland","Shenandoah","Bartlett"),
# URL = c("http://phenocam.sr.unh.edu/data/archive/bartlett/ROI/bartlett_deciduous_0001_gcc.csv",
# "http://phenocam.sr.unh.edu/data/archive/cowe... | /Phenolgy_MODIS.R | no_license | dongjwOU/PhenologyForecast | R | false | false | 2,120 | r | ## Get MODIS Data
#phen_sites = data.frame( SITE_NAME = c("Coweeta","Shalehillsczo","Howland","Shenandoah","Bartlett"),
# URL = c("http://phenocam.sr.unh.edu/data/archive/bartlett/ROI/bartlett_deciduous_0001_gcc.csv",
# "http://phenocam.sr.unh.edu/data/archive/cowe... |
# INPUT
# Initial state values for a naive population (everyone is susceptible except for 1 index case),
# where the total population size N is (approximately) 1 million, 20% of this are children and 15% are elderly
initial_state_values <- c(S1 = 200000, # 20% of the population are children - all susceptible
... | /Models/RScripts/SIR/IDS21.R | no_license | 259mit/SARS-COV2-SIR-model-2020 | R | false | false | 4,277 | r | # INPUT
# Initial state values for a naive population (everyone is susceptible except for 1 index case),
# where the total population size N is (approximately) 1 million, 20% of this are children and 15% are elderly
initial_state_values <- c(S1 = 200000, # 20% of the population are children - all susceptible
... |
#' Aggregate raster
#'
#' Aggregates a raster to a lower resolution.
#'
#' @param input Input raster file.
#' @param output Output raster file.
#' @param agg_factor Aggregation factor, in pixels.
#' @param type Statistic used to fill output pixels.
#' @param wd Changes the working directory.
#' @param verbose_mode Sets... | /PY2R/scripts/gis_analysis.R | permissive | gitWayneZhang/whiteboxR | R | false | false | 84,966 | r | #' Aggregate raster
#'
#' Aggregates a raster to a lower resolution.
#'
#' @param input Input raster file.
#' @param output Output raster file.
#' @param agg_factor Aggregation factor, in pixels.
#' @param type Statistic used to fill output pixels.
#' @param wd Changes the working directory.
#' @param verbose_mode Sets... |
-------
#html#
-------
#Html setup
course_url = "https://www.sfu.ca/outlines.html?2019/spring/stat/240/d100"
course_page = readLines(course_url)
#Using `grep` to extract values can get us close but is not always specific enough and is limited to just one line.
index = grep("<h1 id=\"name\">", course_page... | /html and Json CheatSheet.R | no_license | ZhifanShen/Stat240Final | R | false | false | 2,030 | r |
-------
#html#
-------
#Html setup
course_url = "https://www.sfu.ca/outlines.html?2019/spring/stat/240/d100"
course_page = readLines(course_url)
#Using `grep` to extract values can get us close but is not always specific enough and is limited to just one line.
index = grep("<h1 id=\"name\">", course_page... |
library(tidyverse)
library(stringr)
library(caret)
library(lubridate)
library(survival)
library(purrr)
library(forcats)
| /R/_setup.R | no_license | phm16/cdm_prediction | R | false | false | 120 | r | library(tidyverse)
library(stringr)
library(caret)
library(lubridate)
library(survival)
library(purrr)
library(forcats)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_pmartR.R
\name{plot.lipidData}
\alias{plot.lipidData}
\title{plot.lipidData}
\usage{
\method{plot}{lipidData}(omicsData, order_by = NULL, color_by = NULL,
facet_by = NULL, facet_cols = NULL, ...)
}
\description{
For plotting an S3 obje... | /man/plot-pmartR-lipidData.Rd | no_license | vk2mars/pmartRqc | R | false | true | 2,726 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_pmartR.R
\name{plot.lipidData}
\alias{plot.lipidData}
\title{plot.lipidData}
\usage{
\method{plot}{lipidData}(omicsData, order_by = NULL, color_by = NULL,
facet_by = NULL, facet_cols = NULL, ...)
}
\description{
For plotting an S3 obje... |
payout <- -150000
prem <- 1150
n <- 1000
p_m50 <- .015
ev_pan <- n*(prem*(1-p_m50) + payout*p_m50)
se_pan <- sqrt(n) * abs(prem - payout)*sqrt(p_m50*(1-p_m50))
prob_loss <- pnorm(0, ev_pan, se_pan)
prob_losmil <- pnorm(-1000000, ev_pan, se_pan)
##p <- seq(.01, .03, .001)
lose_prob <- function(prob_die){
... | /sec4_big_short/Ques_3.R | no_license | MGreels/EDX_probability | R | false | false | 950 | r |
payout <- -150000
prem <- 1150
n <- 1000
p_m50 <- .015
ev_pan <- n*(prem*(1-p_m50) + payout*p_m50)
se_pan <- sqrt(n) * abs(prem - payout)*sqrt(p_m50*(1-p_m50))
prob_loss <- pnorm(0, ev_pan, se_pan)
prob_losmil <- pnorm(-1000000, ev_pan, se_pan)
##p <- seq(.01, .03, .001)
lose_prob <- function(prob_die){
... |
## run in pkg root
save_file <- function(...,pkg,type="rda") {
f <- file.path("inst","extdata",sprintf("%s_example.%s",pkg,type))
if (type=="rda") {
save(...,file=f)
} else {
saveRDS(...,file=f)
}
invisible(NULL)
}
run_pkg <- function(pkg,e) {
if (require(pkg,character.only=TRUE)) {
eval(e)
... | /inst/extdata/run_examples.R | no_license | JosueMA/broom.mixed | R | false | false | 2,380 | r | ## run in pkg root
save_file <- function(...,pkg,type="rda") {
f <- file.path("inst","extdata",sprintf("%s_example.%s",pkg,type))
if (type=="rda") {
save(...,file=f)
} else {
saveRDS(...,file=f)
}
invisible(NULL)
}
run_pkg <- function(pkg,e) {
if (require(pkg,character.only=TRUE)) {
eval(e)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CEA.R
\name{SeqCEA}
\alias{SeqCEA}
\title{Sequential Coordinate Exchange algorithm for MNL model.}
\usage{
SeqCEA(
des = NULL,
lvls,
coding,
c.lvls = NULL,
n.alts,
par.draws,
prior.covar,
alt.cte = NULL,
no.choice = NULL,
... | /man/SeqCEA.Rd | no_license | traets/idefix | R | false | true | 5,513 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CEA.R
\name{SeqCEA}
\alias{SeqCEA}
\title{Sequential Coordinate Exchange algorithm for MNL model.}
\usage{
SeqCEA(
des = NULL,
lvls,
coding,
c.lvls = NULL,
n.alts,
par.draws,
prior.covar,
alt.cte = NULL,
no.choice = NULL,
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MSEObj.r
\name{Tplot2}
\alias{Tplot2}
\title{A shorter version of the plot method for MSEs that just shows the overall
trade-offs}
\usage{
Tplot2(MSEobj,nam=NA)
}
\arguments{
\item{MSEobj}{An object of class 'MSE'}
\item{nam}{Name of the plo... | /man/Tplot2.Rd | no_license | Lijiuqi/DLMtool | R | false | true | 871 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MSEObj.r
\name{Tplot2}
\alias{Tplot2}
\title{A shorter version of the plot method for MSEs that just shows the overall
trade-offs}
\usage{
Tplot2(MSEobj,nam=NA)
}
\arguments{
\item{MSEobj}{An object of class 'MSE'}
\item{nam}{Name of the plo... |
#' Import Pictures of Copper
#'
#' This function allows you to get a lovely dose of Copper when R is not working
#' @keywords Copper
#' @export
#' @examples
#' get_coppeR()
get_coppeR <- function(x) {
# listing files from GitHub repository
req <- httr::GET("https://api.github.com/repos/padpadpadpad/CoppeR/content... | /R/get_coppeR.R | no_license | bnjwatson/CoppeR | R | false | false | 1,015 | r | #' Import Pictures of Copper
#'
#' This function allows you to get a lovely dose of Copper when R is not working
#' @keywords Copper
#' @export
#' @examples
#' get_coppeR()
get_coppeR <- function(x) {
# listing files from GitHub repository
req <- httr::GET("https://api.github.com/repos/padpadpadpad/CoppeR/content... |
base_importer_init_test <- read.csv("D:/kaggle/all/application_test.csv", header = T, sep = ",")
row.names(base_importer_init_test) <- paste("ind_test_",row.names(base_importer_init_test),sep="")
dim(base_importer_init_test)
Mat_na_test <- matrix(NA,1,1)
colnames(Mat_na_test) <- "colonne_na_test"
for(i in 2:ncol... | /with_R/kaggle_estimation_credit.R | no_license | AinaKIKISAGBE/Machine-learning | R | false | false | 17,994 | r | base_importer_init_test <- read.csv("D:/kaggle/all/application_test.csv", header = T, sep = ",")
row.names(base_importer_init_test) <- paste("ind_test_",row.names(base_importer_init_test),sep="")
dim(base_importer_init_test)
Mat_na_test <- matrix(NA,1,1)
colnames(Mat_na_test) <- "colonne_na_test"
for(i in 2:ncol... |
\name{CommEcol-package}
\alias{CommEcol-package}
\alias{CommEcol}
\docType{package}
\title{Community Ecology Analyses}
\description{Community Ecology Analyses.}
\details{
\tabular{ll}{
Package: \tab CommEcol\cr
Type: \tab Package\cr
Version: \tab 1.0\cr
Date: \tab 2012-01-06\cr
License: \tab GPL-2\cr
LazyLoad: \tab ye... | /man/CommEcol.Rd | no_license | cran/CommEcol | R | false | false | 541 | rd | \name{CommEcol-package}
\alias{CommEcol-package}
\alias{CommEcol}
\docType{package}
\title{Community Ecology Analyses}
\description{Community Ecology Analyses.}
\details{
\tabular{ll}{
Package: \tab CommEcol\cr
Type: \tab Package\cr
Version: \tab 1.0\cr
Date: \tab 2012-01-06\cr
License: \tab GPL-2\cr
LazyLoad: \tab ye... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wgcna_HeatCorFinal.R
\name{wgcna_HeatCorFinal}
\alias{wgcna_HeatCorFinal}
\title{produces a correlation map given wgcna network data using a different library ComplexHeatmap}
\usage{
wgcna_HeatCorFinal(lnames = NULL, rnames = NULL, read.cutof... | /man/wgcna_HeatCorFinal.Rd | no_license | arcolombo/rToolKit | R | false | true | 2,018 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wgcna_HeatCorFinal.R
\name{wgcna_HeatCorFinal}
\alias{wgcna_HeatCorFinal}
\title{produces a correlation map given wgcna network data using a different library ComplexHeatmap}
\usage{
wgcna_HeatCorFinal(lnames = NULL, rnames = NULL, read.cutof... |
#' Create a Bootstrap page
#'
#' Create a Shiny UI page that loads the CSS and JavaScript for
#' \href{http://getbootstrap.com/2.3.2/}{Bootstrap}, and has no content in the
#' page body (other than what you provide).
#'
#' This function is primarily intended for users who are proficient in
#' HTML/CSS, and know how to ... | /R/page.R | no_license | arturochian/shinyBootstrap2 | R | false | false | 9,503 | r | #' Create a Bootstrap page
#'
#' Create a Shiny UI page that loads the CSS and JavaScript for
#' \href{http://getbootstrap.com/2.3.2/}{Bootstrap}, and has no content in the
#' page body (other than what you provide).
#'
#' This function is primarily intended for users who are proficient in
#' HTML/CSS, and know how to ... |
library('DBI')
library('RSQLite')
png(file="out1_calgary_combined.jpg")
db = dbConnect(SQLite(), dbname="../311CallCentre.db")
query <- dbSendQuery(db, "SELECT
STRFTIME('%Y-%m', date) AS date,
AVG(answered)/AVG(offered)*100 AS effectiveness
FROM
'calgary_combined'
GROUP BY
STRFTI... | /Q4/Q4.R | no_license | vishnukey/SCIE201_GroupProject | R | false | false | 604 | r | library('DBI')
library('RSQLite')
png(file="out1_calgary_combined.jpg")
db = dbConnect(SQLite(), dbname="../311CallCentre.db")
query <- dbSendQuery(db, "SELECT
STRFTIME('%Y-%m', date) AS date,
AVG(answered)/AVG(offered)*100 AS effectiveness
FROM
'calgary_combined'
GROUP BY
STRFTI... |
# -------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------
# Required packages
library("checkmate")
library("OpenML")
library("mlr")
library("BatchExperiments")
# mlr and OpenML... | /R/config.R | no_license | openml/randomBot | R | false | false | 1,204 | r | # -------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------
# Required packages
library("checkmate")
library("OpenML")
library("mlr")
library("BatchExperiments")
# mlr and OpenML... |
library(udpipe)
### Name: as_word2vec
### Title: Convert a matrix of word vectors to word2vec format
### Aliases: as_word2vec
### ** Examples
wordvectors <- matrix(rnorm(1000), nrow = 100, ncol = 10)
rownames(wordvectors) <- sprintf("word%s", seq_len(nrow(wordvectors)))
wv <- as_word2vec(wordvectors)
cat(wv)
f <- ... | /data/genthat_extracted_code/udpipe/examples/as_word2vec.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 403 | r | library(udpipe)
### Name: as_word2vec
### Title: Convert a matrix of word vectors to word2vec format
### Aliases: as_word2vec
### ** Examples
wordvectors <- matrix(rnorm(1000), nrow = 100, ncol = 10)
rownames(wordvectors) <- sprintf("word%s", seq_len(nrow(wordvectors)))
wv <- as_word2vec(wordvectors)
cat(wv)
f <- ... |
## ----setup, include=FALSE---------
knitr::opts_chunk$set(echo = TRUE)
## ----monty_hall, cache = TRUE-----
set.seed(1)
repeats <- 1e4 # We will repeat the experiment 10000 times
win.no.switch <- numeric(length = repeats) # will save 0 or 1 based on winning no switch
win.switch <- numeric(length = repeats)... | /Monty Hall, Toy collector, monte carlo samples.R | no_license | sakib-malik/Statistical-Simulation-And-Data-Analysis | R | false | false | 2,448 | r | ## ----setup, include=FALSE---------
knitr::opts_chunk$set(echo = TRUE)
## ----monty_hall, cache = TRUE-----
set.seed(1)
repeats <- 1e4 # We will repeat the experiment 10000 times
win.no.switch <- numeric(length = repeats) # will save 0 or 1 based on winning no switch
win.switch <- numeric(length = repeats)... |
P.to.Z <- function(P, D) {
with(c(P, D), {
ollq <- matrix(0, nrow=n, ncol=q)
for(j in 1:q){
ldens <- dnorm(as.vector(ovals),rep(ostat[j,],rep(n,op)),
rep(sqrt(ovar)[j,],rep(n,op)), log = TRUE)
lDENS <- matrix(ldens, nrow = n)
ollq[,j] <- rowSums(lDE... | /P.to.Z.r | no_license | majmurr/multimix-rgh | R | false | false | 2,412 | r | P.to.Z <- function(P, D) {
with(c(P, D), {
ollq <- matrix(0, nrow=n, ncol=q)
for(j in 1:q){
ldens <- dnorm(as.vector(ovals),rep(ostat[j,],rep(n,op)),
rep(sqrt(ovar)[j,],rep(n,op)), log = TRUE)
lDENS <- matrix(ldens, nrow = n)
ollq[,j] <- rowSums(lDE... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AutoGeneratedDefinitions.R
\name{getCharacterizationDefinition}
\alias{getCharacterizationDefinition}
\title{Get Characterization id definition.}
\usage{
getCharacterizationDefinition(characterizationId, baseUrl)
}
\arguments{
\item{character... | /man/getCharacterizationDefinition.Rd | permissive | OHDSI/ROhdsiWebApi | R | false | true | 912 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AutoGeneratedDefinitions.R
\name{getCharacterizationDefinition}
\alias{getCharacterizationDefinition}
\title{Get Characterization id definition.}
\usage{
getCharacterizationDefinition(characterizationId, baseUrl)
}
\arguments{
\item{character... |
#Plotting
#Plotting the tidy data
#Scatter plot 1
ggplot(Meat_tidy, aes(x = Fatty_Acid, y = Concentration, colour = Year)) +
geom_point(size = 3, alpha = 0.2) +
scale_y_log10() +
labs(x = "Fatty Acid", y = "Concentration") +
theme(axis.title.y = element_text(size = rel(1.6), angle = 90)) +
theme(axis.title.x... | /Plotting.R | no_license | jaredraynes/Version_Control_Meat | R | false | false | 2,805 | r | #Plotting
#Plotting the tidy data
#Scatter plot 1
ggplot(Meat_tidy, aes(x = Fatty_Acid, y = Concentration, colour = Year)) +
geom_point(size = 3, alpha = 0.2) +
scale_y_log10() +
labs(x = "Fatty Acid", y = "Concentration") +
theme(axis.title.y = element_text(size = rel(1.6), angle = 90)) +
theme(axis.title.x... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spotifyrLite-package.R
\docType{package}
\name{spotifyrLite-package}
\alias{spotifyrLite}
\alias{spotifyrLite-package}
\title{A lightweight R wrapper to access Spotify API}
\description{
This package allows you to make requests to Spotify Web... | /man/spotifyrLite-package.Rd | no_license | Giant316/spotifyLite | R | false | true | 995 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spotifyrLite-package.R
\docType{package}
\name{spotifyrLite-package}
\alias{spotifyrLite}
\alias{spotifyrLite-package}
\title{A lightweight R wrapper to access Spotify API}
\description{
This package allows you to make requests to Spotify Web... |
library(tidyverse)
library(nlme)
library(ggplot2)
#library(tidyverse)
efw<-read.csv("/Users/jing/Desktop/2020 winter/Stat 275/FEV.csv",sep=',',header=T)
attach(efw)
length(unique(fev$subid)) # 100 subjects
# How many measurements per patient?
sort(tapply(efw$EFW, efw$subid, length))
n.obs<-unlist(lapply(split(efw$sub... | /fev.R | no_license | lorraien/data-analysis | R | false | false | 11,606 | r | library(tidyverse)
library(nlme)
library(ggplot2)
#library(tidyverse)
efw<-read.csv("/Users/jing/Desktop/2020 winter/Stat 275/FEV.csv",sep=',',header=T)
attach(efw)
length(unique(fev$subid)) # 100 subjects
# How many measurements per patient?
sort(tapply(efw$EFW, efw$subid, length))
n.obs<-unlist(lapply(split(efw$sub... |
\alias{gtkProgressSetFormatString}
\name{gtkProgressSetFormatString}
\title{gtkProgressSetFormatString}
\description{
Sets a format string used to display text indicating the
current progress. The string can contain the following substitution characters:
\itemize{
\item \%v - the current progress value.
\item \%l - th... | /RGtk2/man/gtkProgressSetFormatString.Rd | no_license | lawremi/RGtk2 | R | false | false | 873 | rd | \alias{gtkProgressSetFormatString}
\name{gtkProgressSetFormatString}
\title{gtkProgressSetFormatString}
\description{
Sets a format string used to display text indicating the
current progress. The string can contain the following substitution characters:
\itemize{
\item \%v - the current progress value.
\item \%l - th... |
library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/pleura.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.5,family="gaussian",standardize=TRUE)
sink('./Model/EN/ReliefF/pleura/pleura_059.txt',append=TRUE... | /Model/EN/ReliefF/pleura/pleura_059.R | no_license | leon1003/QSMART | R | false | false | 351 | r | library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/pleura.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.5,family="gaussian",standardize=TRUE)
sink('./Model/EN/ReliefF/pleura/pleura_059.txt',append=TRUE... |
context("get_data_frame")
test_that(
"Export of MNE-objects is equivalent in R and Python", {
# get MNE data
fname <- paste(
mne$datasets$testing$data_path(),
"MEG",
"sample",
"sample_audvis_trunc_raw.fif",
sep = "/")
raw <- mne$io$read_raw_fif(fname)
events <- mne$find_events(raw)
st... | /tests/testthat/test-get-data-frame.R | no_license | SophieHerbst/mne-r | R | false | false | 1,118 | r | context("get_data_frame")
test_that(
"Export of MNE-objects is equivalent in R and Python", {
# get MNE data
fname <- paste(
mne$datasets$testing$data_path(),
"MEG",
"sample",
"sample_audvis_trunc_raw.fif",
sep = "/")
raw <- mne$io$read_raw_fif(fname)
events <- mne$find_events(raw)
st... |
<<<<<<< HEAD
packages <- c("jsonlite", "dplyr", "purrr")
purrr::walk(packages, library, character.only = TRUE, warn.conflicts = FALSE)
train.data <- fromJSON("input/train.json")
vars <- setdiff(names(train.data), c("photos", "features"))
train.data <- map_at(train.data, vars, unlist) %>% tibble::as_tibble(.)
head(t... | /Kaggle_2sigma/analysis.R | permissive | vvrsk/Kaggle-Projects | R | false | false | 19,176 | r | <<<<<<< HEAD
packages <- c("jsonlite", "dplyr", "purrr")
purrr::walk(packages, library, character.only = TRUE, warn.conflicts = FALSE)
train.data <- fromJSON("input/train.json")
vars <- setdiff(names(train.data), c("photos", "features"))
train.data <- map_at(train.data, vars, unlist) %>% tibble::as_tibble(.)
head(t... |
## Caching the inverse of the matrix
## makeCacheMatrix creates matrix that actually is a list of functions that
## set the value of the matrix
## get the value of the matrix
## set the value of the inverse matrix
## get the value of the inverse matrix
makeCacheMatrix <- function(x = matrix())
{
inv <- NULL
set ... | /cachematrix.R | no_license | nooelia/ProgrammingAssignment2 | R | false | false | 1,092 | r | ## Caching the inverse of the matrix
## makeCacheMatrix creates matrix that actually is a list of functions that
## set the value of the matrix
## get the value of the matrix
## set the value of the inverse matrix
## get the value of the inverse matrix
makeCacheMatrix <- function(x = matrix())
{
inv <- NULL
set ... |
# Producing marker plots:
#' Prepares the data for plotting marker genes
#'
#' This function calculates the cluster-specific average gene expressions and the percentage of zeros in each cluster. Prepares the data for plotting
#'@param gene_cell_matrix This is the pre-processed gene expression matrix (normalized... | /scAIDE/R/plotting_functions.R | no_license | tinglabs/scAIDE | R | false | false | 7,142 | r | # Producing marker plots:
#' Prepares the data for plotting marker genes
#'
#' This function calculates the cluster-specific average gene expressions and the percentage of zeros in each cluster. Prepares the data for plotting
#'@param gene_cell_matrix This is the pre-processed gene expression matrix (normalized... |
library(data.table)
library(tidyverse)
library(scales)
library(extrafont)
setwd("/Volumes/Macintosh HD/Users/au460892/Desktop/R-projects/DDR_project_Jan_2021/")
data = fread("Data/LOF_all.tsv")
all_samples = fread("Data/all_donors.tsv")
features = fread("Data/COMBINED_featureCounts.tsv")
colnames(features) = str_repla... | /Code/Old/Figures/Fig2-4/Old/Vignettes/ATRX/ATRX_new.R | no_license | SimonGrund/DDR_Predict | R | false | false | 10,607 | r | library(data.table)
library(tidyverse)
library(scales)
library(extrafont)
setwd("/Volumes/Macintosh HD/Users/au460892/Desktop/R-projects/DDR_project_Jan_2021/")
data = fread("Data/LOF_all.tsv")
all_samples = fread("Data/all_donors.tsv")
features = fread("Data/COMBINED_featureCounts.tsv")
colnames(features) = str_repla... |
library(soilDB)
library(aqp)#load before dplr
library(stringr)
library(BiodiversityR)
library(cluster)
library(ape)
library(dendextend)
library(dplyr)
library(dynamicTreeCut)
library(rpart)
library(rpart.plot)
library(goeveg)
library(proxy)
library(foreign)
library(isopam)
#----
NASISPEDONS <- readRDS("data/NASISPEDO... | /match_pedo_site_stratumclusteranalysis.R | no_license | phytoclast/match_pedon_site | R | false | false | 16,343 | r | library(soilDB)
library(aqp)#load before dplr
library(stringr)
library(BiodiversityR)
library(cluster)
library(ape)
library(dendextend)
library(dplyr)
library(dynamicTreeCut)
library(rpart)
library(rpart.plot)
library(goeveg)
library(proxy)
library(foreign)
library(isopam)
#----
NASISPEDONS <- readRDS("data/NASISPEDO... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hcrSBTP.R
\docType{methods}
\name{hcrSBTP}
\alias{hcrSBTP}
\title{hcrSBTP}
\usage{
hcrSBTP(yrs, control, ref, target, cpue, catch, wt = 0.5)
}
\arguments{
\item{yrs}{blah,blah,blah,...}
\item{control}{blah,blah,blah,...}
\item{ref}{blah,bla... | /man/hcrSBTP.Rd | no_license | flr/mydas | R | false | true | 591 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hcrSBTP.R
\docType{methods}
\name{hcrSBTP}
\alias{hcrSBTP}
\title{hcrSBTP}
\usage{
hcrSBTP(yrs, control, ref, target, cpue, catch, wt = 0.5)
}
\arguments{
\item{yrs}{blah,blah,blah,...}
\item{control}{blah,blah,blah,...}
\item{ref}{blah,bla... |
library(rsample)
library(testthat)
library(purrr)
library(tibble)
library(dplyr)
library(broom)
data("attrition", package = "modeldata")
context("Bootstrap intervals")
# ------------------------------------------------------------------------------
get_stats <- function(split, ...) {
dat <- analysis(split)
x <-... | /tests/testthat/test_bootci.R | no_license | kmdupr33/rsample | R | false | false | 6,407 | r | library(rsample)
library(testthat)
library(purrr)
library(tibble)
library(dplyr)
library(broom)
data("attrition", package = "modeldata")
context("Bootstrap intervals")
# ------------------------------------------------------------------------------
get_stats <- function(split, ...) {
dat <- analysis(split)
x <-... |
#Julian Ramirez-Villegas
#UoL / CCAFS / CIAT
#Apr 2014
stop("!")
###
#look at changes in niche size with dT and dP changes
###
#load packages
library(rgdal); library(raster); library(maptools); library(dismo); data(wrld_simpl)
#i/o directories and details
bDir <- "~/Leeds-work/scaling-effect"
clmDir <- paste(bDir,"/... | /scaling-effect/scripts/effect_niche_size-gnut.R | no_license | CIAT-DAPA/dapa-climate-change | R | false | false | 9,290 | r | #Julian Ramirez-Villegas
#UoL / CCAFS / CIAT
#Apr 2014
stop("!")
###
#look at changes in niche size with dT and dP changes
###
#load packages
library(rgdal); library(raster); library(maptools); library(dismo); data(wrld_simpl)
#i/o directories and details
bDir <- "~/Leeds-work/scaling-effect"
clmDir <- paste(bDir,"/... |
library(rsMove)
### Name: sMoveRes
### Title: sMoveRes
### Aliases: sMoveRes
### ** Examples
{
require(raster)
# read movement data
data(shortMove)
# test function for 5, 10 20 and 30 m
a.res <- sMoveRes(shortMove, c(5, 10, 20, 30))
}
| /data/genthat_extracted_code/rsMove/examples/sMoveRes.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 251 | r | library(rsMove)
### Name: sMoveRes
### Title: sMoveRes
### Aliases: sMoveRes
### ** Examples
{
require(raster)
# read movement data
data(shortMove)
# test function for 5, 10 20 and 30 m
a.res <- sMoveRes(shortMove, c(5, 10, 20, 30))
}
|
#******************************************************
#
# This is the main code of Project
#
#******************************************************
rm(list=ls())
# import self-designed function
setwd(".")
source("PCAplots.R")
source("TestSet.R")
source("SPM_Panel.R")
source("FactorPlots.R")
#******************... | /main.R | no_license | ShiminLei/Household-Assets-Analysis | R | false | false | 10,692 | r | #******************************************************
#
# This is the main code of Project
#
#******************************************************
rm(list=ls())
# import self-designed function
setwd(".")
source("PCAplots.R")
source("TestSet.R")
source("SPM_Panel.R")
source("FactorPlots.R")
#******************... |
#' Select NHDplus features via polygon or circular buffer of coordinate pair
#'
#' @export
#' @param lon numeric longitude. optional
#' @param lat numeric latitude. optional
#' @param poly sfc polygon. optional
#' @param dsn character data source
#' @param buffer_dist numeric buffer in units of coordinate degree... | /R/query.R | no_license | cran/nhdR | R | false | false | 11,683 | r | #' Select NHDplus features via polygon or circular buffer of coordinate pair
#'
#' @export
#' @param lon numeric longitude. optional
#' @param lat numeric latitude. optional
#' @param poly sfc polygon. optional
#' @param dsn character data source
#' @param buffer_dist numeric buffer in units of coordinate degree... |
#****************************************************************************************************************************************************1.2. Exp distribution
sidebarLayout(
sidebarPanel(
h4(tags$b("第1步 选择数据源")),
p("基于数学公式、模拟数据或用户数据"),
#Select Src
selectInput(
"InputSrc_e", "Select plot",... | /1_1MFScondist_cn/ui_E.R | permissive | ricciardi/mephas_web | R | false | false | 4,045 | r | #****************************************************************************************************************************************************1.2. Exp distribution
sidebarLayout(
sidebarPanel(
h4(tags$b("第1步 选择数据源")),
p("基于数学公式、模拟数据或用户数据"),
#Select Src
selectInput(
"InputSrc_e", "Select plot",... |
####################Wordcloud of part of the twitter#######################
library(dplyr)
library(tidyr)
library(wordcloud2)
library(SnowballC)
library(tm)
#twitDB_partial <- read.csv("~/twitDB_partial.csv", header=FALSE, comment.char="#")
#twit_par <- separate(twitDB_partial, "V4", into=c("delete","test"), sep=":"... | /Project4-Capstone/cryptocurrs/ran/wordcloud_casestudy.R | no_license | liyuhaojohn/bootcamp009_project | R | false | false | 2,665 | r | ####################Wordcloud of part of the twitter#######################
library(dplyr)
library(tidyr)
library(wordcloud2)
library(SnowballC)
library(tm)
#twitDB_partial <- read.csv("~/twitDB_partial.csv", header=FALSE, comment.char="#")
#twit_par <- separate(twitDB_partial, "V4", into=c("delete","test"), sep=":"... |
source("https://bioconductor.org/biocLite.R")
biocLite("ShortRead")
library(ShortRead)
rm(list=ls())
#Strain - KD263
#Biological replicate 2 - for this replicate 1x150 single-end sequencing was performed
###This is how this library is supposed to appear (N - N11 and N9 unique molecular identifiers... | /FragSeq/I-E/FragSeq_KD263_rep2.R | permissive | AnnaBioLogic/Shiriaeva_et_al_2019 | R | false | false | 19,095 | r | source("https://bioconductor.org/biocLite.R")
biocLite("ShortRead")
library(ShortRead)
rm(list=ls())
#Strain - KD263
#Biological replicate 2 - for this replicate 1x150 single-end sequencing was performed
###This is how this library is supposed to appear (N - N11 and N9 unique molecular identifiers... |
\name{randomcc}
\alias{randomcc}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Random selection of core collections
}
\description{
This function developing core collection use random sampling methods.
}
\usage{
randomcc(x, fraction = 0.1)
}
%- maybe also 'usage' for other objects ... | /man/randomcc.Rd | no_license | cran/ccChooser | R | false | false | 1,021 | rd | \name{randomcc}
\alias{randomcc}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Random selection of core collections
}
\description{
This function developing core collection use random sampling methods.
}
\usage{
randomcc(x, fraction = 0.1)
}
%- maybe also 'usage' for other objects ... |
source(simp$simpDefinition)
simp$sim$folder <- "setC"
setwd(paste(simp$dirs$simp, simp$sim$folder, sep="/"))
source(paste(simp$dirs$simp, simp$sim$folder, "simp.R", sep="/"))
simp$sim$id <- "4-1"
input_tools_load(simp, "dataActions")
# plot distribution of score
d <- dataActions[grepl("AdoptOF",as.character... | /config/R/setC/report/action/actionInpection_setC_4-1.R | no_license | CRAFTY-ABM/CRAFTY_CoBRA_Demo | R | false | false | 2,970 | r | source(simp$simpDefinition)
simp$sim$folder <- "setC"
setwd(paste(simp$dirs$simp, simp$sim$folder, sep="/"))
source(paste(simp$dirs$simp, simp$sim$folder, "simp.R", sep="/"))
simp$sim$id <- "4-1"
input_tools_load(simp, "dataActions")
# plot distribution of score
d <- dataActions[grepl("AdoptOF",as.character... |
#' Remove (r,c) pairs without ancestors/descendants, and impose basal dominance
#' @export
#' @param rc_table see \code{\link{make_rc_table}}
#' @param rc_relations see \code{\link{get_rc_relations}}
#' @param rowDescendants List of descendants made from \code{edge_registry}. Element \code{i} contains all edges descend... | /R/simplify_rc_table.R | no_license | reptalex/dendromap | R | false | false | 1,058 | r | #' Remove (r,c) pairs without ancestors/descendants, and impose basal dominance
#' @export
#' @param rc_table see \code{\link{make_rc_table}}
#' @param rc_relations see \code{\link{get_rc_relations}}
#' @param rowDescendants List of descendants made from \code{edge_registry}. Element \code{i} contains all edges descend... |
#library(data.table)
#
setClass('ContrastZZ', contains = 'Contrasts')
setMethod("initialize",'ContrastZZ', function(.Object)
{
.Object@ParameterNames =c('Parameter1','Parameter2')
.Object@SelectedCharacteristics = c('Parameter1','Parameter2')
.Object@Header = new('Contrasts')@Header
.Object@Selected = new('Cont... | /Historical Examples/Predefined Contrasts/Predefined_Contrasts/ContrastZZ.R | no_license | tdebusschere/VisualizationProjects | R | false | false | 3,267 | r | #library(data.table)
#
setClass('ContrastZZ', contains = 'Contrasts')
setMethod("initialize",'ContrastZZ', function(.Object)
{
.Object@ParameterNames =c('Parameter1','Parameter2')
.Object@SelectedCharacteristics = c('Parameter1','Parameter2')
.Object@Header = new('Contrasts')@Header
.Object@Selected = new('Cont... |
' Selection of covariates with given excluded covariates, called in f3st.R
#'
#' @param y Dependent variable.
#' @param x Covariates.
#' @param covch Sum of squared residuals and selected covariates
#' @param ind The excluded covariates
#' @param m Number of iterations
#' @param kexmx The maximum number of covariates ... | /R/f3sti.R | no_license | cran/gausscov | R | false | false | 2,549 | r | ' Selection of covariates with given excluded covariates, called in f3st.R
#'
#' @param y Dependent variable.
#' @param x Covariates.
#' @param covch Sum of squared residuals and selected covariates
#' @param ind The excluded covariates
#' @param m Number of iterations
#' @param kexmx The maximum number of covariates ... |
# install.packages('qualtRics')
library(qualtRics)
library(blastula)
# Do we need an auto script to generate an email for every respondent??
# Maybe add a question at the end asking if they want a copy of the report in the email?
##### Run this chunk to retrieve the latest survey response #####
# To run this chunk, h... | /Survey/Qualtrics.R | no_license | anitazoechang/BEEF2021 | R | false | false | 1,476 | r | # install.packages('qualtRics')
library(qualtRics)
library(blastula)
# Do we need an auto script to generate an email for every respondent??
# Maybe add a question at the end asking if they want a copy of the report in the email?
##### Run this chunk to retrieve the latest survey response #####
# To run this chunk, h... |
## Code in R, for the Addendum of [Shapley Values: Better than Counterfactuals](https://forum.effectivealtruism.org/posts/XHZJ9i7QBtAJZ6byW/shapley-values-better-than-counterfactuals)
```
AMV <-function(foundations, roomforfoundingfoundations, roomforfoundingOP, projects, numprojects){
avm = ValueOfFunded((foundati... | /ea/ShapleyValueCode.R | no_license | NunoSempere/nunosempere.github.io | R | false | false | 2,804 | r | ## Code in R, for the Addendum of [Shapley Values: Better than Counterfactuals](https://forum.effectivealtruism.org/posts/XHZJ9i7QBtAJZ6byW/shapley-values-better-than-counterfactuals)
```
AMV <-function(foundations, roomforfoundingfoundations, roomforfoundingOP, projects, numprojects){
avm = ValueOfFunded((foundati... |
# Prediction model:
data.obj <- read.csv("ucsbdata_demo.csv") # read the data file
data.obj$Index <- as.Date(data.obj$Index) # change the data type of Index to date
train <- as.numeric(format(data.obj$Index, "%Y")) %in% c(2009:2018) # select years from 2009 to 2018
lm.obj <- lm(R ~ CLOSE, data=data.obj[train, ])... | /Video_Demo/demo_server.R | permissive | luhan68/ERP_contest_website | R | false | false | 739 | r | # Prediction model:
data.obj <- read.csv("ucsbdata_demo.csv") # read the data file
data.obj$Index <- as.Date(data.obj$Index) # change the data type of Index to date
train <- as.numeric(format(data.obj$Index, "%Y")) %in% c(2009:2018) # select years from 2009 to 2018
lm.obj <- lm(R ~ CLOSE, data=data.obj[train, ])... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/makePopdf.R
\name{makePopdf}
\alias{makePopdf}
\title{Create a popDF object}
\usage{
makePopdf(l, system = c("geo", "cell")[1])
}
\arguments{
\item{l}{the landscape object used in the forward demographic simulation}
\item{system}{specifies t... | /man/makePopdf.Rd | no_license | stranda/holoSimCell | R | false | true | 3,195 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/makePopdf.R
\name{makePopdf}
\alias{makePopdf}
\title{Create a popDF object}
\usage{
makePopdf(l, system = c("geo", "cell")[1])
}
\arguments{
\item{l}{the landscape object used in the forward demographic simulation}
\item{system}{specifies t... |
##########################
##########################
##make pems
##########################
##########################
#kr
#description
##########################
#functions for making pems object
#includes
##########################
#pems (nee makePEMS)
#is.pems (nee isPEMS)
#pems.element (nee m... | /pems.utils/R/make.pems.R | no_license | ingted/R-Examples | R | false | false | 4,713 | r | ##########################
##########################
##make pems
##########################
##########################
#kr
#description
##########################
#functions for making pems object
#includes
##########################
#pems (nee makePEMS)
#is.pems (nee isPEMS)
#pems.element (nee m... |
#' Clean taxonomic names
#'
#' A utility to sanitize taxonomic names to increase probability of resolving names.
#'
#' @param names a character vector of taxonomic names (usually species names)
#' @param fix_delim Should we replace separators `.`, `_`, `-`
#' with spaces? e.g. 'Homo.sapiens' becomes 'Homo sapiens'.
#' ... | /R/clean_names.R | permissive | ldecicco-USGS/taxadb | R | false | false | 2,907 | r | #' Clean taxonomic names
#'
#' A utility to sanitize taxonomic names to increase probability of resolving names.
#'
#' @param names a character vector of taxonomic names (usually species names)
#' @param fix_delim Should we replace separators `.`, `_`, `-`
#' with spaces? e.g. 'Homo.sapiens' becomes 'Homo sapiens'.
#' ... |
#' Summary statistics table
#'
#' This function summarizes the mean, median and standard deviation of the different
#'levels of a factor for a given data set. NAs in the data are not removed by default
#'but you can change this.
#'
#' @params data is the data set that holds the factor of interest.
#' @params x the fac... | /R/summarystat.R | permissive | stat545ubc-2021/summarystats | R | false | false | 1,208 | r |
#' Summary statistics table
#'
#' This function summarizes the mean, median and standard deviation of the different
#'levels of a factor for a given data set. NAs in the data are not removed by default
#'but you can change this.
#'
#' @params data is the data set that holds the factor of interest.
#' @params x the fac... |
\name{filltemplate}
\alias{filltemplate}
\title{filltemplate}
\description{Fill in occurances of OBJ$item in the file \code{template} with the value
in R of L$item.}
\usage{filltemplate(L, template)}
\arguments{
\item{L}{
}
\item{template}{
}
}
\author{Toby Dylan Hocking}
| /man/filltemplate.Rd | no_license | tdhock/directlabels | R | false | false | 285 | rd | \name{filltemplate}
\alias{filltemplate}
\title{filltemplate}
\description{Fill in occurances of OBJ$item in the file \code{template} with the value
in R of L$item.}
\usage{filltemplate(L, template)}
\arguments{
\item{L}{
}
\item{template}{
}
}
\author{Toby Dylan Hocking}
|
rm(list=ls())
library(tidyverse)
library(SbcRepTables)
library(parallel)
surveys <- read_rds("./data/surveys.rds")
surveys_mtd <- read_rds("./data/surveys_mtd.rds")
column_groups <- c("ciudad", "cadena","genero", "nse", "actividad")
# Create list of data frames
data_df <-
surveys %>%
sbc_report_list( surveys... | /dbook_test.R | no_license | mygeorgyboy/SbcRepTables | R | false | false | 635 | r | rm(list=ls())
library(tidyverse)
library(SbcRepTables)
library(parallel)
surveys <- read_rds("./data/surveys.rds")
surveys_mtd <- read_rds("./data/surveys_mtd.rds")
column_groups <- c("ciudad", "cadena","genero", "nse", "actividad")
# Create list of data frames
data_df <-
surveys %>%
sbc_report_list( surveys... |
complete <- function(directory, id = 1:332) {
setwd("C:/Users/floriano.peixoto/Documents/Hospital/Air Pollution")
setwd(directory)
files <- list.files(path =getwd() )
data <- NULL
for(i in id){
fileData <- read.csv(files[i], stringsAsFactors = FALSE)
if(is.null(data)){
data <- data.fram... | /complete.R | no_license | victorinno/Polluant-Air | R | false | false | 570 | r | complete <- function(directory, id = 1:332) {
setwd("C:/Users/floriano.peixoto/Documents/Hospital/Air Pollution")
setwd(directory)
files <- list.files(path =getwd() )
data <- NULL
for(i in id){
fileData <- read.csv(files[i], stringsAsFactors = FALSE)
if(is.null(data)){
data <- data.fram... |
poorOutorEx = function(dat, vars, ros, ord=TRUE){
require(dplyr)
datReduced = select(dat, one_of(vars))
if(ros == 0)
likOrd = lapply(datReduced, function(x)
factor(x,
levels = c(1,2,3,4),
labels = c("Poor", "Good",
"Very good", "Outstanding"),
... | /R/poorOutorEx.R | no_license | saberry/lkrt | R | false | false | 669 | r | poorOutorEx = function(dat, vars, ros, ord=TRUE){
require(dplyr)
datReduced = select(dat, one_of(vars))
if(ros == 0)
likOrd = lapply(datReduced, function(x)
factor(x,
levels = c(1,2,3,4),
labels = c("Poor", "Good",
"Very good", "Outstanding"),
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shapefile_utils.R
\name{line_explode}
\alias{line_explode}
\title{Convert single polyline into multipolyline segments, based on vertices
Or "explode" the line, as it is commonly referred to in GIS programs}
\usage{
line_explode(polyline)
}
\a... | /man/line_explode.Rd | permissive | scantle/pbjr | R | false | true | 875 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shapefile_utils.R
\name{line_explode}
\alias{line_explode}
\title{Convert single polyline into multipolyline segments, based on vertices
Or "explode" the line, as it is commonly referred to in GIS programs}
\usage{
line_explode(polyline)
}
\a... |
find_area_threshold_OCN <- function(OCN,
thrValues=seq(OCN$cellsize^2,min(OCN$CM$A),OCN$cellsize^2),
maxReachLength=Inf,
streamOrderType="Strahler",
displayUpdates=0){
... | /R/find_area_threshold_OCN.R | no_license | lucarraro/OCNet | R | false | false | 8,977 | r |
find_area_threshold_OCN <- function(OCN,
thrValues=seq(OCN$cellsize^2,min(OCN$CM$A),OCN$cellsize^2),
maxReachLength=Inf,
streamOrderType="Strahler",
displayUpdates=0){
... |
\name{MCECMupdate}
\alias{MCECMupdate}
\title{
MCECM Update Step for Generalized Hyperbolic
}
\description{
updates estimates of mixing parameters in EM estimation of
generalized hyperbolic
}
\usage{
MCECMupdate(data, mix.pars, mu, Sigma, gamma, optpars, optfunc, xieval=FALSE)
}
\arguments{
\item{data... | /man/MCECMUpdate.Rd | no_license | cran/QRMlib | R | false | false | 991 | rd | \name{MCECMupdate}
\alias{MCECMupdate}
\title{
MCECM Update Step for Generalized Hyperbolic
}
\description{
updates estimates of mixing parameters in EM estimation of
generalized hyperbolic
}
\usage{
MCECMupdate(data, mix.pars, mu, Sigma, gamma, optpars, optfunc, xieval=FALSE)
}
\arguments{
\item{data... |
allPSI_events=paste(EVO_IMMUNO_POP,'/Maxime/Splicing/MISO/aggregated/Ens70_HISAT/PSI_events_ALL_V7.2_withCounts.Rdata',sep='')
Adjusted_PSI_values=sprintf('%s/03_Analysis/Splicing/Papier_Splicing/V5/data/AdjustmentResults/PSI_adjust_all_16173_V5.Rdata',HOME)
library(data.table)
library(GenomicRanges)
# allGOterms
al... | /04_spliceQTLs/02_overlap_sQTL_eQTL.R | permissive | mrotival/EvoImmunoPop_Splicing | R | false | false | 9,655 | r |
allPSI_events=paste(EVO_IMMUNO_POP,'/Maxime/Splicing/MISO/aggregated/Ens70_HISAT/PSI_events_ALL_V7.2_withCounts.Rdata',sep='')
Adjusted_PSI_values=sprintf('%s/03_Analysis/Splicing/Papier_Splicing/V5/data/AdjustmentResults/PSI_adjust_all_16173_V5.Rdata',HOME)
library(data.table)
library(GenomicRanges)
# allGOterms
al... |
##' @name site.lst
##' @title site.lst
##' @export
##' @param site.id
##' @param con
##' @author Betsy Cowdery
site.lst <- function(site.id,con){
site <- db.query(paste("SELECT * from SITES where id =", site.id),con)
if ("local_time" %in% names(site) && is.na(site[["local_time"]])==FALSE){
lst <- site$lo... | /modules/data.atmosphere/R/site.lst.R | permissive | davidjpmoore/pecan | R | false | false | 625 | r | ##' @name site.lst
##' @title site.lst
##' @export
##' @param site.id
##' @param con
##' @author Betsy Cowdery
site.lst <- function(site.id,con){
site <- db.query(paste("SELECT * from SITES where id =", site.id),con)
if ("local_time" %in% names(site) && is.na(site[["local_time"]])==FALSE){
lst <- site$lo... |
setwd("C:/Users/Marcelo/Desktop/DsStudy/House Prices")
# Loading data
train <- read.csv("train.csv", stringsAsFactors=FALSE)
test <- read.csv("test.csv", stringsAsFactors=FALSE)
SalePrice <- train$SalePrice
train$SalePrice <- NULL
# Combining data sets
full_data <- rbind(train, test)
#Removing missing NA values
for... | /House Prices/house_prices_1.R | no_license | marcelomedre/dsstudy | R | false | false | 4,974 | r | setwd("C:/Users/Marcelo/Desktop/DsStudy/House Prices")
# Loading data
train <- read.csv("train.csv", stringsAsFactors=FALSE)
test <- read.csv("test.csv", stringsAsFactors=FALSE)
SalePrice <- train$SalePrice
train$SalePrice <- NULL
# Combining data sets
full_data <- rbind(train, test)
#Removing missing NA values
for... |
#' Copy example OM XL and OM Documentation
#'
#' @param dir the file path to copy the files to.
#' @export
#'
#' @examples
#' \dontrun{
#' OMexample()
#' }
OMexample <- function(dir=getwd()) {
fromRMD <- system.file("Example_Chile_Hake.Rmd", package="DLMtool")
tt <- file.copy(fromRMD, dir, overwrite = TRUE)
fro... | /R/OM_init_doc.R | no_license | nrdc/DLMtool | R | false | false | 74,708 | r | #' Copy example OM XL and OM Documentation
#'
#' @param dir the file path to copy the files to.
#' @export
#'
#' @examples
#' \dontrun{
#' OMexample()
#' }
OMexample <- function(dir=getwd()) {
fromRMD <- system.file("Example_Chile_Hake.Rmd", package="DLMtool")
tt <- file.copy(fromRMD, dir, overwrite = TRUE)
fro... |
testlist <- list(A = structure(c(9.95333163085509e-316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), left = 0L, right = 0L, x = numeric(0))
result <- do.call(mgss:::MVP_normalfactor_rcpp,testlist)
str(result) | /mgss/inst/testfiles/MVP_normalfactor_rcpp/AFL_MVP_normalfactor_rcpp/MVP_normalfactor_rcpp_valgrind_files/1615952126-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 292 | r | testlist <- list(A = structure(c(9.95333163085509e-316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), left = 0L, right = 0L, x = numeric(0))
result <- do.call(mgss:::MVP_normalfactor_rcpp,testlist)
str(result) |
#' @name mgamma
#'
#' @title Mixture of Gammas Distribution
#'
#' @description Density, cumulative distribution function, quantile function and
#' random number generation for the mixture of gammas distribution. The parameters
#' are the multiple gamma shapes \code{mgshape} scales \code{mgscale} and weights \code{... | /A_github/sources/authors/3048/evmix/dmgamma.r | no_license | Irbis3/crantasticScrapper | R | false | false | 18,459 | r | #' @name mgamma
#'
#' @title Mixture of Gammas Distribution
#'
#' @description Density, cumulative distribution function, quantile function and
#' random number generation for the mixture of gammas distribution. The parameters
#' are the multiple gamma shapes \code{mgshape} scales \code{mgscale} and weights \code{... |
n = 100
test_df = data.frame(col1 = sample(state.abb,n,TRUE),
col2 = sample(1:10,n,TRUE),
col3 = runif(n),
col4 = complex(n,runif(n),runif(n)),
col5 = charToRaw(paste(sample(letters,n,TRUE),collapse="")),
col6 = run... | /tests/tests/test-dstrsplit.R | no_license | s-u/iotools | R | false | false | 2,164 | r | n = 100
test_df = data.frame(col1 = sample(state.abb,n,TRUE),
col2 = sample(1:10,n,TRUE),
col3 = runif(n),
col4 = complex(n,runif(n),runif(n)),
col5 = charToRaw(paste(sample(letters,n,TRUE),collapse="")),
col6 = run... |
\name{multcap-class}
\Rdversion{1.1}
\docType{class}
\alias{multcap-class}
\title{Class \code{"multcap"} in Package \pkg{HandTill2001} }
\description{
S4 class for a multiple class response and corresponding (predicted) probabilities.
}
\section{Objects from the Class}{
Objects can be created by calls of the form \code... | /man/multcap-class.Rd | no_license | nkola123/kola | R | false | false | 1,361 | rd | \name{multcap-class}
\Rdversion{1.1}
\docType{class}
\alias{multcap-class}
\title{Class \code{"multcap"} in Package \pkg{HandTill2001} }
\description{
S4 class for a multiple class response and corresponding (predicted) probabilities.
}
\section{Objects from the Class}{
Objects can be created by calls of the form \code... |
#' Coordinates of houses in Groningen
#'
#' A dataset of postal codes and the corresponding spatial locations in terms of a latitude and a longitude.
#'
#' @format A data frame with 25000 rows and 8 variables:
#' \describe{
#' \item{street}{Name of street}
#' \item{number}{Number of house}
#' \item{letter}{Letter... | /R/Groningen.R | no_license | MHaringa/spatialrisk | R | false | false | 700 | r | #' Coordinates of houses in Groningen
#'
#' A dataset of postal codes and the corresponding spatial locations in terms of a latitude and a longitude.
#'
#' @format A data frame with 25000 rows and 8 variables:
#' \describe{
#' \item{street}{Name of street}
#' \item{number}{Number of house}
#' \item{letter}{Letter... |
##########
#From March 2017 Google+ post (https://plus.google.com/+AppliedDemographyToolbox/posts/TPFmUnch3tQ)
#Eddie Hunsinger, December 2018
#http://www.demog.berkeley.edu/~eddieh/
##########
#Demographers are sometimes asked what-to-expect for population next year, and total population (rather than births or... | /NextYearPop.R | no_license | edyhsgr/Hunsinger_NextYearPop | R | false | false | 2,578 | r | ##########
#From March 2017 Google+ post (https://plus.google.com/+AppliedDemographyToolbox/posts/TPFmUnch3tQ)
#Eddie Hunsinger, December 2018
#http://www.demog.berkeley.edu/~eddieh/
##########
#Demographers are sometimes asked what-to-expect for population next year, and total population (rather than births or... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/linalg.R
\name{rowMin}
\alias{rowMin}
\title{Row minimum}
\usage{
rowMin(M)
}
\arguments{
\item{M}{matrix}
}
\value{
a vector of column maxima
}
\description{
Row minimum
}
| /man/rowMin.Rd | no_license | wangtengyao/putils | R | false | true | 251 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/linalg.R
\name{rowMin}
\alias{rowMin}
\title{Row minimum}
\usage{
rowMin(M)
}
\arguments{
\item{M}{matrix}
}
\value{
a vector of column maxima
}
\description{
Row minimum
}
|
#Julian Ramirez-Villegas
#UoL / CCAFS / CIAT
#July 2015
stop("!")
#baseline and future yields, yield s.d., and yield c.v.
#load libraries
library(sp); library(maptools); library(raster); library(rgeos); library(rasterVis)
data(wrld_simpl)
#library(ggplot2); library(grid); library(gridExtra)
#source code directory
sr... | /rice-future-tpe/figures/Fig3.R | no_license | cbchisanga/dapa-climate-change | R | false | false | 11,495 | r | #Julian Ramirez-Villegas
#UoL / CCAFS / CIAT
#July 2015
stop("!")
#baseline and future yields, yield s.d., and yield c.v.
#load libraries
library(sp); library(maptools); library(raster); library(rgeos); library(rasterVis)
data(wrld_simpl)
#library(ggplot2); library(grid); library(gridExtra)
#source code directory
sr... |
library("testthat")
library("mcmcdb")
test_package("mcmcdb")
| /tests/test-all.R | no_license | jrnold/mcmcdb | R | false | false | 62 | r | library("testthat")
library("mcmcdb")
test_package("mcmcdb")
|
\name{getMirs_List_Mir}
\alias{getMirs_List_Mir}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{getMirs_List_Mir}
\description{Get a list of valid mir ids (this is just for the getMir functions--not for the mirRNASeq data.)}
\usage{
getMirs_List_Mir(theZipFile="/rsrch1/bcb/batcheffects/GENE_REPOR... | /man/getMirs_List_Mir.Rd | no_license | yanch86/TCGAGeneReport | R | false | false | 1,368 | rd | \name{getMirs_List_Mir}
\alias{getMirs_List_Mir}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{getMirs_List_Mir}
\description{Get a list of valid mir ids (this is just for the getMir functions--not for the mirRNASeq data.)}
\usage{
getMirs_List_Mir(theZipFile="/rsrch1/bcb/batcheffects/GENE_REPOR... |
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(8.5728629954997e-312, 9.53216075507622e+121, -2.02338701847276e-234, 5.62067438631181e-104, -5.83380746860426e+196, 8.84662638470377e-160, 2.30289211325377e+223, -1.0254047066007e-199, -1.06206148462608e-149, -3.23730472002932e+211, -6... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615848321-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 494 | r | testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(8.5728629954997e-312, 9.53216075507622e+121, -2.02338701847276e-234, 5.62067438631181e-104, -5.83380746860426e+196, 8.84662638470377e-160, 2.30289211325377e+223, -1.0254047066007e-199, -1.06206148462608e-149, -3.23730472002932e+211, -6... |
sclass <- read.csv("C:/Data Mining/ECO395M-master/data/sclass.csv")
View(sclass)
library(tidyverse)
library(FNN)
library(mosaic)
sclass350 = subset(sclass, trim == '350')
sclass65AMG = subset(sclass, trim == '65 AMG')
summary(sclass65AMG)
N350 = nrow(sclass350)
N350_train = floor(0.8*N350)
N350_test = N350 - N350_trai... | /Exercise 1/R Scripts/s350.R | no_license | eevans1/DataMining | R | false | false | 6,088 | r | sclass <- read.csv("C:/Data Mining/ECO395M-master/data/sclass.csv")
View(sclass)
library(tidyverse)
library(FNN)
library(mosaic)
sclass350 = subset(sclass, trim == '350')
sclass65AMG = subset(sclass, trim == '65 AMG')
summary(sclass65AMG)
N350 = nrow(sclass350)
N350_train = floor(0.8*N350)
N350_test = N350 - N350_trai... |
library("dplyr")
library("ggplot2")
################################################## X 4 Prior inference ##################################
# Import full csv table
setwd("~/Documents/GitHub/prior_inference/RSA_2019_08/X4_Plots")
full <- read.csv("for_scatterplots_updated.csv")
head(full)
## See what models we hav... | /RSA_2019_08/X4_Plots/plotting_for_paper.R | no_license | gscontras/prior_inference | R | false | false | 6,429 | r | library("dplyr")
library("ggplot2")
################################################## X 4 Prior inference ##################################
# Import full csv table
setwd("~/Documents/GitHub/prior_inference/RSA_2019_08/X4_Plots")
full <- read.csv("for_scatterplots_updated.csv")
head(full)
## See what models we hav... |
library(tidyverse)
library(synapser)
library(data.table)
library(magrittr)
source("../../scripts/utils.R")
synLogin()
expression_id <- "syn17014418"
ground_truth_id <- "syn17014449"
upload_id <- "syn17022196"
tempdir <- "/home/aelamb/tmp/tumor_deconvolution/dry_run_files/"
gt_df_long <- ground_truth_id %>%
cre... | /challenge/dry_run/create_dry_run_files.R | no_license | Sage-Bionetworks/Tumor-Deconvolution-Challenge | R | false | false | 1,914 | r | library(tidyverse)
library(synapser)
library(data.table)
library(magrittr)
source("../../scripts/utils.R")
synLogin()
expression_id <- "syn17014418"
ground_truth_id <- "syn17014449"
upload_id <- "syn17022196"
tempdir <- "/home/aelamb/tmp/tumor_deconvolution/dry_run_files/"
gt_df_long <- ground_truth_id %>%
cre... |
#Build data.frame of xml files
#param:
# path: targe files' directory absolute address
build_dataframe <- function(path) {
library(XML)
#convert vector to string, every item separate with '/'
#param:
# v : vector used for converting
#using for multi-classify saving
vector2string <- function(v) {
... | /preconditioning.R | no_license | WangQianEve/2017DataMiningProj1 | R | false | false | 7,884 | r | #Build data.frame of xml files
#param:
# path: targe files' directory absolute address
build_dataframe <- function(path) {
library(XML)
#convert vector to string, every item separate with '/'
#param:
# v : vector used for converting
#using for multi-classify saving
vector2string <- function(v) {
... |
# ensemble means
MILESDIR <- "/home/paolo/MiLES"
FILEDIR <- "/work/users/paolo/data"
TUNEDIR <- "/home/paolo/RScript/reforge/tune_gwd/aggressive_tuning"
source(file.path(MILESDIR, "script", "basis_functions.R"))
source(file.path(TUNEDIR, "..", "..", "reforge_help_functions.R"))
source(file.path(TUNEDIR, "aggressive_fun... | /new_fingerprint.R | permissive | oloapinivad/aperol | R | false | false | 50,328 | r | # ensemble means
MILESDIR <- "/home/paolo/MiLES"
FILEDIR <- "/work/users/paolo/data"
TUNEDIR <- "/home/paolo/RScript/reforge/tune_gwd/aggressive_tuning"
source(file.path(MILESDIR, "script", "basis_functions.R"))
source(file.path(TUNEDIR, "..", "..", "reforge_help_functions.R"))
source(file.path(TUNEDIR, "aggressive_fun... |
#' Simple Random Assignment
#'
#' simple_ra implements a random assignment procedure in which units are independently assigned to treatment conditions. Because units are assigned independently, the number of units that are assigned to each condition can vary from assignment to assignment. For most experimental applicat... | /R/simple_ra.R | no_license | lukesonnet/randomizr | R | false | false | 3,669 | r | #' Simple Random Assignment
#'
#' simple_ra implements a random assignment procedure in which units are independently assigned to treatment conditions. Because units are assigned independently, the number of units that are assigned to each condition can vary from assignment to assignment. For most experimental applicat... |
#
# Copyright 2007-2017 The OpenMx Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | /inst/models/passing/GeneralizedEstimatingEquations.R | no_license | ktargows/OpenMx | R | false | false | 9,984 | r | #
# Copyright 2007-2017 The OpenMx Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../h2o-runit.R')
test.rdocmean.golden <- function(H2Oserver) {
prosPath = system.file("extdata", "prostate.csv", package="h2o")
prostate.hex = h2o.importFile(H2Oserver, path = prosPath, key = "prostate.hex")
mean(prostate.hex$AGE)
testEn... | /h2o-r/tests/testdir_docexamples/runit_Rdoc_mean.R | permissive | JMR-b/h2o-dev | R | false | false | 371 | r | setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../h2o-runit.R')
test.rdocmean.golden <- function(H2Oserver) {
prosPath = system.file("extdata", "prostate.csv", package="h2o")
prostate.hex = h2o.importFile(H2Oserver, path = prosPath, key = "prostate.hex")
mean(prostate.hex$AGE)
testEn... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dfareporting_objects.R
\name{Rule}
\alias{Rule}
\title{Rule Object}
\usage{
Rule(assetId = NULL, name = NULL, targetingTemplateId = NULL)
}
\arguments{
\item{assetId}{A creativeAssets[]}
\item{name}{A user-friendly name for this rule}
\item... | /googledfareportingv26.auto/man/Rule.Rd | permissive | Phippsy/autoGoogleAPI | R | false | true | 620 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dfareporting_objects.R
\name{Rule}
\alias{Rule}
\title{Rule Object}
\usage{
Rule(assetId = NULL, name = NULL, targetingTemplateId = NULL)
}
\arguments{
\item{assetId}{A creativeAssets[]}
\item{name}{A user-friendly name for this rule}
\item... |
## DATA SCIENCE SPECIAIZATION
## R Programming: Week 3 Programming Assignment 2: Quiz
## This function creates a special "vector", which is a list containing a function that:
#1)Set the value of the matrix.
#2)Get the value of the matrix
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
... | /cachematrix.R | no_license | IvetteSuheid/ProgrammingAssignment2 | R | false | false | 994 | r | ## DATA SCIENCE SPECIAIZATION
## R Programming: Week 3 Programming Assignment 2: Quiz
## This function creates a special "vector", which is a list containing a function that:
#1)Set the value of the matrix.
#2)Get the value of the matrix
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{pt_set_h_v}
\alias{pt_set_h_v}
\title{Set of pivot tables on one sheet}
\format{
A \code{pivot_table} object.
}
\usage{
pt_set_h_v
}
\description{
Example of a set of pivot tables located horizontally and verticall... | /man/pt_set_h_v.Rd | no_license | cran/flattabler | R | false | true | 357 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{pt_set_h_v}
\alias{pt_set_h_v}
\title{Set of pivot tables on one sheet}
\format{
A \code{pivot_table} object.
}
\usage{
pt_set_h_v
}
\description{
Example of a set of pivot tables located horizontally and verticall... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_contribution.R
\name{plot_contribution}
\alias{plot_contribution}
\title{Plot signature contribution}
\usage{
plot_contribution(contribution, index = c(), coord_flip = F)
}
\arguments{
\item{index}{optional sample subset parameter}
\ite... | /man/plot_contribution.Rd | permissive | ainqurrat/MutationalPatterns | R | false | true | 483 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_contribution.R
\name{plot_contribution}
\alias{plot_contribution}
\title{Plot signature contribution}
\usage{
plot_contribution(contribution, index = c(), coord_flip = F)
}
\arguments{
\item{index}{optional sample subset parameter}
\ite... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.