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 |
|---|---|---|---|---|---|---|---|---|---|
testlist <- list(type = 0L, z = 4.93769206453742e-320)
result <- do.call(esreg::G1_fun,testlist)
str(result) | /esreg/inst/testfiles/G1_fun/libFuzzer_G1_fun/G1_fun_valgrind_files/1609892808-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 108 | r | testlist <- list(type = 0L, z = 4.93769206453742e-320)
result <- do.call(esreg::G1_fun,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate_stochastic.R
\name{simulate_stochastic}
\alias{simulate_stochastic}
\title{Stochastic simulation of an SEIR-type model}
\usage{
simulate_stochastic(S0 = 1000, I0 = 10, tmax = 100, bP = 0,
bI = 1/1000, gP = 0.5, gI = 0.5, w = 0, m =... | /man/simulate_stochastic.Rd | no_license | henok535/DSAIDE | R | false | true | 2,960 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate_stochastic.R
\name{simulate_stochastic}
\alias{simulate_stochastic}
\title{Stochastic simulation of an SEIR-type model}
\usage{
simulate_stochastic(S0 = 1000, I0 = 10, tmax = 100, bP = 0,
bI = 1/1000, gP = 0.5, gI = 0.5, w = 0, m =... |
setwd("~/Desktop/sfei")
load(file="perStation.Rda")
require(mgcv)
setwd("~/Desktop/sfei")
load(file="perStation.Rda")
require(mgcv)
### "parsimonious model"
### look promising
## doy
## date_dec
## pheo
## tn (monthly structure)
## do_per (check context of the "per")
### Add these for "full model"
### of interes... | /SFEI_chl/modelBuilding/perStationFullModels_plusSal.R | no_license | sastoudt/DS421_summerProject | R | false | false | 42,148 | r | setwd("~/Desktop/sfei")
load(file="perStation.Rda")
require(mgcv)
setwd("~/Desktop/sfei")
load(file="perStation.Rda")
require(mgcv)
### "parsimonious model"
### look promising
## doy
## date_dec
## pheo
## tn (monthly structure)
## do_per (check context of the "per")
### Add these for "full model"
### of interes... |
library(queueing)
### Name: Inputs.o_MMCKM
### Title: Returns the input parameters of a M/M/c/K/m queueing model
### Aliases: Inputs.o_MMCKM
### Keywords: M/M/c/K/m
### ** Examples
## create input parameters
i_mmckm <- NewInput.MMCKM(lambda=0.25, mu=4, c=2, k=4, m=8, method=0)
## Build the model
o_mmckm <- Queuein... | /data/genthat_extracted_code/queueing/examples/Inputs.o_MMCKM.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 378 | r | library(queueing)
### Name: Inputs.o_MMCKM
### Title: Returns the input parameters of a M/M/c/K/m queueing model
### Aliases: Inputs.o_MMCKM
### Keywords: M/M/c/K/m
### ** Examples
## create input parameters
i_mmckm <- NewInput.MMCKM(lambda=0.25, mu=4, c=2, k=4, m=8, method=0)
## Build the model
o_mmckm <- Queuein... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make_grid.R
\name{make_grid}
\alias{make_grid}
\title{Makes raster grid for aggregating trajecotries}
\usage{
make_grid(site_coords, grid_res, max_dist)
}
\arguments{
\item{site_coords}{vector of lon, lat}
\item{grid_res}{resolution of grid ... | /man/make_grid.Rd | permissive | halleybrantley/traxr | R | false | true | 438 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make_grid.R
\name{make_grid}
\alias{make_grid}
\title{Makes raster grid for aggregating trajecotries}
\usage{
make_grid(site_coords, grid_res, max_dist)
}
\arguments{
\item{site_coords}{vector of lon, lat}
\item{grid_res}{resolution of grid ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mktab_ChiSq_postHoc.R
\name{mktab_ChiSq_postHoc}
\alias{mktab_ChiSq_postHoc}
\title{Wrapper around tableone to print in RMD}
\usage{
mktab_ChiSq_postHoc(var, grp, varNm = "Var", file = "", notes = "",
size = "scriptsize", d = 3, control = "... | /man/mktab_ChiSq_postHoc.Rd | no_license | Oromendia/oromendia | R | false | true | 672 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mktab_ChiSq_postHoc.R
\name{mktab_ChiSq_postHoc}
\alias{mktab_ChiSq_postHoc}
\title{Wrapper around tableone to print in RMD}
\usage{
mktab_ChiSq_postHoc(var, grp, varNm = "Var", file = "", notes = "",
size = "scriptsize", d = 3, control = "... |
difLRT<-function (Data, group, focal.name, alpha = 0.05, purify = FALSE,
nrIter = 10, p.adjust.method=NULL,save.output = FALSE, output = c("out", "default"))
{
internalLRT <- function() {
if (length(group) == 1) {
if (is.numeric(group)) {
gr <- Data[, group]
... | /R/difLRT.r | no_license | cran/difR | R | false | false | 8,815 | r | difLRT<-function (Data, group, focal.name, alpha = 0.05, purify = FALSE,
nrIter = 10, p.adjust.method=NULL,save.output = FALSE, output = c("out", "default"))
{
internalLRT <- function() {
if (length(group) == 1) {
if (is.numeric(group)) {
gr <- Data[, group]
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/createMassBank.R
\name{gatherCompound}
\alias{gatherCompound}
\alias{gatherSpectrum}
\title{Compose data block of MassBank record}
\usage{
gatherCompound(spec, aggregated, additionalPeaks = NULL, retrieval="standard")
gatherSpectr... | /man/gatherCompound.Rd | no_license | drmaly/RMassBank | R | false | true | 2,782 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/createMassBank.R
\name{gatherCompound}
\alias{gatherCompound}
\alias{gatherSpectrum}
\title{Compose data block of MassBank record}
\usage{
gatherCompound(spec, aggregated, additionalPeaks = NULL, retrieval="standard")
gatherSpectr... |
discrep.factor <-
function(datavec, targetvec, weightvec) {
require(Hmisc)
dat <- sapply(names(targetvec), function(x) {
sum(weightvec[datavec == x & !is.na(datavec)])/sum(weightvec[!is.na(datavec)])
})
out <- targetvec - dat
out
}
| /anesrake/R/discrep.factor.R | no_license | ingted/R-Examples | R | false | false | 261 | r | discrep.factor <-
function(datavec, targetvec, weightvec) {
require(Hmisc)
dat <- sapply(names(targetvec), function(x) {
sum(weightvec[datavec == x & !is.na(datavec)])/sum(weightvec[!is.na(datavec)])
})
out <- targetvec - dat
out
}
|
## compare TF enrichment between patients and HD
source('scDataAnalysis_Utilities.R')
filterTFenrichByExpr <- function(tf.diff.res, expr.mtx,
frac.thr = 0.1){
cls = unique(tf.diff.res$cluster1)
res = NULL
for(cl0 in cls){
tf.diff.res0 = tf.diff.res[cluster1 == cl0]
frac... | /compTFenrich_18MLLr.R | no_license | wbaopaul/KMT2Ar_Paper | R | false | false | 65,911 | r | ## compare TF enrichment between patients and HD
source('scDataAnalysis_Utilities.R')
filterTFenrichByExpr <- function(tf.diff.res, expr.mtx,
frac.thr = 0.1){
cls = unique(tf.diff.res$cluster1)
res = NULL
for(cl0 in cls){
tf.diff.res0 = tf.diff.res[cluster1 == cl0]
frac... |
## read the data into a data frame from txt file
filename <- "./data/household_power_consumption.txt"
data <- read.csv(filename, sep = ";")
summary(data)
## subset the data frame to include only 2/1/07 and 2/2/07 records
data$dateTimeStr <- paste(as.character(data$daDate),as.character(data$Time),sep=" ")
data$DateTime ... | /plot1.R | no_license | leskin/ExData_Plotting1 | R | false | false | 1,556 | r | ## read the data into a data frame from txt file
filename <- "./data/household_power_consumption.txt"
data <- read.csv(filename, sep = ";")
summary(data)
## subset the data frame to include only 2/1/07 and 2/2/07 records
data$dateTimeStr <- paste(as.character(data$daDate),as.character(data$Time),sep=" ")
data$DateTime ... |
# install.packages("data.table")
library("data.table")
# Reading in data
outcome <- data.table::fread('outcome-of-care-measures.csv')
outcome[, (11) := lapply(.SD, as.numeric), .SDcols = (11)]
outcome[, lapply(.SD
, hist
, xlab= "Deaths"
, main = "Hospital ... | /run_analysis.R | no_license | SakshiBhardwaj20/Gettingandcleaningdata | R | false | false | 4,881 | r |
# install.packages("data.table")
library("data.table")
# Reading in data
outcome <- data.table::fread('outcome-of-care-measures.csv')
outcome[, (11) := lapply(.SD, as.numeric), .SDcols = (11)]
outcome[, lapply(.SD
, hist
, xlab= "Deaths"
, main = "Hospital ... |
fitted.pheno <- function(object, sub.sample, ...){
if(object$summary.only){
stop("fitted cannot be called using a summary.only=TRUE pheno model object.\n")
}
fitted <- 1#0 for prediction
elip.args <- list(...)
n.omp.threads <- 1
if("n.omp.threads" %in% names(elip.args)){
n.om... | /R/generics.R | no_license | finleya/rsBayes | R | false | false | 8,800 | r | fitted.pheno <- function(object, sub.sample, ...){
if(object$summary.only){
stop("fitted cannot be called using a summary.only=TRUE pheno model object.\n")
}
fitted <- 1#0 for prediction
elip.args <- list(...)
n.omp.threads <- 1
if("n.omp.threads" %in% names(elip.args)){
n.om... |
###
###
ss = function(x, pattern, slot=1,...) sapply(strsplit(x,pattern,...), "[", slot)
library(MatrixEQTL)
library(sva)
library(minfi)
library(GenomicRanges)
## load data
load("/dcs01/ajaffe/Brain/DNAm/ECD2014/rdas/meQTL_data.rda")
colnames(p) = rownames(pd)
## take 2 Mb region
gr = GRanges("chr11", IRanges(129718... | /code/Andrew/Preprocess_DLPFC_chunk/cut_methylation.R | no_license | LieberInstitute/SNX19 | R | false | false | 591 | r | ###
###
ss = function(x, pattern, slot=1,...) sapply(strsplit(x,pattern,...), "[", slot)
library(MatrixEQTL)
library(sva)
library(minfi)
library(GenomicRanges)
## load data
load("/dcs01/ajaffe/Brain/DNAm/ECD2014/rdas/meQTL_data.rda")
colnames(p) = rownames(pd)
## take 2 Mb region
gr = GRanges("chr11", IRanges(129718... |
library(phylogram)
### Name: ladder
### Title: Reorder tree branches in ladderized pattern.
### Aliases: ladder
### ** Examples
x <- read.dendrogram(text = "(A:0.1,B:0.2,(C:0.3,D:0.4):0.5);")
plot(x, horiz = TRUE)
x <- ladder(x, decreasing = TRUE)
plot(x, horiz = TRUE)
| /data/genthat_extracted_code/phylogram/examples/ladder.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 285 | r | library(phylogram)
### Name: ladder
### Title: Reorder tree branches in ladderized pattern.
### Aliases: ladder
### ** Examples
x <- read.dendrogram(text = "(A:0.1,B:0.2,(C:0.3,D:0.4):0.5);")
plot(x, horiz = TRUE)
x <- ladder(x, decreasing = TRUE)
plot(x, horiz = TRUE)
|
#### Plot functions for each chromosome and sample
#### 27/04/2019
#### by Rafael Campos Martin
#'
#' This funciton creates an RViterbi object.
#'
#' @param object an RTIGER or RViterbi object with the filtered data
#' @param samp character with the sample name as specified in the experimentalDesign
#' @param chr ch... | /R/Plot.R | no_license | rfael0cm/RTIGER | R | false | false | 4,722 | r | #### Plot functions for each chromosome and sample
#### 27/04/2019
#### by Rafael Campos Martin
#'
#' This funciton creates an RViterbi object.
#'
#' @param object an RTIGER or RViterbi object with the filtered data
#' @param samp character with the sample name as specified in the experimentalDesign
#' @param chr ch... |
makeCacheMatrix <- function(x = matrix())
{
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinverse <- function(inverse) inv <<- inverse
getinverse <- function() inv
list(set=set, get=get, setinverse=setinverse, getinverse=getinverse)
}
cacheSolve <- function(x... | /cachematrix.R | no_license | JozefKrivak/course2Assignment2 | R | false | false | 497 | r | makeCacheMatrix <- function(x = matrix())
{
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinverse <- function(inverse) inv <<- inverse
getinverse <- function() inv
list(set=set, get=get, setinverse=setinverse, getinverse=getinverse)
}
cacheSolve <- function(x... |
pd_packages <- c("tidyverse", "tidycensus", "leaflet", "mapview", "DT", "sf", "report",
"knitr", "rmarkdown", "kableExtra", "RColorBrewer", "tigris",
"directlabels", "officer", "flextable")
lapply(pd_packages, library, character.only = TRUE)
dp_variables_2018 <- load_variables(2018, ... | /birth and death rates.R | no_license | pcollin5/kingsport | R | false | false | 11,864 | r | pd_packages <- c("tidyverse", "tidycensus", "leaflet", "mapview", "DT", "sf", "report",
"knitr", "rmarkdown", "kableExtra", "RColorBrewer", "tigris",
"directlabels", "officer", "flextable")
lapply(pd_packages, library, character.only = TRUE)
dp_variables_2018 <- load_variables(2018, ... |
## Below find two functions used for caching the inverse of a matrix
## The first function makeCacheMatrix creates a special matrix object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
in <- NULL
set <- function(z){
x <<- z
in <<- NULL
... | /cachematrix.R | no_license | emgurish/ProgrammingAssignment2 | R | false | false | 891 | r | ## Below find two functions used for caching the inverse of a matrix
## The first function makeCacheMatrix creates a special matrix object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
in <- NULL
set <- function(z){
x <<- z
in <<- NULL
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/forecast.R
\name{multiforecast}
\alias{multiforecast}
\title{Forecast for \code{tsm.multi} objects}
\usage{
multiforecast(object.list, h = 18L, y = NULL, ...)
}
\arguments{
\item{object.list}{list of \code{tsm} objects}
\item{h}{integer. len... | /man/multiforecast.Rd | no_license | RobertWSmith/forecastR | R | false | true | 596 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/forecast.R
\name{multiforecast}
\alias{multiforecast}
\title{Forecast for \code{tsm.multi} objects}
\usage{
multiforecast(object.list, h = 18L, y = NULL, ...)
}
\arguments{
\item{object.list}{list of \code{tsm} objects}
\item{h}{integer. len... |
# Correct unrealistic values:
# Prices and Kms
rm(list=ls())
#Set working directory
project_directory<- "C:/Users/Nk/Documents/Uni/MA"
data_directory<- "/Pkw/MobileDaten/generatedData/"
wd<- paste0(project_directory, data_directory)
setwd(wd)
library("data.table")
library("stringr")
#Read files with car specifica... | /01_data_preparation/step4_recognize_censored_data/old_code/step43_correct_unrealistic_data.R | no_license | nvkov/MA_Code | R | false | false | 1,551 | r | # Correct unrealistic values:
# Prices and Kms
rm(list=ls())
#Set working directory
project_directory<- "C:/Users/Nk/Documents/Uni/MA"
data_directory<- "/Pkw/MobileDaten/generatedData/"
wd<- paste0(project_directory, data_directory)
setwd(wd)
library("data.table")
library("stringr")
#Read files with car specifica... |
## below are two functions that are used to create a special object that stores a square invertible matrix
## and cache's its inverse
## The first function, makeCacheMatrix creates a special "matrix" object, which is a list containing function to
##1 set the elements of matrix
##2 get the elements of matrix
##3 se... | /cachematrix.R | no_license | karanpalekar/ProgrammingAssignment2 | R | false | false | 1,899 | r | ## below are two functions that are used to create a special object that stores a square invertible matrix
## and cache's its inverse
## The first function, makeCacheMatrix creates a special "matrix" object, which is a list containing function to
##1 set the elements of matrix
##2 get the elements of matrix
##3 se... |
library(shiny)
library(leaflet)
library(data.table)
library(jsonlite)
library(htmltools)
library(randomcoloR)
library(doBy)
library(ggplot2)
library(ggthemes)
library(plotly)
df <- read.csv('geocoding/geocoded.csv', header = TRUE ,stringsAsFactors = FALSE )
df <- na.omit(df)
df$OCCRRNC_DE <- as.Date(df$OCCRRNC_DE)
max... | /server.R | no_license | pig-plan/animal-disease-shiny | R | false | false | 3,479 | r | library(shiny)
library(leaflet)
library(data.table)
library(jsonlite)
library(htmltools)
library(randomcoloR)
library(doBy)
library(ggplot2)
library(ggthemes)
library(plotly)
df <- read.csv('geocoding/geocoded.csv', header = TRUE ,stringsAsFactors = FALSE )
df <- na.omit(df)
df$OCCRRNC_DE <- as.Date(df$OCCRRNC_DE)
max... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/genomics_functions.R
\name{operations.get}
\alias{operations.get}
\title{Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.}
\usage{
oper... | /googlegenomicsv1alpha2.auto/man/operations.get.Rd | permissive | Phippsy/autoGoogleAPI | R | false | true | 990 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/genomics_functions.R
\name{operations.get}
\alias{operations.get}
\title{Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.}
\usage{
oper... |
# read in data folder holding Agilent text files and the annotation file;
# also set results folder
results.name<-"basic"
folder='test/'
if (exists("folder")) {
if (folder!="") {
temp=readline(paste("Data folder ('return' for ",folder," ): ",sep=""))
if (temp!="") { folder=temp }
} else { folder=readline... | /Rlib/norm.R | no_license | gideonite/cn_pipeline | R | false | false | 2,475 | r |
# read in data folder holding Agilent text files and the annotation file;
# also set results folder
results.name<-"basic"
folder='test/'
if (exists("folder")) {
if (folder!="") {
temp=readline(paste("Data folder ('return' for ",folder," ): ",sep=""))
if (temp!="") { folder=temp }
} else { folder=readline... |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Lasso/soft_tissue.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.02,family="gaussian",standardize=TRUE)
sink('./soft_tissue_011.txt',append=T... | /Model/EN/Lasso/soft_tissue/soft_tissue_011.R | no_license | esbgkannan/QSMART | R | false | false | 354 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Lasso/soft_tissue.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.02,family="gaussian",standardize=TRUE)
sink('./soft_tissue_011.txt',append=T... |
excel.LEFT<-function(text,num_chars=1)
{
answer<-substr(text,1,num_chars)
return(answer)
}
| /R/Excel.LEFT.r | no_license | DuyDN/NCBI2R | R | false | false | 107 | r | excel.LEFT<-function(text,num_chars=1)
{
answer<-substr(text,1,num_chars)
return(answer)
}
|
source('conf.R')
library(dplyr)
library(swMisc)
library(rlang)
library(reshape2)
share.lib("episodes")
share.lib('incidence')
# Get all parameters sets
eu.params = get_eu_incidence_parameters("default")
if(!exists("country") | is.null(country)) {
rlang::abort("Country not defined")
}
if(!exists("season") | is.nul... | /ecdc/ecdc_healthcare.R | no_license | influenzanet/data-analysis-europe | R | false | false | 7,979 | r | source('conf.R')
library(dplyr)
library(swMisc)
library(rlang)
library(reshape2)
share.lib("episodes")
share.lib('incidence')
# Get all parameters sets
eu.params = get_eu_incidence_parameters("default")
if(!exists("country") | is.null(country)) {
rlang::abort("Country not defined")
}
if(!exists("season") | is.nul... |
## Parts of the sript provided by Dr. Roy Gava ##
#####################################################################################
## ##
## Data source: ... | /intro_text_analysis.R | no_license | julienmjaquet/introQTAwithR | R | false | false | 19,139 | r | ## Parts of the sript provided by Dr. Roy Gava ##
#####################################################################################
## ##
## Data source: ... |
library(MASS)
library(dplyr)
#============================================================================
year <- paste(seq.int(2010,2017), collapse="|")
source("authors.r")
stats <- authors %>%
mutate(year=sub("-\\d*$", "", id)) %>%
group_by(year, affil) %>%
summarize(num_authors=n_distinct(author)) ... | /stats_for_Andre.r | no_license | bbejanov/BoC_SWP_ML | R | false | false | 1,032 | r | library(MASS)
library(dplyr)
#============================================================================
year <- paste(seq.int(2010,2017), collapse="|")
source("authors.r")
stats <- authors %>%
mutate(year=sub("-\\d*$", "", id)) %>%
group_by(year, affil) %>%
summarize(num_authors=n_distinct(author)) ... |
multi_resolve <- function(fs, nms = NULL) {
nchunks <- length(fs)
debug <- getOption("future.debug", FALSE)
## Resolving futures
if (debug) mdebug("Resolving %d futures (chunks) ...", nchunks)
values <- values(fs)
if (debug) mdebug("Resolving %d futures (chunks) ... DONE", nchunks)
## Not needed anym... | /R/resolve.R | no_license | yonicd/furrr | R | false | false | 599 | r | multi_resolve <- function(fs, nms = NULL) {
nchunks <- length(fs)
debug <- getOption("future.debug", FALSE)
## Resolving futures
if (debug) mdebug("Resolving %d futures (chunks) ...", nchunks)
values <- values(fs)
if (debug) mdebug("Resolving %d futures (chunks) ... DONE", nchunks)
## Not needed anym... |
i=1
repeat{
print(i)
i=i+1
if(i>10){
break
}
} | /R/EXP3/Repeat.R | no_license | ProfessionalJK/ITPracticals | R | false | false | 65 | r | i=1
repeat{
print(i)
i=i+1
if(i>10){
break
}
} |
testlist <- list(bytes1 = c(-65536L, 0L, 16722943L, -45L, -564166656L, 33021L, -255L, 603848191L, -8519681L, 3487029L, 830285093L, 623191333L, 623194879L, -16702465L, -213L, -1L, -740401371L, 623191333L, 623191333L, 623191333L, 623191333L, 623191424L, 0L, 33751253L, -587076224L, 128L, 623184385L, 2105376125L, 58792... | /mcga/inst/testfiles/ByteCodeMutation/libFuzzer_ByteCodeMutation/ByteCodeMutation_valgrind_files/1612803541-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 806 | r | testlist <- list(bytes1 = c(-65536L, 0L, 16722943L, -45L, -564166656L, 33021L, -255L, 603848191L, -8519681L, 3487029L, 830285093L, 623191333L, 623194879L, -16702465L, -213L, -1L, -740401371L, 623191333L, 623191333L, 623191333L, 623191333L, 623191424L, 0L, 33751253L, -587076224L, 128L, 623184385L, 2105376125L, 58792... |
saveDeployment <- function(appPath, name, title, account, server, appId,
bundleId, url, metadata) {
# if there's no new title specified, load the existing deployment record, if
# any, to to preserve the old title
if (is.null(title) || is.na(title) || length(title) == 0 ||
nchar... | /R/deployments.R | no_license | synergyvision/rsconnect | R | false | false | 8,631 | r |
saveDeployment <- function(appPath, name, title, account, server, appId,
bundleId, url, metadata) {
# if there's no new title specified, load the existing deployment record, if
# any, to to preserve the old title
if (is.null(title) || is.na(title) || length(title) == 0 ||
nchar... |
library(data.table)
library(DESeq2)
library(VennDiagram)
library(pheatmap)
library(tidyr)
library(dplyr)
library(viridis)
mh_itWT_dds <- readRDS("output/03_deseq2/viral_LRT/viral_itWT.rds")
###############################
## iterative pairwise comp.s ##
###############################
##abdo head
abdo_head <- result... | /src/all_viral/tissue_itWT_LRT/Abdomen_itWT_LRT.R | no_license | sarahinwood/mh-rnaseq | R | false | false | 2,383 | r | library(data.table)
library(DESeq2)
library(VennDiagram)
library(pheatmap)
library(tidyr)
library(dplyr)
library(viridis)
mh_itWT_dds <- readRDS("output/03_deseq2/viral_LRT/viral_itWT.rds")
###############################
## iterative pairwise comp.s ##
###############################
##abdo head
abdo_head <- result... |
niche.summary <-
function(blauObj){
uniqueEcologies <- unique(blauObj$ids[,2])
uniqueEcologies <- uniqueEcologies[!is.na(uniqueEcologies)]
sum.niche <- matrix(0, nrow = length(uniqueEcologies)*ncol(blauObj$memberships), ncol = 7) #ecology name, niche name, num in org, num in niche, num in org but not nich... | /R/niche.summary.R | no_license | cran/Blaunet | R | false | false | 2,671 | r | niche.summary <-
function(blauObj){
uniqueEcologies <- unique(blauObj$ids[,2])
uniqueEcologies <- uniqueEcologies[!is.na(uniqueEcologies)]
sum.niche <- matrix(0, nrow = length(uniqueEcologies)*ncol(blauObj$memberships), ncol = 7) #ecology name, niche name, num in org, num in niche, num in org but not nich... |
# legend titles with italics
ctitle <- expression(paste("Pearson's ", italic("r")))
ptitle <- expression(paste(italic("p"), "-value"))
# sensible axis titles
labels = rev(c("PCL-R interpersonal facet",
"PCL-R affective facet",
"PCL-R lifestyle facet",
"PCL-R antisocial face... | /scripts/figure1.R | permissive | carldelfin/EF-psychopathy | R | false | false | 9,785 | r | # legend titles with italics
ctitle <- expression(paste("Pearson's ", italic("r")))
ptitle <- expression(paste(italic("p"), "-value"))
# sensible axis titles
labels = rev(c("PCL-R interpersonal facet",
"PCL-R affective facet",
"PCL-R lifestyle facet",
"PCL-R antisocial face... |
# CWR pre-breeding characterising testing environments: calculating future water balance
# Authors: B. Mora & H. Achicanoy
# CIAT, 2018
# R options
g <- gc(reset = T); rm(list = ls()); options(warn = -1); options(scipen = 999)
# Load packages
suppressMessages(if(!require(raster)){install.packages('raster'); library(r... | /calculating_historic_water_balance_pixel.R | no_license | CIAT-DAPA/cwr_pre_breeding | R | false | false | 6,759 | r | # CWR pre-breeding characterising testing environments: calculating future water balance
# Authors: B. Mora & H. Achicanoy
# CIAT, 2018
# R options
g <- gc(reset = T); rm(list = ls()); options(warn = -1); options(scipen = 999)
# Load packages
suppressMessages(if(!require(raster)){install.packages('raster'); library(r... |
library(did)
### Name: mp.spatt
### Title: mp.spatt
### Aliases: mp.spatt
### ** Examples
data(mpdta)
## with covariates
out1 <- mp.spatt(lemp ~ treat, xformla=~lpop, data=mpdta,
panel=TRUE, first.treat.name="first.treat",
idname="countyreal", tname="year",
bstrap=FA... | /data/genthat_extracted_code/did/examples/mp.spatt.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 756 | r | library(did)
### Name: mp.spatt
### Title: mp.spatt
### Aliases: mp.spatt
### ** Examples
data(mpdta)
## with covariates
out1 <- mp.spatt(lemp ~ treat, xformla=~lpop, data=mpdta,
panel=TRUE, first.treat.name="first.treat",
idname="countyreal", tname="year",
bstrap=FA... |
library(ggplot2);library(MASS)
#' DPMM_2D
#' the function to generate DPMM with base measure of 2D Gaussian distribution
#'
#' @param num_customers the total number of customers for simulation
#' @param theta the concentration parameter in Dirichlet Process, or
#' @param sig2 variances of y
#' @param sig2_0 variances... | /codes/DPMM_2D.R | no_license | XiaoruiZhu/DPMM | R | false | false | 11,974 | r | library(ggplot2);library(MASS)
#' DPMM_2D
#' the function to generate DPMM with base measure of 2D Gaussian distribution
#'
#' @param num_customers the total number of customers for simulation
#' @param theta the concentration parameter in Dirichlet Process, or
#' @param sig2 variances of y
#' @param sig2_0 variances... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{FastProxSL1}
\alias{FastProxSL1}
\title{FastProxSL1}
\arguments{
\item{beta}{input vector}
\item{lambda}{vector of lambdas, sorted in decreasing order}
}
\description{
A function using RcppArmadillo that computes the prox... | /man/FastProxSL1.Rd | permissive | kushagragpt99/ADMMSLOPE | R | false | true | 484 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{FastProxSL1}
\alias{FastProxSL1}
\title{FastProxSL1}
\arguments{
\item{beta}{input vector}
\item{lambda}{vector of lambdas, sorted in decreasing order}
}
\description{
A function using RcppArmadillo that computes the prox... |
#Group 4 -- R Exercise 3
#Jesus Cantoral, Alberto Ferrera, Leticia Rodriguez
rm(list=ls())
#Read data
leuk.dat <- read.table("leukemia.data.txt", row.names = 1)
leuk.dat.m <- data.matrix(leuk.dat)
leuk.class <- factor(scan("leukemia.class.txt",
what = character()))
sex <- factor(rep(c("Male... | /R/Script3/R_Exc3_Group4.R | no_license | jcantoral/HPBBM | R | false | false | 1,943 | r | #Group 4 -- R Exercise 3
#Jesus Cantoral, Alberto Ferrera, Leticia Rodriguez
rm(list=ls())
#Read data
leuk.dat <- read.table("leukemia.data.txt", row.names = 1)
leuk.dat.m <- data.matrix(leuk.dat)
leuk.class <- factor(scan("leukemia.class.txt",
what = character()))
sex <- factor(rep(c("Male... |
library(ggplot2)
library(plyr)
result<-read.csv("solution.csv",sep="\t", header = FALSE)
# The file solution.csv is generated by the c code, which is calcualted by the monte carlo markov chain of parameters.
t<-seq(0,24,0.25)
result<-result[10000:56136,1:length(t)]
library(HDInterval)
rmin<-c()
rmax<-c()
for (i ... | /fitplot/plot.R | no_license | ChentongLi/SARS-CoV-2_viral_kinetic | R | false | false | 991 | r | library(ggplot2)
library(plyr)
result<-read.csv("solution.csv",sep="\t", header = FALSE)
# The file solution.csv is generated by the c code, which is calcualted by the monte carlo markov chain of parameters.
t<-seq(0,24,0.25)
result<-result[10000:56136,1:length(t)]
library(HDInterval)
rmin<-c()
rmax<-c()
for (i ... |
# description: Simulation script for R Carpentry - P-values
#
# author: Anne Lyngholm Soerensen
# email: lynganne@gmail.com
# date: 2020-05-18
#### introduction
# simulate height from australia
nobs <- 100
meanAUS <- 170
sdAUS <- 7
meanNZ <- 170
sdNZ <- 7
set.seed(24062020)
heightAUS <- rnorm(nobs, mean = meanAUS, s... | /simulation.R | no_license | mariakna/2020_06_Statistical-inference_Anne-Soerensen | R | false | false | 3,076 | r | # description: Simulation script for R Carpentry - P-values
#
# author: Anne Lyngholm Soerensen
# email: lynganne@gmail.com
# date: 2020-05-18
#### introduction
# simulate height from australia
nobs <- 100
meanAUS <- 170
sdAUS <- 7
meanNZ <- 170
sdNZ <- 7
set.seed(24062020)
heightAUS <- rnorm(nobs, mean = meanAUS, s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/algorithm.R
\name{count}
\alias{count}
\title{Return counted number which is matched to the argument}
\usage{
count(what, from, condition = `==`)
}
\arguments{
\item{what}{value of sequence for finding}
\item{from}{index of this argument is ... | /man/count.Rd | permissive | hmito/hmRLib | R | false | true | 511 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/algorithm.R
\name{count}
\alias{count}
\title{Return counted number which is matched to the argument}
\usage{
count(what, from, condition = `==`)
}
\arguments{
\item{what}{value of sequence for finding}
\item{from}{index of this argument is ... |
# The script below estimates selection coefficients of L1 from the
# 1000 genome data
##########################################
# #
# Load packages #
# #
##########################################
# Load packages... | /Scripts/EstimateL1SelectionPars_MELT_Group_RombergQuadr.R | no_license | hdohna/L1polymORFgit | R | false | false | 10,898 | r | # The script below estimates selection coefficients of L1 from the
# 1000 genome data
##########################################
# #
# Load packages #
# #
##########################################
# Load packages... |
#R Script written by Bettina Budeus, rokkaku-fight@gmx.de
#from 2012-07-23 to 2012--
#calculates and adds q_values to a list of given p_values in csv format with p_value as column header for this column.
#search for "change" for points where changes are possible
#please check before executing
#libs
library(qvalue)
q... | /R/q-values.R | no_license | cran/SeqFeatR | R | false | false | 2,655 | r | #R Script written by Bettina Budeus, rokkaku-fight@gmx.de
#from 2012-07-23 to 2012--
#calculates and adds q_values to a list of given p_values in csv format with p_value as column header for this column.
#search for "change" for points where changes are possible
#please check before executing
#libs
library(qvalue)
q... |
# This is an example code to run Quantile function on a Hadoop Cluster
# Prior to running the R Script, launch the H2O hadoop jar on the cluster
# Detach and remove old H2O package if it exists
detach("package:h2o", unload=TRUE)
remove.packages("h2o",.libPaths())
# Install the same version of H2O from online reposito... | /R/examples/quantile_example.r | permissive | vkuznet/h2o | R | false | false | 1,570 | r | # This is an example code to run Quantile function on a Hadoop Cluster
# Prior to running the R Script, launch the H2O hadoop jar on the cluster
# Detach and remove old H2O package if it exists
detach("package:h2o", unload=TRUE)
remove.packages("h2o",.libPaths())
# Install the same version of H2O from online reposito... |
#establecer el ambiente
Sys.setlocale("LC_ALL", "es_ES.UTF-8")
options(scipen=999)
#cargar paquetes
library(pacman)
p_load(tidyverse, scales, ggrepel, readxl, janitor, ggthemes, hrbrthemes, magick, ggalt, treemapify, data.table)
#LIMPIEZA PARA BASE CORRECTA TREEMAPS
#cargar base para delitos
bd<-read_exc... | /treemaps y bases generales.R | no_license | Julescb/vis_enencap | R | false | false | 7,435 | r | #establecer el ambiente
Sys.setlocale("LC_ALL", "es_ES.UTF-8")
options(scipen=999)
#cargar paquetes
library(pacman)
p_load(tidyverse, scales, ggrepel, readxl, janitor, ggthemes, hrbrthemes, magick, ggalt, treemapify, data.table)
#LIMPIEZA PARA BASE CORRECTA TREEMAPS
#cargar base para delitos
bd<-read_exc... |
#This program is being created to generate random forest predictions for McDonalds IRT data
#
#Overall, this is program: 88
library(randomForest)
library(readxl)
library(fpp2)
library(ggpubr)
library(MLmetrics)
library(writexl)
library(caret)
#Never hurts:
set.seed(1)
#For saving results:
Likes_MAE =... | /RF_McDonalds_IRT.R | no_license | PenTompkins/Tompkins_OUDSA5900 | R | false | false | 28,794 | r | #This program is being created to generate random forest predictions for McDonalds IRT data
#
#Overall, this is program: 88
library(randomForest)
library(readxl)
library(fpp2)
library(ggpubr)
library(MLmetrics)
library(writexl)
library(caret)
#Never hurts:
set.seed(1)
#For saving results:
Likes_MAE =... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mapping.R
\name{latlon_bb}
\alias{latlon_bb}
\title{grab the bounding box from a dataframe with lat/long columns}
\usage{
latlon_bb(df, lat = df$lat, lon = df$lon)
}
\description{
grab the bounding box from a dataframe with lat/long columns
}... | /2_load_all/myutils/man/latlon_bb.Rd | no_license | snowdj/clean_and_dry | R | false | true | 321 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mapping.R
\name{latlon_bb}
\alias{latlon_bb}
\title{grab the bounding box from a dataframe with lat/long columns}
\usage{
latlon_bb(df, lat = df$lat, lon = df$lon)
}
\description{
grab the bounding box from a dataframe with lat/long columns
}... |
# R Script to plot model.1 vs UARS/CLAES hono2 data
# Alex Archibald, July 2012
# call the interpolate zm function and pass in the variable (var) to
# be interpolated and the values (pres) to interpolate onto
var <- hono2.code
conv <- 1E9
# define pressure levels to interpolate onto NOTE these are in hPa!!
pres <-... | /plot_zonal_mean_hono2_ERA_eval.R | no_license | paultgriffiths/R_pyle | R | false | false | 3,294 | r | # R Script to plot model.1 vs UARS/CLAES hono2 data
# Alex Archibald, July 2012
# call the interpolate zm function and pass in the variable (var) to
# be interpolated and the values (pres) to interpolate onto
var <- hono2.code
conv <- 1E9
# define pressure levels to interpolate onto NOTE these are in hPa!!
pres <-... |
#####################################################
# Print method for paths objects
#####################################################
#'
#' @param x a fitted model object returned by the \code{\link{paths}} function.
#' @param digits minimal number of significant digits printed.
#' @rdname paths
#' @expor... | /R/print.paths.R | no_license | cran/paths | R | false | false | 7,832 | r | #####################################################
# Print method for paths objects
#####################################################
#'
#' @param x a fitted model object returned by the \code{\link{paths}} function.
#' @param digits minimal number of significant digits printed.
#' @rdname paths
#' @expor... |
# prep training data for lol-parsing
# List of data sets at https://www.ecse.rpi.edu/~cvrl/database/AttributeDataset.htm
# Example chosen https://cvml.ist.ac.at/AwA2/
# zip file containing classes (animals) and predicates (attributes):
# classes.txt
# predicates.txt
# predicate-matrix.png
# predicate-matrix-continuo... | /prep_training_data.R | no_license | dfackler/lol-parsing | R | false | false | 3,799 | r | # prep training data for lol-parsing
# List of data sets at https://www.ecse.rpi.edu/~cvrl/database/AttributeDataset.htm
# Example chosen https://cvml.ist.ac.at/AwA2/
# zip file containing classes (animals) and predicates (attributes):
# classes.txt
# predicates.txt
# predicate-matrix.png
# predicate-matrix-continuo... |
#' Takes stm style bag of words as input and gives LDA.
#'
#' @param stmbow stm formatted bag of words, as given by textProcessor command or stmbow importer.
#' @param out.dir
#' @param k Number of topics.
#' @param alpha The alpha parameter must be greater than 0. Alpha < 1 assumes that each document is constructed fr... | /plagiat/R/stmbow2lda.f.R | no_license | brooksambrose/pack-dev | R | false | false | 2,850 | r | #' Takes stm style bag of words as input and gives LDA.
#'
#' @param stmbow stm formatted bag of words, as given by textProcessor command or stmbow importer.
#' @param out.dir
#' @param k Number of topics.
#' @param alpha The alpha parameter must be greater than 0. Alpha < 1 assumes that each document is constructed fr... |
#########################################################################/**
# @RdocDefault size
#
# @title "Gets the size of an object"
#
# \description{
# Gets the size of an object. If the object is a vector the length of the
# vector is returned. If the object is a matrix the dimension of the matrix
# is returne... | /R/size.R | no_license | githubfun/R.basic | R | false | false | 1,234 | r | #########################################################################/**
# @RdocDefault size
#
# @title "Gets the size of an object"
#
# \description{
# Gets the size of an object. If the object is a vector the length of the
# vector is returned. If the object is a matrix the dimension of the matrix
# is returne... |
testlist <- list(x = structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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(10L, 5L )))
result <- do.call(borrowr:::matchesToCor,testlist)
str(result) | /borrowr/inst/testfiles/matchesToCor/libFuzzer_matchesToCor/matchesToCor_valgrind_files/1609958361-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 269 | r | testlist <- list(x = structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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(10L, 5L )))
result <- do.call(borrowr:::matchesToCor,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/energybalance_functions.R
\name{Qmetabolism_from_mass}
\alias{Qmetabolism_from_mass}
\title{Calculate metabolism as a function of mass}
\usage{
Qmetabolism_from_mass(m, taxa = "reptile")
}
\arguments{
\item{m}{Mass in grams.}
\item{taxa}{Whi... | /man/Qmetabolism_from_mass.Rd | permissive | ArchiYujie/TrenchR | R | false | true | 2,272 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/energybalance_functions.R
\name{Qmetabolism_from_mass}
\alias{Qmetabolism_from_mass}
\title{Calculate metabolism as a function of mass}
\usage{
Qmetabolism_from_mass(m, taxa = "reptile")
}
\arguments{
\item{m}{Mass in grams.}
\item{taxa}{Whi... |
maxRows <- 2200
getOrders <- function(store, newRowList, currentPos, params) {
allzero <- rep(0,length(newRowList)) # used for initializing vectors
if (is.null(store)) {
#checkParams(params)
store <- initStore(newRowList,params$series)
}
else
store <- updateStore(store, newRowList,params$se... | /backtester_v4.2/strategies/Latest/W%R-MACD(P&R)10.R | no_license | whyVeronica/backtester_v4.2 | R | false | false | 9,572 | r | maxRows <- 2200
getOrders <- function(store, newRowList, currentPos, params) {
allzero <- rep(0,length(newRowList)) # used for initializing vectors
if (is.null(store)) {
#checkParams(params)
store <- initStore(newRowList,params$series)
}
else
store <- updateStore(store, newRowList,params$se... |
##
#Tests for differential abundance between C1 samples from alfalfa hay vs grass hay-fed alpacas;
#lines 25-171 of this script were sent to me by my professor and I adjusted it for my needs.
#Taxa with a significant diet effect are tested for correlation with volatile fatty acid abundances and plots are produc... | /VFAcorr.R | no_license | courtneycarroll2/Sample-Code | R | false | false | 9,143 | r | ##
#Tests for differential abundance between C1 samples from alfalfa hay vs grass hay-fed alpacas;
#lines 25-171 of this script were sent to me by my professor and I adjusted it for my needs.
#Taxa with a significant diet effect are tested for correlation with volatile fatty acid abundances and plots are produc... |
compare_survtime_timetodem <- function(obs_matrix){
indices = obs_matrix["survtime", ] < obs_matrix["timetodem", ]
if(sum(indices) > 0){
obs_matrix["dem", indices] <- 0
obs_matrix["dem_wave", indices] <- NA
obs_matrix[variable_names$dem_varnames, indices] <-
obs_matrix[variable_names$dem_varnames... | /RScripts/compare_survtime_timetodem.R | no_license | cshawsome/Simulation-Study-Sex-Dementia | R | false | false | 360 | r | compare_survtime_timetodem <- function(obs_matrix){
indices = obs_matrix["survtime", ] < obs_matrix["timetodem", ]
if(sum(indices) > 0){
obs_matrix["dem", indices] <- 0
obs_matrix["dem_wave", indices] <- NA
obs_matrix[variable_names$dem_varnames, indices] <-
obs_matrix[variable_names$dem_varnames... |
# Non-linear effect
# tp-spline : if knot < 0 , - (knot - x)+^d (negative basis if x <= knot
nl <-function(x,
Spline=c("b-spline","tp-spline", "tpi-spline"),
Knots=NULL,
Degree=3,
Intercept=FALSE,
Boundary.knots = range(x),
... | /flexrsurv/R/nl.td.func.R | no_license | ingted/R-Examples | R | false | false | 8,210 | r | # Non-linear effect
# tp-spline : if knot < 0 , - (knot - x)+^d (negative basis if x <= knot
nl <-function(x,
Spline=c("b-spline","tp-spline", "tpi-spline"),
Knots=NULL,
Degree=3,
Intercept=FALSE,
Boundary.knots = range(x),
... |
"X" <-
structure(c(0.857038104081499, 0.815505526259064, 1.11493564765450,
0.633442727175746, 1.25306323617718, 0.523055398727129, 1.12309072312483,
1.39646635426609, 1.02531361172072, 1.28876603313726, 0.609108935019347,
0.765886954491497, 0.583343748015356, 1.15319446475521, 1.5663800492473,
1.40479827583144, 1.3... | /Data/Test-collection/simplex-7-1999.R | no_license | wstuetzle/Cluster-libs | R | false | false | 79,580 | r | "X" <-
structure(c(0.857038104081499, 0.815505526259064, 1.11493564765450,
0.633442727175746, 1.25306323617718, 0.523055398727129, 1.12309072312483,
1.39646635426609, 1.02531361172072, 1.28876603313726, 0.609108935019347,
0.765886954491497, 0.583343748015356, 1.15319446475521, 1.5663800492473,
1.40479827583144, 1.3... |
# Conditioned Testing Household SIR
# Condition on a 1st stage positive test occuring when it occurs in the sample dataset
conditionalTestingHouseholdSIR <- function(sampleData, pop, startTime = 0, endTime){
# S -> I -> R
stoch <- matrix(c(-1, 1, 0,
0, -1, 1), nrow = 2, ncol = 3, byrow = T... | /R/Conditioned Testing Household SIR.R | no_license | JMacDonaldPhD/COVID19UK | R | false | false | 6,780 | r | # Conditioned Testing Household SIR
# Condition on a 1st stage positive test occuring when it occurs in the sample dataset
conditionalTestingHouseholdSIR <- function(sampleData, pop, startTime = 0, endTime){
# S -> I -> R
stoch <- matrix(c(-1, 1, 0,
0, -1, 1), nrow = 2, ncol = 3, byrow = T... |
install.packages("ngram")
install.packages("tm")
install.packages("SnowballC")
install.packages("topicmodels")
install.packages("textmineR")
install.packages("tokenizers")
#install.packages("RWeka")
library(tm)
library(SnowballC)
library(topicmodels)
library(textmineR)
library(ngram)
library(tokenizers)
#library(RWe... | /code_congplay.R | no_license | AMCaspi/transparency | R | false | false | 2,625 | r |
install.packages("ngram")
install.packages("tm")
install.packages("SnowballC")
install.packages("topicmodels")
install.packages("textmineR")
install.packages("tokenizers")
#install.packages("RWeka")
library(tm)
library(SnowballC)
library(topicmodels)
library(textmineR)
library(ngram)
library(tokenizers)
#library(RWe... |
fix0203 <-
function (func = 1, a = 0, b = 1, mu, sig, eta, kappa, alf = 2,
bet = 2, conv = 1e-05, n = 100)
{
i0 <- fix0204(func, a, b, n, mu, sig, eta, kappa, alf, bet)
for (i in (10:20) * n) {
i1 <- fix0204(func, a, b, i, mu, sig, eta, kappa, alf,
bet)
if (abs((i1 - i... | /R/fix0203.R | no_license | alexkowa/EnvStats | R | false | false | 392 | r | fix0203 <-
function (func = 1, a = 0, b = 1, mu, sig, eta, kappa, alf = 2,
bet = 2, conv = 1e-05, n = 100)
{
i0 <- fix0204(func, a, b, n, mu, sig, eta, kappa, alf, bet)
for (i in (10:20) * n) {
i1 <- fix0204(func, a, b, i, mu, sig, eta, kappa, alf,
bet)
if (abs((i1 - i... |
#' @useDynLib NaBa
#' @importFrom Rcpp sourceCpp
NULL
| /R/importRcpp.R | no_license | LiArAu/NaBa | R | false | false | 54 | r | #' @useDynLib NaBa
#' @importFrom Rcpp sourceCpp
NULL
|
#setwd("~/personal/coursera/ExploratoryDataAnalysis/project1")
hpc <- read.table("./exdata_data_household_power_consumption/household_power_consumption.txt", header = TRUE, sep = ";",skip=0,nrows=2)
clnames = names(hpc)
hpc <- read.table("./exdata_data_household_power_consumption/household_power_consumption.txt", he... | /plot3.R | no_license | katievann/ExData_Plotting1 | R | false | false | 991 | r |
#setwd("~/personal/coursera/ExploratoryDataAnalysis/project1")
hpc <- read.table("./exdata_data_household_power_consumption/household_power_consumption.txt", header = TRUE, sep = ";",skip=0,nrows=2)
clnames = names(hpc)
hpc <- read.table("./exdata_data_household_power_consumption/household_power_consumption.txt", he... |
get_proj_sc <- function(x, ...) {
crsmeta::crs_proj(x)
}
get_vertex_sc <- function(x, ...) {
x$vertex
}
get_meta_sc <- function(x, ...) {
x$meta
}
#' @rdname reproj
#' @export
reproj.sc <- function(x, target = NULL, ..., source = NULL) {
if (is.null(source)) source <- get_proj_sc(x)
verts <- get_... | /R/reproj-external-types.R | no_license | cran/reproj | R | false | false | 1,980 | r | get_proj_sc <- function(x, ...) {
crsmeta::crs_proj(x)
}
get_vertex_sc <- function(x, ...) {
x$vertex
}
get_meta_sc <- function(x, ...) {
x$meta
}
#' @rdname reproj
#' @export
reproj.sc <- function(x, target = NULL, ..., source = NULL) {
if (is.null(source)) source <- get_proj_sc(x)
verts <- get_... |
#' parse the design contrast
#' a contrast is always in the form 'batch+condition_group1_group2', where batch(+) is optional
parse_contrast <- function(contrast) {
batch <- NA
contr <- contrast
# batch name
if (grepl('\\+', contrast)) {
batch <- strsplit(contrast, '\\+')[[1]][1]
contr <- strsplit(contr... | /seq2science/scripts/deseq2/utils.R | permissive | simonvh/seq2science | R | false | false | 8,885 | r | #' parse the design contrast
#' a contrast is always in the form 'batch+condition_group1_group2', where batch(+) is optional
parse_contrast <- function(contrast) {
batch <- NA
contr <- contrast
# batch name
if (grepl('\\+', contrast)) {
batch <- strsplit(contrast, '\\+')[[1]][1]
contr <- strsplit(contr... |
library(MASS)
library(mvtnorm)
library(osDesign)
library(np)
library(splines)
logit <- function(p){
return(log(p/(1-p)))
}
expit <- function(x){
return(exp(x)/(1+exp(x)))
}
# determine beta_0 to achieve a prespecified marginal probability of infection in the placebo group
# 'scenario' is one of "A1" and "A2"
get... | /VEcurveMC_myFunctions.R | no_license | mjuraska/VEcurveMC | R | false | false | 60,513 | r | library(MASS)
library(mvtnorm)
library(osDesign)
library(np)
library(splines)
logit <- function(p){
return(log(p/(1-p)))
}
expit <- function(x){
return(exp(x)/(1+exp(x)))
}
# determine beta_0 to achieve a prespecified marginal probability of infection in the placebo group
# 'scenario' is one of "A1" and "A2"
get... |
#Function: shift in mean:
#########eval(parse(text = (paste("x", 4,6, sep = ""))))
ratio_top5 = function(t.total,nt,vt,nx,ny,index,var,nc,ns,alpha=0.05){
dim(var) = c(nx*ny,t.total)
dim(index) = c(t.total)
# dim(syn.var) = c(nx*ny,t.total,ns)
l.var = list() # var15,var25,...
for(i in 1:nc){
l... | /PhD/ratio_top5.R | no_license | saraamini/CodeSample | R | false | false | 2,167 | r | #Function: shift in mean:
#########eval(parse(text = (paste("x", 4,6, sep = ""))))
ratio_top5 = function(t.total,nt,vt,nx,ny,index,var,nc,ns,alpha=0.05){
dim(var) = c(nx*ny,t.total)
dim(index) = c(t.total)
# dim(syn.var) = c(nx*ny,t.total,ns)
l.var = list() # var15,var25,...
for(i in 1:nc){
l... |
#'
#'@title Extract tracks of individuals from a DisMELS model run
#'
#'@description Function to extract tracks of individuals from a DisMELS model run.
#'
#'@param indivConn - individual connectivity file (or dataframe)
#'@param results - DisMELS results file (or dataframe)
#'@param lhsTypeInfo - life stage info list ... | /R/extractIndivs.R | permissive | wStockhausen/wtsDisMELSConn | R | false | false | 7,804 | r | #'
#'@title Extract tracks of individuals from a DisMELS model run
#'
#'@description Function to extract tracks of individuals from a DisMELS model run.
#'
#'@param indivConn - individual connectivity file (or dataframe)
#'@param results - DisMELS results file (or dataframe)
#'@param lhsTypeInfo - life stage info list ... |
# import libraries
library(tidyverse)
library(ggplot2)
library(usmap)
library(janitor)
library(usmap)
library(data.table)
library(geofacet) ## map-shaped grid of ggplots
library(betareg)
# set wd
setwd("~/Desktop/Gov 1347/Blog/R files")
# read in all data
nat_popvote_df <- read_csv("../Data/popvote_1948-2016.csv")
n... | /R files/prob1.R | no_license | samthau/gov1347 | R | false | false | 9,993 | r | # import libraries
library(tidyverse)
library(ggplot2)
library(usmap)
library(janitor)
library(usmap)
library(data.table)
library(geofacet) ## map-shaped grid of ggplots
library(betareg)
# set wd
setwd("~/Desktop/Gov 1347/Blog/R files")
# read in all data
nat_popvote_df <- read_csv("../Data/popvote_1948-2016.csv")
n... |
#两个表,共同有swissID
#小表 通过swiss ID 得到 大库的所有其他信息(若id有重复信息,会多列输出)
setwd("~/work/11月/1116go-id/")
library(dplyr)
genome.list = read.table(file="genomeNum_swissprot.id", sep =" ",header=F,stringsAsFactors = F)
go_db = read.table(file="goa_1000.gaf", sep ="\t",header=F,stringsAsFactors = F)
colnames(genome.list)[2] <- "ge... | /Scripts/Others/bind_two_tab.r | no_license | Iceylee/NGS-Pacbio | R | false | false | 652 | r | #两个表,共同有swissID
#小表 通过swiss ID 得到 大库的所有其他信息(若id有重复信息,会多列输出)
setwd("~/work/11月/1116go-id/")
library(dplyr)
genome.list = read.table(file="genomeNum_swissprot.id", sep =" ",header=F,stringsAsFactors = F)
go_db = read.table(file="goa_1000.gaf", sep ="\t",header=F,stringsAsFactors = F)
colnames(genome.list)[2] <- "ge... |
#' Infer strain information for mouse array
#'
#' @param vafs Variant allele frequency vector
#' @param strain_snp_table if not given download the default from sesameData
#' @return a list of best guess, p-value of the best guess
#' and the probabilities of all strains
#' @examples
#' sesameDataCache("MM285") # if not... | /R/strain.R | permissive | vrajs-hub/sesame | R | false | false | 1,867 | r |
#' Infer strain information for mouse array
#'
#' @param vafs Variant allele frequency vector
#' @param strain_snp_table if not given download the default from sesameData
#' @return a list of best guess, p-value of the best guess
#' and the probabilities of all strains
#' @examples
#' sesameDataCache("MM285") # if not... |
library(rqdatatable)
### Name: ex_data_table.relop_select_columns
### Title: Implement drop columns.
### Aliases: ex_data_table.relop_select_columns
### ** Examples
dL <- data.frame(x = 1, y = 2, z = 3)
rquery_pipeline <- local_td(dL) %.>%
select_columns(., "y")
ex_data_table(rquery_pipeline)
| /data/genthat_extracted_code/rqdatatable/examples/ex_data_table.relop_select_columns.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 305 | r | library(rqdatatable)
### Name: ex_data_table.relop_select_columns
### Title: Implement drop columns.
### Aliases: ex_data_table.relop_select_columns
### ** Examples
dL <- data.frame(x = 1, y = 2, z = 3)
rquery_pipeline <- local_td(dL) %.>%
select_columns(., "y")
ex_data_table(rquery_pipeline)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ols-normality-tests.R
\name{ols_norm_test}
\alias{ols_norm_test}
\alias{ols_norm_test.lm}
\title{Test for normality}
\usage{
ols_norm_test(y, ...)
\method{ols_norm_test}{lm}(y, ...)
}
\arguments{
\item{y}{a numeric vector or an object of cla... | /man/ols_norm_test.Rd | no_license | SvetiStefan/olsrr | R | false | true | 857 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ols-normality-tests.R
\name{ols_norm_test}
\alias{ols_norm_test}
\alias{ols_norm_test.lm}
\title{Test for normality}
\usage{
ols_norm_test(y, ...)
\method{ols_norm_test}{lm}(y, ...)
}
\arguments{
\item{y}{a numeric vector or an object of cla... |
library(gmodels)
cross_table <- function(factor)
{
ct <- CrossTable(snacks$fit.cluster, snacks[, factor], chisq=TRUE)
}
| /snacks_crosstabs.R | no_license | kevinshea/Snacks | R | false | false | 127 | r | library(gmodels)
cross_table <- function(factor)
{
ct <- CrossTable(snacks$fit.cluster, snacks[, factor], chisq=TRUE)
}
|
#! This file was automatically produced by the testextra package.
#! Changes will be overwritten.
context('tests extracted from file `stacks.R`')
#line 43 "R/stacks.R"
test_that('peek_progress', {#@testing
expect_identical(get_progress_stack('test stack'), list())
pb1 <- progress_bar(3, show=TRUE, type='none'... | /tests/testthat/test-stacks.R | no_license | Shicheng-Guo/purrrogress | R | false | false | 1,407 | r | #! This file was automatically produced by the testextra package.
#! Changes will be overwritten.
context('tests extracted from file `stacks.R`')
#line 43 "R/stacks.R"
test_that('peek_progress', {#@testing
expect_identical(get_progress_stack('test stack'), list())
pb1 <- progress_bar(3, show=TRUE, type='none'... |
\name{eqfloat}
\alias{eqfloat}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Compares 2 floating point numbers}
\description{
Compares 2 floating point numbers up to precision \code{precision}
after the digit.
}
\usage{
eqfloat(f, g, precision = 5)
}
%- maybe also 'usage' for othe... | /DbtTools/general/man/eqfloat.Rd | no_license | markus-flicke/KD_Projekt_1 | R | false | false | 1,227 | rd | \name{eqfloat}
\alias{eqfloat}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Compares 2 floating point numbers}
\description{
Compares 2 floating point numbers up to precision \code{precision}
after the digit.
}
\usage{
eqfloat(f, g, precision = 5)
}
%- maybe also 'usage' for othe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/switches.R
\name{find_switches}
\alias{find_switches}
\title{Find isoform switches}
\usage{
find_switches(tx_pdPSI, gene_pDE, pDE = 0.01, pdPSI = 0.01,
deltaPSI = 0.05, minExpression = 0.1)
}
\arguments{
\item{tx_pdPSI}{data.frame with tran... | /man/find_switches.Rd | no_license | hclimente/scudo | R | false | true | 1,555 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/switches.R
\name{find_switches}
\alias{find_switches}
\title{Find isoform switches}
\usage{
find_switches(tx_pdPSI, gene_pDE, pDE = 0.01, pdPSI = 0.01,
deltaPSI = 0.05, minExpression = 0.1)
}
\arguments{
\item{tx_pdPSI}{data.frame with tran... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ecs_operations.R
\name{ecs_list_account_settings}
\alias{ecs_list_account_settings}
\title{Lists the account settings for a specified principal}
\usage{
ecs_list_account_settings(name, value, principalArn, effectiveSettings,
nextToken, maxR... | /paws/man/ecs_list_account_settings.Rd | permissive | peoplecure/paws | R | false | true | 2,929 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ecs_operations.R
\name{ecs_list_account_settings}
\alias{ecs_list_account_settings}
\title{Lists the account settings for a specified principal}
\usage{
ecs_list_account_settings(name, value, principalArn, effectiveSettings,
nextToken, maxR... |
AdStockCalculation <- function(PressureUnit,carryOver, lag, total.rows)
{
temp_ <- data.table::shift(c(1,dgeom(1:(total.rows-1),(1-carryOver),log=F)/(1-carryOver)), 0:total.rows, fill=0)
CarryoverMatriX <- matrix(unlist(temp_), nrow=total.rows,ncol = total.rows, byrow = FALSE)
AdStock_Series <- data.table::shift(... | /src/helpers/CommonObjectiveFunctionHelper.R | no_license | nirupam1sharma/MarketMixModeling | R | false | false | 3,777 | r | AdStockCalculation <- function(PressureUnit,carryOver, lag, total.rows)
{
temp_ <- data.table::shift(c(1,dgeom(1:(total.rows-1),(1-carryOver),log=F)/(1-carryOver)), 0:total.rows, fill=0)
CarryoverMatriX <- matrix(unlist(temp_), nrow=total.rows,ncol = total.rows, byrow = FALSE)
AdStock_Series <- data.table::shift(... |
n = 50
blanc = 0.5
np = n * blanc
nm = n - np
p0 = 5
pp = 15
mu = 0.7
rho = 0.7
sina = 1
# The means of two classes.
mup = c(rep(mu, p0), rep(0, pp - p0))
mum = c(rep(-mu, p0), rep(0, pp - p0))
# The var-cov matrix of two classes.
if(sina == 1){
sigma = diag(pp)
}
if(sina == 2){
sigma = diag(pp)
for(i in 1:p... | /simu_accu_ada/Apr10/Bayes_error.R | no_license | boxiang-wang/powerfamily | R | false | false | 1,055 | r | n = 50
blanc = 0.5
np = n * blanc
nm = n - np
p0 = 5
pp = 15
mu = 0.7
rho = 0.7
sina = 1
# The means of two classes.
mup = c(rep(mu, p0), rep(0, pp - p0))
mum = c(rep(-mu, p0), rep(0, pp - p0))
# The var-cov matrix of two classes.
if(sina == 1){
sigma = diag(pp)
}
if(sina == 2){
sigma = diag(pp)
for(i in 1:p... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calNDVI.R
\name{calNDVI}
\alias{calNDVI}
\title{Calculates Normalized Difference Vegetation Index (NDVI)}
\usage{
calNDVI(R2, R3)
}
\arguments{
\item{R2}{The reflectance from channel 2}
\item{R3}{The reflectance from channel 3}
}
\descriptio... | /PhenologyBayesModeling/man/calNDVI.Rd | permissive | EcoForecast/NEFI_pheno | R | false | true | 382 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calNDVI.R
\name{calNDVI}
\alias{calNDVI}
\title{Calculates Normalized Difference Vegetation Index (NDVI)}
\usage{
calNDVI(R2, R3)
}
\arguments{
\item{R2}{The reflectance from channel 2}
\item{R3}{The reflectance from channel 3}
}
\descriptio... |
# LOGISTIC REGRESSION #
# How to run a logistic regression #
fit1 = glm(CHD ~ AGE, family=binomial, data=CHD)
summary(fit1)
# Likelihood-Ratio Test comparing "fit0" vs "fit1" #
anova(fit0, fit1, test="Chisq")
# Makes kick-ass Lattice Plot, which charts y vs x (width) by a catergorical var (color)
libra... | /STAT 6110_Cat. Data Analysis/STAT 6110 Logistic Regression.R | no_license | anthony-cunningham/STAT_6110_Categorical_Data | R | false | false | 383 | r | # LOGISTIC REGRESSION #
# How to run a logistic regression #
fit1 = glm(CHD ~ AGE, family=binomial, data=CHD)
summary(fit1)
# Likelihood-Ratio Test comparing "fit0" vs "fit1" #
anova(fit0, fit1, test="Chisq")
# Makes kick-ass Lattice Plot, which charts y vs x (width) by a catergorical var (color)
libra... |
#Import data and rename data frame
ny = read.csv('new_york_city.csv')
wa = read.csv('washington.csv')
chi = read.csv('chicago.csv')
#Load library required for data visualization
library(ggplot2)
#Conduct basic analysis
head(chi)
dim(chi)
summary(chi)
head(ny)
dim(ny)
head(wa)
dim(wa)
Start.Time_WD = weekdays(as... | /Explore_bikeshare_data.r | no_license | upfennig/pdsnd_github | R | false | false | 1,373 | r |
#Import data and rename data frame
ny = read.csv('new_york_city.csv')
wa = read.csv('washington.csv')
chi = read.csv('chicago.csv')
#Load library required for data visualization
library(ggplot2)
#Conduct basic analysis
head(chi)
dim(chi)
summary(chi)
head(ny)
dim(ny)
head(wa)
dim(wa)
Start.Time_WD = weekdays(as... |
\name{circulant}
\alias{circulant}
\alias{is.circulant}
\title{Circulant matrices of any order}
\description{
Creates and tests for circulant matrices of any order
}
\usage{
circulant(vec,doseq=TRUE)
is.circulant(m,dir=rep(1,length(dim(m))))
}
\arguments{
\item{vec,doseq}{In \code{circulant()}, vector of elements of ... | /man/circulant.Rd | no_license | cran/magic | R | false | false | 2,063 | rd | \name{circulant}
\alias{circulant}
\alias{is.circulant}
\title{Circulant matrices of any order}
\description{
Creates and tests for circulant matrices of any order
}
\usage{
circulant(vec,doseq=TRUE)
is.circulant(m,dir=rep(1,length(dim(m))))
}
\arguments{
\item{vec,doseq}{In \code{circulant()}, vector of elements of ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hn_user.R
\name{validate_hn_user}
\alias{validate_hn_user}
\title{Checks whether the given object is correctly defined
hn_user class}
\usage{
validate_hn_user(hn_user)
}
\arguments{
\item{hn_user}{object of the class hn_user}
}
\description{
... | /man/validate_hn_user.Rd | permissive | michbur/hackeRnews | R | false | true | 389 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hn_user.R
\name{validate_hn_user}
\alias{validate_hn_user}
\title{Checks whether the given object is correctly defined
hn_user class}
\usage{
validate_hn_user(hn_user)
}
\arguments{
\item{hn_user}{object of the class hn_user}
}
\description{
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check_datamart_status.R
\name{check_datamart_status}
\alias{check_datamart_status}
\title{Check for difference in datamart reported stations}
\usage{
check_datamart_status(prov_terr_state_loc = NULL)
}
\arguments{
\item{prov_terr_state_loc}{P... | /man/check_datamart_status.Rd | permissive | bcgov/hydrolook | R | false | true | 496 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check_datamart_status.R
\name{check_datamart_status}
\alias{check_datamart_status}
\title{Check for difference in datamart reported stations}
\usage{
check_datamart_status(prov_terr_state_loc = NULL)
}
\arguments{
\item{prov_terr_state_loc}{P... |
## the recursive workhorse that walks up a file tree
##
## enumerates paths in a list
## each component is a character vector:
## id --> parent of id --> grandparent of id --> ... END
## END is either stop_value (root folder id for us) or NA_character_
pth <- function(id, kids, elders, stop_value) {
this <- last(id)
... | /R/tree-climbing.R | no_license | j450h1/googledrive | R | false | false | 1,035 | r | ## the recursive workhorse that walks up a file tree
##
## enumerates paths in a list
## each component is a character vector:
## id --> parent of id --> grandparent of id --> ... END
## END is either stop_value (root folder id for us) or NA_character_
pth <- function(id, kids, elders, stop_value) {
this <- last(id)
... |
# r and s are in geometry helpers
utils::globalVariables(c(".", "coo", "path"))
#' Pipe operator
#'
#' See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details.
#'
#' @name %>%
#' @rdname pipe
#' @keywords internal
#' @export
#' @importFrom magrittr %>%
#' @usage lhs \%>\% rhs
NULL
#' Tidy eval helpers
#'
#' @de... | /R/Momit_reexports.R | no_license | MomX/Momit | R | false | false | 2,394 | r | # r and s are in geometry helpers
utils::globalVariables(c(".", "coo", "path"))
#' Pipe operator
#'
#' See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details.
#'
#' @name %>%
#' @rdname pipe
#' @keywords internal
#' @export
#' @importFrom magrittr %>%
#' @usage lhs \%>\% rhs
NULL
#' Tidy eval helpers
#'
#' @de... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllClass.R
\docType{class}
\name{plan-class}
\alias{plan-class}
\title{Base Class for plan Objects}
\description{
Base Class for plan Objects
}
\section{Slots}{
\describe{
\item{\code{data}}{A list containing variable contents.}
}}
\concept... | /man/plan-class.Rd | no_license | farcego/plan | R | false | true | 354 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllClass.R
\docType{class}
\name{plan-class}
\alias{plan-class}
\title{Base Class for plan Objects}
\description{
Base Class for plan Objects
}
\section{Slots}{
\describe{
\item{\code{data}}{A list containing variable contents.}
}}
\concept... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predictions.R
\name{predict_hatchday}
\alias{predict_hatchday}
\title{predict_hatchday}
\usage{
predict_hatchday(fm, dat = Breeding(), ci = 0.95, days_below_lwr = 1.5)
}
\arguments{
\item{fm}{fitted model (eg. by predict_hatchday_model () )}
... | /man/predict_hatchday.Rd | no_license | mpio-be/bib2 | R | false | true | 1,086 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predictions.R
\name{predict_hatchday}
\alias{predict_hatchday}
\title{predict_hatchday}
\usage{
predict_hatchday(fm, dat = Breeding(), ci = 0.95, days_below_lwr = 1.5)
}
\arguments{
\item{fm}{fitted model (eg. by predict_hatchday_model () )}
... |
## import genomic data ##
source(paste0(path,"ImportGenomicData_HM_OR.R"))
cmp_data_org = cmp_data_org[,setdiff(colnames(cmp_data_org),c("all_time_to_traf","traf_fail"))]
cmp_data_org = na.omit(cmp_data_org)
## select disease ##
cmp_data_org$HM = cmp_data_org$status_LYM
## functions ##
source("show_di.R")
source("... | /estimate_risk_LYM_OR.R | no_license | RSaikiRSaiki/CH_2021 | R | false | false | 4,454 | r |
## import genomic data ##
source(paste0(path,"ImportGenomicData_HM_OR.R"))
cmp_data_org = cmp_data_org[,setdiff(colnames(cmp_data_org),c("all_time_to_traf","traf_fail"))]
cmp_data_org = na.omit(cmp_data_org)
## select disease ##
cmp_data_org$HM = cmp_data_org$status_LYM
## functions ##
source("show_di.R")
source("... |
retlevel.gev.graph <-
function(vector)
{
t=seq(1,100,1)
n=length(t)
li=array(0,c(n))
ls=array(0,c(n))
pred=array(0,c(n))
for (s in 1:n)
{amostra=qgev(1-1/s,vector[,3],vector[,1],vector[,2])
li[s]=quantile(amostra,0.025)
ls[s]=quantile(amostra,0.975)
pred[s... | /R/retlevel.gev.graph.R | no_license | wyaravms/MCMC4Extremes | R | false | false | 471 | r | retlevel.gev.graph <-
function(vector)
{
t=seq(1,100,1)
n=length(t)
li=array(0,c(n))
ls=array(0,c(n))
pred=array(0,c(n))
for (s in 1:n)
{amostra=qgev(1-1/s,vector[,3],vector[,1],vector[,2])
li[s]=quantile(amostra,0.025)
ls[s]=quantile(amostra,0.975)
pred[s... |
library("circlize")
library("ComplexHeatmap")
#save 600x600
layout(matrix(c(1, 2,
3, 4), nrow=2, byrow=TRUE))
layout.show(n=4)
#Carbs
phase_carbs0 <- read.csv("Figure2e_phases_carbs.txt", sep="\t")
phase_carbs <- t(phase_carbs0[,-1])
colnames(phase_carbs) <- phase_carbs0[,1]
phase_carbs ... | /02_Figures/Figure2/Figure2e.R | no_license | LabHotta/sugarcane_field_rhytms | R | false | false | 12,499 | r | library("circlize")
library("ComplexHeatmap")
#save 600x600
layout(matrix(c(1, 2,
3, 4), nrow=2, byrow=TRUE))
layout.show(n=4)
#Carbs
phase_carbs0 <- read.csv("Figure2e_phases_carbs.txt", sep="\t")
phase_carbs <- t(phase_carbs0[,-1])
colnames(phase_carbs) <- phase_carbs0[,1]
phase_carbs ... |
library(ggplot2)
library(reshape2)
plotDistribution.Factor <- function(x, x.name, levels = NULL, vertical = FALSE) {
if(is.null(levels)) {
levels = levels(x)
}
p <- qplot(x, geom = "bar", fill = factor(x), xlab = "") +
scale_fill_discrete(name = x.name, labels = levels) +
scale_x_discrete(labe... | /Plotter.R | no_license | mjazayeri/CapitationCostPrediction | R | false | false | 6,102 | r | library(ggplot2)
library(reshape2)
plotDistribution.Factor <- function(x, x.name, levels = NULL, vertical = FALSE) {
if(is.null(levels)) {
levels = levels(x)
}
p <- qplot(x, geom = "bar", fill = factor(x), xlab = "") +
scale_fill_discrete(name = x.name, labels = levels) +
scale_x_discrete(labe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predict_N.R
\name{alternative_variance_pva}
\alias{alternative_variance_pva}
\title{alternative_variance_pva}
\usage{
alternative_variance_pva(variance.b = NULL, variance.d = NULL)
}
\description{
alternative_variance_pva
}
| /man/alternative_variance_pva.Rd | permissive | picardis/WILD3810 | R | false | true | 302 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predict_N.R
\name{alternative_variance_pva}
\alias{alternative_variance_pva}
\title{alternative_variance_pva}
\usage{
alternative_variance_pva(variance.b = NULL, variance.d = NULL)
}
\description{
alternative_variance_pva
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.