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 |
|---|---|---|---|---|---|---|---|---|---|
library(ape)
testtree <- read.tree("10219_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="10219_0_unrooted.txt") | /codeml_files/newick_trees_processed_and_cleaned/10219_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 137 | r | library(ape)
testtree <- read.tree("10219_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="10219_0_unrooted.txt") |
## Script to plot and save lppd results from ridge regression
rm(list=ls())
####
#### Load Libraries
####
library(plyr)
library(reshape2)
library(ggplot2)
library(ggthemes)
####
#### Recreate Sdev*CV Grid
####
n.beta <- 24
sd_vec <- seq(0.1,1.5,length.out = n.beta)
K <- 13 # number of years
cv.s2.grid <- expan... | /figure_table_scripts/plot_all_lppds.R | no_license | atredennick/MicroMesoForecast | R | false | false | 3,050 | r | ## Script to plot and save lppd results from ridge regression
rm(list=ls())
####
#### Load Libraries
####
library(plyr)
library(reshape2)
library(ggplot2)
library(ggthemes)
####
#### Recreate Sdev*CV Grid
####
n.beta <- 24
sd_vec <- seq(0.1,1.5,length.out = n.beta)
K <- 13 # number of years
cv.s2.grid <- expan... |
# Lab 1 Introduction to R
# Basic Commands
x <- c(1,3,2,5)
x
x = c(1,6,2)
x
y = c(1,4,3)
length(x)
length(y)
x+y
ls()
rm(x,y)
ls()
rm(list=ls())
?matrix
x=matrix(data=c(1,2,3,4), nrow=2, ncol=2)
x
x=matrix(c(1,2,3,4),2,2)
matrix(c(1,2,3,4),2,2,byrow=TRUE)
sqrt(x)
x^2
x=rnorm(50)
y=x+rnorm(50,m... | /lab1.R | no_license | ummeamunira/Stat-505 | R | false | false | 2,002 | r | # Lab 1 Introduction to R
# Basic Commands
x <- c(1,3,2,5)
x
x = c(1,6,2)
x
y = c(1,4,3)
length(x)
length(y)
x+y
ls()
rm(x,y)
ls()
rm(list=ls())
?matrix
x=matrix(data=c(1,2,3,4), nrow=2, ncol=2)
x
x=matrix(c(1,2,3,4),2,2)
matrix(c(1,2,3,4),2,2,byrow=TRUE)
sqrt(x)
x^2
x=rnorm(50)
y=x+rnorm(50,m... |
df.t<-data.frame(Studysample.id=c(21:29),
SampleID=c("A1","A2","A3","A4","A5","A6","A7","A8","A9"),
Pedigree=rep(c("AA","BB","CC"),c(3,3,3)))
df.s<-data.frame(Studysample.id=c(21:29),
SampleID=c("A1","A2","A3","A4","A5","A6","A7","A8","A9"),
Pedigree=rep(c... | /Fake_Data.R | no_license | FDC123/Data_Management | R | false | false | 775 | r | df.t<-data.frame(Studysample.id=c(21:29),
SampleID=c("A1","A2","A3","A4","A5","A6","A7","A8","A9"),
Pedigree=rep(c("AA","BB","CC"),c(3,3,3)))
df.s<-data.frame(Studysample.id=c(21:29),
SampleID=c("A1","A2","A3","A4","A5","A6","A7","A8","A9"),
Pedigree=rep(c... |
din timp in timp , subiectul Antonescu revine pe buzele tuturor .
parca n - ar avea liniste .
si nici n - are .
de o parte sint cei care il glorifica pe maresal , ii ridica statui , boteaza bulevarde cu numele sau si publica volume care sa - i sublinieze importanta istorica .
de partea cealalta sint cei care stiu b... | /data/Newspapers/2001.11.07.editorial.67482.0761.r | no_license | narcis96/decrypting-alpha | R | false | false | 3,544 | r | din timp in timp , subiectul Antonescu revine pe buzele tuturor .
parca n - ar avea liniste .
si nici n - are .
de o parte sint cei care il glorifica pe maresal , ii ridica statui , boteaza bulevarde cu numele sau si publica volume care sa - i sublinieze importanta istorica .
de partea cealalta sint cei care stiu b... |
# function to run simulations on the wigglytop 2 domain
# Copyright David Lawrence Miller 2009.
source("mds.R")
wt2_smooth_test<-function(samp.size=250,noise.level=0.05,plot.it=FALSE){
## create a boundary...
bnd <- read.csv("wt2-verts.csv",header=FALSE)
names(bnd)<-c("x","y")
## Simulate some fittin... | /mds/3d-wt2-smooth-test.R | no_license | distanceModling/phd-smoothing | R | false | false | 5,359 | r | # function to run simulations on the wigglytop 2 domain
# Copyright David Lawrence Miller 2009.
source("mds.R")
wt2_smooth_test<-function(samp.size=250,noise.level=0.05,plot.it=FALSE){
## create a boundary...
bnd <- read.csv("wt2-verts.csv",header=FALSE)
names(bnd)<-c("x","y")
## Simulate some fittin... |
rm(list = ls())
setwd("~/Documents/kaggle/santar/code_xz/")
library(data.table)
load("../data/june_added.RData")
# read in train
train = fread('../input/train_ver2.csv')
result_dt <- train[fecha_dato %in% c('2015-06-28')]
result_dt$fecha_dato <- NULL
result_dt <- result_dt[!duplicated(ncodpers)]
result_dt <- result_d... | /code_xz/train201506_v0.r | no_license | tkcrown/KaggleSantanderProductRecommendation | R | false | false | 2,173 | r | rm(list = ls())
setwd("~/Documents/kaggle/santar/code_xz/")
library(data.table)
load("../data/june_added.RData")
# read in train
train = fread('../input/train_ver2.csv')
result_dt <- train[fecha_dato %in% c('2015-06-28')]
result_dt$fecha_dato <- NULL
result_dt <- result_dt[!duplicated(ncodpers)]
result_dt <- result_d... |
# earth.cv.lib.R: library functions for cross validation of earth models
# The following functions were lifted from the Elith Leathwick code.
# In that code, the AUC calculation was adapted from Ferrier, Pearce and Watson.
# See Pearce and Ferrier (2000) Evaluating the predictive performance
# of habitat models develo... | /R/earth.cv.lib.R | no_license | cran/earth | R | false | false | 2,515 | r | # earth.cv.lib.R: library functions for cross validation of earth models
# The following functions were lifted from the Elith Leathwick code.
# In that code, the AUC calculation was adapted from Ferrier, Pearce and Watson.
# See Pearce and Ferrier (2000) Evaluating the predictive performance
# of habitat models develo... |
#Plot level aggregation.
#Getting plot, site and global means and sd's for all observations made at the plot level.
#This is currently total basal area and %ECM trees.
#clear environment, source paths.
rm(list=ls())
source('paths.r')
source('NEFI_functions/hierarch_plot.means_JAGS.r')
#load data.----
plot_data <- read... | /data_construction/1._NEON_env/2._covariate_aggregation/2._plot_obs_aggregation.r | permissive | saracg-forks/NEFI_microbe | R | false | false | 4,849 | r | #Plot level aggregation.
#Getting plot, site and global means and sd's for all observations made at the plot level.
#This is currently total basal area and %ECM trees.
#clear environment, source paths.
rm(list=ls())
source('paths.r')
source('NEFI_functions/hierarch_plot.means_JAGS.r')
#load data.----
plot_data <- read... |
##################################################################################################
# main.R #
# Description: Main program for identification of TSC patients and undiagnosed patients #
# who ... | /Source/FV_2_update/Model/old2/main_rbf_v2_update_set3.r | no_license | jzhao0802/TSC | R | false | false | 13,432 | r | ##################################################################################################
# main.R #
# Description: Main program for identification of TSC patients and undiagnosed patients #
# who ... |
BudgetFun <- function(tu,
rent,
flight,
christmas,
food,
other,
euro=TRUE){
costEuros <-
tu +
(rent*10) +
(flight) +
(christmas)+
(food*300) +
(other*300)
... | /benBudget/helper.R | no_license | joebrew/ShinyApps | R | false | false | 2,007 | r | BudgetFun <- function(tu,
rent,
flight,
christmas,
food,
other,
euro=TRUE){
costEuros <-
tu +
(rent*10) +
(flight) +
(christmas)+
(food*300) +
(other*300)
... |
#' Death types stochastic plot
#'
#' @param dat counts as provided as output from the CWD model
#' @param error.bars error bars = vector of high and low percentiles
#' (2 values only). If missing, no error bars are shown.
#'
#' @return a plot of death types over time.
#'
#' @import ggplot2
#' @import dplyr
#' @importFr... | /CWD/wiw_app/plot_stoch_deaths.r | no_license | pcross-usgs/CWD-shiny | R | false | false | 2,757 | r | #' Death types stochastic plot
#'
#' @param dat counts as provided as output from the CWD model
#' @param error.bars error bars = vector of high and low percentiles
#' (2 values only). If missing, no error bars are shown.
#'
#' @return a plot of death types over time.
#'
#' @import ggplot2
#' @import dplyr
#' @importFr... |
temp<-clusterset[[id]][[no]]$plot
plot_ly(temp, x = temp.lon , y = temp.lat, z = windowsum,
type = "mesh3d", mode = "markers")
#plot_ly(temp, x = temp.lon , y = temp.lat, z = temp.value,
# type = "mesh3d", mode = "markers")
rm(temp) | /3_displty&report/display_3dplot.R | no_license | floatSDSDS/Yelp_Dataset_regionPredictor | R | false | false | 260 | r | temp<-clusterset[[id]][[no]]$plot
plot_ly(temp, x = temp.lon , y = temp.lat, z = windowsum,
type = "mesh3d", mode = "markers")
#plot_ly(temp, x = temp.lon , y = temp.lat, z = temp.value,
# type = "mesh3d", mode = "markers")
rm(temp) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/grow_functions.R
\name{grow_sapling}
\alias{grow_sapling}
\title{Grow Sapling}
\usage{
grow_sapling()
}
\description{
Initializes the tree: the very first shoot is the "sapling"
}
\keyword{internal}
| /man/grow_sapling.Rd | no_license | tylermorganwall/raybonsai | R | false | true | 277 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/grow_functions.R
\name{grow_sapling}
\alias{grow_sapling}
\title{Grow Sapling}
\usage{
grow_sapling()
}
\description{
Initializes the tree: the very first shoot is the "sapling"
}
\keyword{internal}
|
#' plotPosts
#'
#' A function to plot one or more posterior distributions from the logfile of a BayesTraits
#' analysis.
#'
#' @param logfile The name of the trait data file on which BayesTraits was run.
#' @param params A vector containing the name of the parameter(s) that are to be plotted. Can be
#' subsetted from t... | /retired_functions/plotPosts.R | no_license | hferg/bayestraitr | R | false | false | 2,157 | r | #' plotPosts
#'
#' A function to plot one or more posterior distributions from the logfile of a BayesTraits
#' analysis.
#'
#' @param logfile The name of the trait data file on which BayesTraits was run.
#' @param params A vector containing the name of the parameter(s) that are to be plotted. Can be
#' subsetted from t... |
# U nekoj anketi od 500 ispitanika 285 se
# izjasnilo protiv. Naci 90%-tni interval
# poverenja za verovatnocu da se slucajno
# odabrana osoba izjasni protiv.
n <- 500
x_n <- 285/500
beta <- 0.9
c <- qnorm((1+beta)/2)
interval_poverenja <- c(x_n - c*sqrt(x_n*(1-x_n) / n), x_n + c*sqrt(x_n*(1-x_n) / n))
interval_pove... | /3. godina/statistika vezbe/cas05 - intervali poverenja/5.R | no_license | SvetlanaBicanin/MATF-materijali | R | false | false | 325 | r | # U nekoj anketi od 500 ispitanika 285 se
# izjasnilo protiv. Naci 90%-tni interval
# poverenja za verovatnocu da se slucajno
# odabrana osoba izjasni protiv.
n <- 500
x_n <- 285/500
beta <- 0.9
c <- qnorm((1+beta)/2)
interval_poverenja <- c(x_n - c*sqrt(x_n*(1-x_n) / n), x_n + c*sqrt(x_n*(1-x_n) / n))
interval_pove... |
install.packages("devtools")
devtools::install_github("mcguinlu/robvis")
library(robvis)
### Plot trafficlight plot of the domain-level judgements for each individual study ###
jbi <- read.csv("data/survey_quality.csv")
trafficlight <- rob_traffic_light(data = jbi, tool = "Generic")
trafficlight
rob_save(trafficlight... | /survey_quality.R | no_license | vinibfranc/Syst-Review-COVID19-Prevalence | R | false | false | 545 | r | install.packages("devtools")
devtools::install_github("mcguinlu/robvis")
library(robvis)
### Plot trafficlight plot of the domain-level judgements for each individual study ###
jbi <- read.csv("data/survey_quality.csv")
trafficlight <- rob_traffic_light(data = jbi, tool = "Generic")
trafficlight
rob_save(trafficlight... |
#+ setup, include=FALSE
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
warning = FALSE,
message = FALSE,
echo = TRUE,
fig.width = 6,
fig.asp = 0.618,
out.width = "70%",
fig.align = "center")
#' # Does Elsevier's flip the open access business model of its journals?
#'
#' ### Prepare data
libr... | /elsevier_07_18.R | no_license | njahn82/reverse_flips | R | false | false | 3,685 | r | #+ setup, include=FALSE
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
warning = FALSE,
message = FALSE,
echo = TRUE,
fig.width = 6,
fig.asp = 0.618,
out.width = "70%",
fig.align = "center")
#' # Does Elsevier's flip the open access business model of its journals?
#'
#' ### Prepare data
libr... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simple_interest.R
\name{simple_interest}
\alias{simple_interest}
\title{Title Simple interest}
\usage{
simple_interest(p, r, t)
}
\arguments{
\item{p}{numeric}
\item{r}{numeric}
\item{t}{numeric}
}
\value{
numeric
}
\description{
Title Simp... | /man/simple_interest.Rd | permissive | devopsuser94/MyFirstGitRepoR | R | false | true | 372 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simple_interest.R
\name{simple_interest}
\alias{simple_interest}
\title{Title Simple interest}
\usage{
simple_interest(p, r, t)
}
\arguments{
\item{p}{numeric}
\item{r}{numeric}
\item{t}{numeric}
}
\value{
numeric
}
\description{
Title Simp... |
### Figuring out creadible pollsters ###
brexit_polls %>%
group_by(pollster) %>%
summarize(n())
### Filtering Data, one week before election, true spread and true se ###
data <- brexit_polls %>%
mutate(true_remain = (remain / (remain + leave)), true_leave = (leave / (remain + leave))) %>%
mutate(true_... | /Codes/Wrangling-Adjusting-Data.R | permissive | AbhinavDholepat/Brexit-Referendum | R | false | false | 1,110 | r | ### Figuring out creadible pollsters ###
brexit_polls %>%
group_by(pollster) %>%
summarize(n())
### Filtering Data, one week before election, true spread and true se ###
data <- brexit_polls %>%
mutate(true_remain = (remain / (remain + leave)), true_leave = (leave / (remain + leave))) %>%
mutate(true_... |
#!/usr/bin/env Rscript
########################################
## filename: figure-regression.R
## author: Dylan Morris <dhmorris@princeton.edu>
## plot main regression figure for environmental
## conditions analysis
#######################################
suppressPackageStartupMessages(library(virusenv))
suppressPa... | /src/figures/figure-regression.R | permissive | dylanhmorris/sars-cov-2-temp-humidity | R | false | false | 11,177 | r | #!/usr/bin/env Rscript
########################################
## filename: figure-regression.R
## author: Dylan Morris <dhmorris@princeton.edu>
## plot main regression figure for environmental
## conditions analysis
#######################################
suppressPackageStartupMessages(library(virusenv))
suppressPa... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/temporal_torus_translation.R
\name{shuffle_community}
\alias{shuffle_community}
\title{A function to generate a community dataframe with a random start time for each species}
\usage{
shuffle_community(comdat)
}
\arguments{
\item{comdat}{A com... | /man/shuffle_community.Rd | permissive | TankMermaid/codyn | R | false | true | 498 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/temporal_torus_translation.R
\name{shuffle_community}
\alias{shuffle_community}
\title{A function to generate a community dataframe with a random start time for each species}
\usage{
shuffle_community(comdat)
}
\arguments{
\item{comdat}{A com... |
pkg.list <- c("minpack.lm", "mosaic", "doParallel", "foreach")
success <- TRUE
for(pkg.name in pkg.list){
install.packages(pkg.name)
success <- success && require(package = pkg.name, quietly = TRUE, warn.conflicts = FALSE, character.only = TRUE)
}
if(success){
print("Packages were successfully installed and loa... | /Setup.Ca.Buffering.TLS.R | no_license | shanemcmahon/CalciumBufferingTLS | R | false | false | 440 | r | pkg.list <- c("minpack.lm", "mosaic", "doParallel", "foreach")
success <- TRUE
for(pkg.name in pkg.list){
install.packages(pkg.name)
success <- success && require(package = pkg.name, quietly = TRUE, warn.conflicts = FALSE, character.only = TRUE)
}
if(success){
print("Packages were successfully installed and loa... |
/4_RScripts/0_DefaultRScripts/KL - R Codes/AnaDo_MFA_Facto_VinsSenso_script.R | no_license | benksam/101_EnergyRproject | R | false | false | 1,821 | r | ||
RT_SpeedTest <- function(){
# Test the MATLAB trade-off between size and iterations,
# using data structure and number of iterations found in RTMf.m.
# The "small array" case is what it was in SCOPE v1.53 before my tinkering
#
# All of the subfunctions here will perform the same number of operations
#... | /RT_SpeedTest.r | no_license | akornfeld/Matrix-op_Speed_Test | R | false | false | 5,328 | r | RT_SpeedTest <- function(){
# Test the MATLAB trade-off between size and iterations,
# using data structure and number of iterations found in RTMf.m.
# The "small array" case is what it was in SCOPE v1.53 before my tinkering
#
# All of the subfunctions here will perform the same number of operations
#... |
#' Get the PageRank values for all nodes
#' @description Get the PageRank
#' values for all nodes in the graph.
#' @param graph a graph object of class
#' \code{dgr_graph}.
#' @param directed if \code{TRUE} (the
#' default) then directed paths will
#' be considered for directed graphs.
#' This is ignored for undirected... | /R/get_pagerank.R | permissive | FeifanXie/DiagrammeR | R | false | false | 1,837 | r | #' Get the PageRank values for all nodes
#' @description Get the PageRank
#' values for all nodes in the graph.
#' @param graph a graph object of class
#' \code{dgr_graph}.
#' @param directed if \code{TRUE} (the
#' default) then directed paths will
#' be considered for directed graphs.
#' This is ignored for undirected... |
#' @title rshared
#'
#' @description Generating data from Shared Component model
#'
#' @param alpha_1 intercept for disease 1.
#' @param alpha_2 intercept for disease 2.
#' @param beta_1 coefficients for disease 1.
#' @param beta_2 coefficients for disease 2.
#' @param delta dependence on the shared component.
#' @para... | /R/utils_sc.R | no_license | bandyopd/RASCO | R | false | false | 3,977 | r | #' @title rshared
#'
#' @description Generating data from Shared Component model
#'
#' @param alpha_1 intercept for disease 1.
#' @param alpha_2 intercept for disease 2.
#' @param beta_1 coefficients for disease 1.
#' @param beta_2 coefficients for disease 2.
#' @param delta dependence on the shared component.
#' @para... |
#' Pipe
#'
#' Use the pipe function, \code{\%>\%} to turn
#' function composition into a series of imperative statements.
#'
#' @importFrom magrittr %>%
#' @name %>%
#' @rdname pipe
#' @export
#' @keywords internal
#' @param lhs,rhs Pipe the output of \code{lhs} to the first input of \code{rhs}
#' @examples
#' 1 %>% `+... | /R/pipe.R | no_license | biodatacore/biodatacoreUtils | R | false | false | 963 | r | #' Pipe
#'
#' Use the pipe function, \code{\%>\%} to turn
#' function composition into a series of imperative statements.
#'
#' @importFrom magrittr %>%
#' @name %>%
#' @rdname pipe
#' @export
#' @keywords internal
#' @param lhs,rhs Pipe the output of \code{lhs} to the first input of \code{rhs}
#' @examples
#' 1 %>% `+... |
library(actuar)
### Name: InverseExponential
### Title: The Inverse Exponential Distribution
### Aliases: InverseExponential dinvexp pinvexp qinvexp rinvexp minvexp
### levinvexp
### Keywords: distribution
### ** Examples
exp(dinvexp(2, 2, log = TRUE))
p <- (1:10)/10
pinvexp(qinvexp(p, 2), 2)
minvexp(0.5, 2)
| /data/genthat_extracted_code/actuar/examples/InverseExponential.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 319 | r | library(actuar)
### Name: InverseExponential
### Title: The Inverse Exponential Distribution
### Aliases: InverseExponential dinvexp pinvexp qinvexp rinvexp minvexp
### levinvexp
### Keywords: distribution
### ** Examples
exp(dinvexp(2, 2, log = TRUE))
p <- (1:10)/10
pinvexp(qinvexp(p, 2), 2)
minvexp(0.5, 2)
|
if (packageVersion("memoise") <= "1.0.0") {
devtools::install_github("hadley/memoise")
}
library(memoise) # For avoiding redundante computations
library(lubridate) # For dates
library(progress) # For progress bar
library(topicmodels) # For LDA
library(ggplot2)
library(viridis)
library(nnet) # For mul... | /scripts/changepointmodel.r | no_license | weecology/LDATS-replications | R | false | false | 11,965 | r | if (packageVersion("memoise") <= "1.0.0") {
devtools::install_github("hadley/memoise")
}
library(memoise) # For avoiding redundante computations
library(lubridate) # For dates
library(progress) # For progress bar
library(topicmodels) # For LDA
library(ggplot2)
library(viridis)
library(nnet) # For mul... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting.R
\name{create_umap}
\alias{create_umap}
\title{Create a UMAP data.frame from a result object}
\usage{
create_umap(
result,
annotation,
n_neighbors = 30,
min_dist = 0.75,
spread = 1,
proportional = TRUE,
seed = FALSE
)
... | /man/create_umap.Rd | no_license | campbio/BAGEL | R | false | true | 1,599 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting.R
\name{create_umap}
\alias{create_umap}
\title{Create a UMAP data.frame from a result object}
\usage{
create_umap(
result,
annotation,
n_neighbors = 30,
min_dist = 0.75,
spread = 1,
proportional = TRUE,
seed = FALSE
)
... |
printf <- function(...) print(noquote(sprintf(...)))
install.packages("BiocManager", repos="https://cran.rstudio.com")
biocGet <- function(pkgs){
library(BiocManager)
BiocManager::install(pkgs, update=FALSE)
}
code.pkgs <- c("DT",
"shinyBS"
)
for(code.pkg in code.pkgs){
supp... | /services/noa-requests/lc/longevityGenes/shiny/installPrerequisites.R | permissive | PriceLab/nooa | R | false | false | 533 | r | printf <- function(...) print(noquote(sprintf(...)))
install.packages("BiocManager", repos="https://cran.rstudio.com")
biocGet <- function(pkgs){
library(BiocManager)
BiocManager::install(pkgs, update=FALSE)
}
code.pkgs <- c("DT",
"shinyBS"
)
for(code.pkg in code.pkgs){
supp... |
install.packages("tidyverse")
install.packages("rmarkdown")
install.packages("Hmisc")
install.packages("rms")
install.packages("mice")
install.packages("SNFtool")
install.packages("network")
install.packages("sna")
install.packages("ggsci")
install.packages("ggnetwork")
install.packages("here") | /install.R | permissive | edickie/kcni-school-lessons | R | false | false | 295 | r | install.packages("tidyverse")
install.packages("rmarkdown")
install.packages("Hmisc")
install.packages("rms")
install.packages("mice")
install.packages("SNFtool")
install.packages("network")
install.packages("sna")
install.packages("ggsci")
install.packages("ggnetwork")
install.packages("here") |
library(respirometry)
### Name: co2_flush
### Title: Calculate CO2 to add to flush reservoir
### Aliases: co2_flush
### ** Examples
# I want the respirometer to have a pCO2 = 1000 uatm. It currently has a pH of 7.6 and is 90 L.
# If I have a 200 L reservoir with pH = 7.9 seawater, how much CO2 do I need
# to add to... | /data/genthat_extracted_code/respirometry/examples/co2_flush.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 437 | r | library(respirometry)
### Name: co2_flush
### Title: Calculate CO2 to add to flush reservoir
### Aliases: co2_flush
### ** Examples
# I want the respirometer to have a pCO2 = 1000 uatm. It currently has a pH of 7.6 and is 90 L.
# If I have a 200 L reservoir with pH = 7.9 seawater, how much CO2 do I need
# to add to... |
# plot2.R
#
# Coursera Exploratory Data Analysis Course Project 1:
# Reads in electric power consumption data and draws plot 2.
#
# Read power data from file and return it as a data frame, suitable for
# plotting.
#
getPowerData <- function() {
# Read power consumption data from a file. Just read first 75 000
... | /plot2.R | no_license | easterhanu/ExData_Plotting1 | R | false | false | 2,042 | r | # plot2.R
#
# Coursera Exploratory Data Analysis Course Project 1:
# Reads in electric power consumption data and draws plot 2.
#
# Read power data from file and return it as a data frame, suitable for
# plotting.
#
getPowerData <- function() {
# Read power consumption data from a file. Just read first 75 000
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/statuses.repost_by_me.R
\name{statuses.repost_by_me}
\alias{statuses.repost_by_me}
\title{Return the latest N reposted weibos by the authenticating user.}
\usage{
statuses.repost_by_me(roauth, count = 20, page = 1, ...)
}
\arguments{
\item{ro... | /man/statuses.repost_by_me.Rd | no_license | sjhfx/Rweibo | R | false | true | 1,658 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/statuses.repost_by_me.R
\name{statuses.repost_by_me}
\alias{statuses.repost_by_me}
\title{Return the latest N reposted weibos by the authenticating user.}
\usage{
statuses.repost_by_me(roauth, count = 20, page = 1, ...)
}
\arguments{
\item{ro... |
list.of.packages <- c("ggplot2", "Rcpp", "tseries","lmtest","TSA","forecast","zoo","rugarch","ccgarch")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)
| /QuantitativeFinance/PythonFiles/20190923QMF/packages_manager.R | no_license | matthieumuchu/PythonFinanceClass | R | false | false | 254 | r | list.of.packages <- c("ggplot2", "Rcpp", "tseries","lmtest","TSA","forecast","zoo","rugarch","ccgarch")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/video_box.R
\name{video_box}
\alias{video_box}
\alias{video_tag}
\title{Adds a video box to the app}
\usage{
video_box(id, src, title = NULL, type = "video/mp4")
video_tag(id, time = NULL, title = NULL)
}
\arguments{
\item{id}{id of the vide... | /man/video_box.Rd | no_license | mmoisse/dqshiny | R | false | true | 1,436 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/video_box.R
\name{video_box}
\alias{video_box}
\alias{video_tag}
\title{Adds a video box to the app}
\usage{
video_box(id, src, title = NULL, type = "video/mp4")
video_tag(id, time = NULL, title = NULL)
}
\arguments{
\item{id}{id of the vide... |
#################################### read files and recursively plot ################
rm(list=ls())
args <- commandArgs(trailingOnly=TRUE)
## read all known results file
all_known_dat = read.delim(args[1], header=TRUE, sep='\t')
## graph type
graph_type = args[2]
## outpath
outpath = args[3]
cat (outpath)
## TF name
t... | /3_ETRM_inference/code-input/scripts/R_script/Recursive_motif_plot.R | no_license | Gavin-Yinld/brain_TF | R | false | false | 2,228 | r | #################################### read files and recursively plot ################
rm(list=ls())
args <- commandArgs(trailingOnly=TRUE)
## read all known results file
all_known_dat = read.delim(args[1], header=TRUE, sep='\t')
## graph type
graph_type = args[2]
## outpath
outpath = args[3]
cat (outpath)
## TF name
t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplot2_themes.R
\name{theme_junebug_clean}
\alias{theme_junebug_clean}
\title{ggplot2 theme inspired by \code{theme_classic()}}
\usage{
theme_junebug_clean(base_size = 12, ...)
}
\arguments{
\item{base_size}{Defaults to 12 (like all complete... | /man/theme_junebug_clean.Rd | permissive | yjunechoe/junebug | R | false | true | 454 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplot2_themes.R
\name{theme_junebug_clean}
\alias{theme_junebug_clean}
\title{ggplot2 theme inspired by \code{theme_classic()}}
\usage{
theme_junebug_clean(base_size = 12, ...)
}
\arguments{
\item{base_size}{Defaults to 12 (like all complete... |
createJunction.default <-
function(name="Unttitled",downstream=NA,inflow=NA,delayInflow=1)
{
if(!any(class(downstream)==c('createJunction','createDiversion','createReservoir','createSubbasin','createReach')))
{
if(!is.na(downstream)) stop('Bad object specified as downstream!')
}
if(any(class(do... | /R/createJunction.default.R | no_license | cran/RHMS | R | false | false | 668 | r | createJunction.default <-
function(name="Unttitled",downstream=NA,inflow=NA,delayInflow=1)
{
if(!any(class(downstream)==c('createJunction','createDiversion','createReservoir','createSubbasin','createReach')))
{
if(!is.na(downstream)) stop('Bad object specified as downstream!')
}
if(any(class(do... |
#!/usr/bin/env Rscript
# Author: Ethan D. Evans, 2018 [eevans@mit.edu]
# Code influenced by / borrowed from Claire Duvallet / Krista Longnecker
# Requires that data is in either: mzML, mzXML or mzData format.
library(xcms)
library(CAMERA)
library(optparse)
# to get the file with the file names:
# echo ... | /3_xcms/extract_features_xcms3.R | no_license | OmicsAcademy/Metabolomics_ML | R | false | false | 7,417 | r | #!/usr/bin/env Rscript
# Author: Ethan D. Evans, 2018 [eevans@mit.edu]
# Code influenced by / borrowed from Claire Duvallet / Krista Longnecker
# Requires that data is in either: mzML, mzXML or mzData format.
library(xcms)
library(CAMERA)
library(optparse)
# to get the file with the file names:
# echo ... |
library(ape)
testtree <- read.tree("9918_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="9918_0_unrooted.txt") | /codeml_files/newick_trees_processed/9918_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("9918_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="9918_0_unrooted.txt") |
#!/usr/bin/env Rscript
# channel shear particle tracking
name <- 'single_vortex'
nd <- 2 # dimensions
np <- 50000 # particles
nv <- 1 # vortexes
nt <- 200 # timesteps
nb <- 150 #number of bins
dt <- 1 # timestep
nc <- 2 # number of constituent
A <- 1.5 #Vortex rate
B <- 1 ... | /transport-remix/particle-tracking/single_vortex.R | no_license | cameronbracken/classy | R | false | false | 3,704 | r | #!/usr/bin/env Rscript
# channel shear particle tracking
name <- 'single_vortex'
nd <- 2 # dimensions
np <- 50000 # particles
nv <- 1 # vortexes
nt <- 200 # timesteps
nb <- 150 #number of bins
dt <- 1 # timestep
nc <- 2 # number of constituent
A <- 1.5 #Vortex rate
B <- 1 ... |
library(ggplot2)
library(extrafont)
font_import(pattern = "D2")
theme_set(theme_grey(base_family = "D2Coding"))
ggplot(mtcars, aes(cyl)) +
geom_bar(
width = 0.7,
fill = "green"
)
| /bigdata_ai_study/chapter_8/8.R | no_license | himitery/dankook | R | false | false | 205 | r | library(ggplot2)
library(extrafont)
font_import(pattern = "D2")
theme_set(theme_grey(base_family = "D2Coding"))
ggplot(mtcars, aes(cyl)) +
geom_bar(
width = 0.7,
fill = "green"
)
|
library(MBSGS)
### Name: BSGSSS
### Title: Bayesian Sparse Group Selection with Spike and Slab priors
### Aliases: BSGSSS
### Keywords: regression
### ** Examples
## Simulation of datasets X and Y with group variables
set.seed(1)
data1 = gen_data_uni(nsample = 120,cor.var=0.5, ntrain = 80)
data1 = normalize(data1)... | /data/genthat_extracted_code/MBSGS/examples/BSGSSS.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 678 | r | library(MBSGS)
### Name: BSGSSS
### Title: Bayesian Sparse Group Selection with Spike and Slab priors
### Aliases: BSGSSS
### Keywords: regression
### ** Examples
## Simulation of datasets X and Y with group variables
set.seed(1)
data1 = gen_data_uni(nsample = 120,cor.var=0.5, ntrain = 80)
data1 = normalize(data1)... |
#' @keywords internal
proc_generic_module_old <- function(df, col_acc, col_condition, by_factor = TRUE) {
# overall & broken-down by condition
rt = proc_by_condition(df, COL_RT, col_condition, FUN = ace_descriptive_statistics)
rw = proc_by_condition(df, COL_RW, col_condition, FUN = ace_descriptive_statistics)
... | /R/module-constants.R | permissive | jorodondi/aceR | R | false | false | 5,602 | r |
#' @keywords internal
proc_generic_module_old <- function(df, col_acc, col_condition, by_factor = TRUE) {
# overall & broken-down by condition
rt = proc_by_condition(df, COL_RT, col_condition, FUN = ace_descriptive_statistics)
rw = proc_by_condition(df, COL_RW, col_condition, FUN = ace_descriptive_statistics)
... |
#'Main Function used for estimating causal parameters under the Rank Preserving Structural Failure Time Model
#'
#'@export
#'@title Rank Preserving Structural Failure Time Model
#'@name rpsftm
#'@inheritParams untreated
#'@inheritParams est_eqn
#'@param formula a formula with a minimal structure of \code{Surv(time, sta... | /R/rpsftm.R | no_license | shug0131/rpsftm | R | false | false | 13,573 | r | #'Main Function used for estimating causal parameters under the Rank Preserving Structural Failure Time Model
#'
#'@export
#'@title Rank Preserving Structural Failure Time Model
#'@name rpsftm
#'@inheritParams untreated
#'@inheritParams est_eqn
#'@param formula a formula with a minimal structure of \code{Surv(time, sta... |
#' @export
partitionNEEGL <- function(
### Partition NEE fluxes into GP and Reco using the daytime method.
ds ##<< dataset with all the specified input columns
## and full days in equidistant times
, NEEVar = if (!missing(NEEVar.s)) NEEVar.s else paste0('NEE', suffixDash, '_f') ##<< Variable of NEE
,... | /R/PartitioningLasslop10.R | no_license | cran/REddyProc | R | false | false | 57,915 | r | #' @export
partitionNEEGL <- function(
### Partition NEE fluxes into GP and Reco using the daytime method.
ds ##<< dataset with all the specified input columns
## and full days in equidistant times
, NEEVar = if (!missing(NEEVar.s)) NEEVar.s else paste0('NEE', suffixDash, '_f') ##<< Variable of NEE
,... |
#' @importFrom dplyr case_when matches ends_with starts_with funs
NULL
| /R/import_funs.R | no_license | weinstockj/covid19-labWAS | R | false | false | 71 | r | #' @importFrom dplyr case_when matches ends_with starts_with funs
NULL
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MLmetrics.R
\docType{package}
\name{MLmetrics}
\alias{MLmetrics}
\alias{MLmetrics-package}
\title{MLmetrics: Machine Learning Evaluation Metrics}
\description{
A collection of evaluation metrics, including loss, score and utility func... | /man/MLmetrics.Rd | no_license | cran/MLmetrics | R | false | true | 391 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MLmetrics.R
\docType{package}
\name{MLmetrics}
\alias{MLmetrics}
\alias{MLmetrics-package}
\title{MLmetrics: Machine Learning Evaluation Metrics}
\description{
A collection of evaluation metrics, including loss, score and utility func... |
library(rnoaa)
### Name: meteo_pull_monitors
### Title: Pull GHCND weather data for multiple weather monitors
### Aliases: meteo_pull_monitors
### ** Examples
## Not run:
##D
##D monitors <- c("ASN00003003", "ASM00094299", "ASM00094995", "ASM00094998")
##D all_monitors_clean <- meteo_pull_monitors(monitors)
##D
... | /data/genthat_extracted_code/rnoaa/examples/meteo_pull_monitors.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 340 | r | library(rnoaa)
### Name: meteo_pull_monitors
### Title: Pull GHCND weather data for multiple weather monitors
### Aliases: meteo_pull_monitors
### ** Examples
## Not run:
##D
##D monitors <- c("ASN00003003", "ASM00094299", "ASM00094995", "ASM00094998")
##D all_monitors_clean <- meteo_pull_monitors(monitors)
##D
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/internaldbs.R
\name{MassSM}
\alias{MassSM}
\title{Calculate formula and mass of sphingomyelines}
\usage{
MassSM(SM)
}
\arguments{
\item{SM}{character value indicating total number of carbons and double
bounds}
}
\value{
vector co... | /man/MassSM.Rd | no_license | cran/LipidMS | R | false | true | 499 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/internaldbs.R
\name{MassSM}
\alias{MassSM}
\title{Calculate formula and mass of sphingomyelines}
\usage{
MassSM(SM)
}
\arguments{
\item{SM}{character value indicating total number of carbons and double
bounds}
}
\value{
vector co... |
tabPanel('Independent Sample t', value = 'tab_indttest',
fluidPage(
fluidRow(
column(6, align = 'left',
h4('Independent Sample t Test'),
p('Compare the means of two independent groups in order to determine
whether there is statistical evidence that the associated population ... | /inferr/inst/application/ui/ui_indttest.R | permissive | akhikolla/TestedPackages-NoIssues | R | false | false | 2,798 | r | tabPanel('Independent Sample t', value = 'tab_indttest',
fluidPage(
fluidRow(
column(6, align = 'left',
h4('Independent Sample t Test'),
p('Compare the means of two independent groups in order to determine
whether there is statistical evidence that the associated population ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{scraper_licitacao}
\alias{scraper_licitacao}
\title{Scraper para extrair dados do Portal de Informações para Todos (PIT) - Dados Abertos - do Tribunal
de Contas do Estado do Paraná (TCE/PR).}
\usage{
scraper_licitacao(ano = ... | /man/scraper_licitacao.Rd | no_license | PauloJhonny/LicitaR | R | false | true | 1,024 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{scraper_licitacao}
\alias{scraper_licitacao}
\title{Scraper para extrair dados do Portal de Informações para Todos (PIT) - Dados Abertos - do Tribunal
de Contas do Estado do Paraná (TCE/PR).}
\usage{
scraper_licitacao(ano = ... |
#' Supervised Factor Conversions into Linear Functions using Bayesian Likelihood
#' Encodings
#'
#' `step_lencode_mixed()` creates a *specification* of a recipe step that will
#' convert a nominal (i.e. factor) predictor into a single set of scores derived
#' from a generalized linear mixed model.
#'
#' @param recipe A... | /R/lencode_mixed.R | permissive | tidymodels/embed | R | false | false | 9,135 | r | #' Supervised Factor Conversions into Linear Functions using Bayesian Likelihood
#' Encodings
#'
#' `step_lencode_mixed()` creates a *specification* of a recipe step that will
#' convert a nominal (i.e. factor) predictor into a single set of scores derived
#' from a generalized linear mixed model.
#'
#' @param recipe A... |
source("libraries.R")
setwd("Prepared Data")
islam_data <- read.csv("islam_barplot_data.csv", stringsAsFactors = FALSE)
mydata <- read.csv("islam_data.csv", stringsAsFactors = FALSE)
setwd('..')
################################################
bp <- barplot(t(as.matrix(islam_data[2:3])),
... | /PADR PD3/analysis_islam.R | no_license | przszczecinski/PADR-PD3 | R | false | false | 2,457 | r | source("libraries.R")
setwd("Prepared Data")
islam_data <- read.csv("islam_barplot_data.csv", stringsAsFactors = FALSE)
mydata <- read.csv("islam_data.csv", stringsAsFactors = FALSE)
setwd('..')
################################################
bp <- barplot(t(as.matrix(islam_data[2:3])),
... |
library(lenses)
### Name: names_l
### Title: A lens into the names of an object
### Aliases: names_l
### Keywords: datasets
### ** Examples
view(iris, names_l)
head(set(iris, names_l, LETTERS[1:5]))
| /data/genthat_extracted_code/lenses/examples/names_l.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 206 | r | library(lenses)
### Name: names_l
### Title: A lens into the names of an object
### Aliases: names_l
### Keywords: datasets
### ** Examples
view(iris, names_l)
head(set(iris, names_l, LETTERS[1:5]))
|
context("check null model lmm")
test_that("lmm - with group", {
dat <- .testNullInputs()
nullmod <- fitNullMod(dat$y, dat$X, dat$cor.mat, group.idx=dat$group.idx, verbose=FALSE)
expect_equal(nullmod$family$family, "gaussian")
expect_true(nullmod$family$mixedmodel)
expect_true(nullmod$hetResid... | /tests/testthat/test_null_model_lmm.R | no_license | UW-GAC/genesis2_tests | R | false | false | 1,558 | r | context("check null model lmm")
test_that("lmm - with group", {
dat <- .testNullInputs()
nullmod <- fitNullMod(dat$y, dat$X, dat$cor.mat, group.idx=dat$group.idx, verbose=FALSE)
expect_equal(nullmod$family$family, "gaussian")
expect_true(nullmod$family$mixedmodel)
expect_true(nullmod$hetResid... |
## chi-square tests and t-tests
load(file = '/export/home/xurren/WTCProject/Data/clinical533_reordered.RData') ## load clinical data
race1 = rep(NA, dim(clinical)[1])
race1[clinical$race==1] = 1
race1[clinical$race>1] = 0
race1[is.na(clinical$race)] = 1 ## assume NA is white
race1 = factor(race1)
levels(race1) = c... | /Renxu/chisq_test_and_ttest_09.05.2017.R | no_license | chang-che/Work | R | false | false | 1,440 | r | ## chi-square tests and t-tests
load(file = '/export/home/xurren/WTCProject/Data/clinical533_reordered.RData') ## load clinical data
race1 = rep(NA, dim(clinical)[1])
race1[clinical$race==1] = 1
race1[clinical$race>1] = 0
race1[is.na(clinical$race)] = 1 ## assume NA is white
race1 = factor(race1)
levels(race1) = c... |
library(lme4)
library(reshape)
library(foreign)
library(ggplot2)
library(plyr)
library(data.table)
#library(reshape2)
library(Hmisc)
library(mgcv)
library(gdata)
library(car)
library(dplyr)
library(ggmap)
library(broom)
library(splines)
library(DataCombine)
#sourcing
source("/media/NAS/Uni/org/files/... | /Uni/Projects/code/P031.MAIAC.France/archive/tangtest.r | no_license | zeltak/org | R | false | false | 18,800 | r | library(lme4)
library(reshape)
library(foreign)
library(ggplot2)
library(plyr)
library(data.table)
#library(reshape2)
library(Hmisc)
library(mgcv)
library(gdata)
library(car)
library(dplyr)
library(ggmap)
library(broom)
library(splines)
library(DataCombine)
#sourcing
source("/media/NAS/Uni/org/files/... |
context("wrapper.R : staticListRequestSet function")
test_that("test of myStaticRequestSet with a date returned", {
if(Sys.getenv("DatastreamUsername") == ""){
skip("Username not available")
}
skip_on_cran()
expect_silent(
adf <- DatastreamDSWS2R:::myStaticRequestSet(mydsws = DatastreamDSWS2R::dsws$... | /tests/testthat/test-wrapper-staticListRequestSet.R | permissive | GreenGrassBlueOcean/DatastreamDSWS2R | R | false | false | 3,635 | r | context("wrapper.R : staticListRequestSet function")
test_that("test of myStaticRequestSet with a date returned", {
if(Sys.getenv("DatastreamUsername") == ""){
skip("Username not available")
}
skip_on_cran()
expect_silent(
adf <- DatastreamDSWS2R:::myStaticRequestSet(mydsws = DatastreamDSWS2R::dsws$... |
# Preload required R librabires
library(tm)
library(ggplot2)
library(RWeka)
library(R.utils)
library(dplyr)
library(parallel)
library(wordcloud)
con1 <- file("C:/Users/ABHISHEK PATRA/Documents/capstone-master/final/en_US/en_US.twitter.txt", open = "rb")
twitter <- readLines(con1, skipNul = TRUE, encoding="UT... | /main R codes.R | no_license | avickypatra/Data-Science-Capstone | R | false | false | 5,248 | r | # Preload required R librabires
library(tm)
library(ggplot2)
library(RWeka)
library(R.utils)
library(dplyr)
library(parallel)
library(wordcloud)
con1 <- file("C:/Users/ABHISHEK PATRA/Documents/capstone-master/final/en_US/en_US.twitter.txt", open = "rb")
twitter <- readLines(con1, skipNul = TRUE, encoding="UT... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/kantorovich.R
\name{names.bigq}
\alias{names.bigq}
\title{Names for bigq vectors}
\usage{
\method{names}{bigq}(x)
}
\arguments{
\item{x}{a \code{bigq} vector}
}
\value{
the names of \code{x}
}
\description{
Names for bigq vecto... | /man/names.bigq.Rd | no_license | cran/kantorovich | R | false | true | 327 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/kantorovich.R
\name{names.bigq}
\alias{names.bigq}
\title{Names for bigq vectors}
\usage{
\method{names}{bigq}(x)
}
\arguments{
\item{x}{a \code{bigq} vector}
}
\value{
the names of \code{x}
}
\description{
Names for bigq vecto... |
.onLoad <- function(libname, pkgname){
packageStartupMessage("Data and scripts
to open the code run:
file.edit(paste0(.libPaths(), '/BTswaps2020/data.r'))
to open the code for randomisations run:
file.edit(paste0(.libPaths(), '/BTswaps2020/random.r'))")
}
| /R/aaa.R | no_license | psantema/BTswaps2020 | R | false | false | 267 | r | .onLoad <- function(libname, pkgname){
packageStartupMessage("Data and scripts
to open the code run:
file.edit(paste0(.libPaths(), '/BTswaps2020/data.r'))
to open the code for randomisations run:
file.edit(paste0(.libPaths(), '/BTswaps2020/random.r'))")
}
|
###########################################################################
###########################################################################
###########################################################################
###########################################################################
####### Script f... | /simulations/msms_sims/l3000/simulationsl3000.r | no_license | bbitarello/NCV | R | false | false | 12,632 | r | ###########################################################################
###########################################################################
###########################################################################
###########################################################################
####### Script f... |
#-------------------------------------------------------------------------------
# VECTORS SPHERICAL WAVE FUNCTIONS EXPANSION
#-------------------------------------------------------------------------------
vswf.pwe<-function(k,x,y,z,lmax,gte,gtm)
{
x[x==0]<-.Machine$double.xmin
y[y==0]<-.Machine$double.xmin
z[z==0]<-.... | /R/vswf.pwe.r | no_license | aneves76/rvswf | R | false | false | 864 | r | #-------------------------------------------------------------------------------
# VECTORS SPHERICAL WAVE FUNCTIONS EXPANSION
#-------------------------------------------------------------------------------
vswf.pwe<-function(k,x,y,z,lmax,gte,gtm)
{
x[x==0]<-.Machine$double.xmin
y[y==0]<-.Machine$double.xmin
z[z==0]<-.... |
library(multifluo)
### Name: plotzone
### Title: Plotting the different selected zones on an image
### Aliases: plotzone
### ** Examples
data(zones)
plotzone(zones)
| /data/genthat_extracted_code/multifluo/examples/plotzone.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 172 | r | library(multifluo)
### Name: plotzone
### Title: Plotting the different selected zones on an image
### Aliases: plotzone
### ** Examples
data(zones)
plotzone(zones)
|
rm(list=ls())
setwd("~/ikanx101.github.io/_posts/linear problem/post 16")
library(dplyr)
library(tidyr)
library(ompr)
library(ompr.roi)
library(ROI.plugin.glpk)
load("soal 2.rda")
# 4 pekerja
# 4 hari
# 7 jam
# max 2 jam max 2 kali
# decision variable
# pekerja : i = 1:4
# hari : j = 1:4
# kegiatan : k = 1:... | /_posts/linear problem/post 16/Solver.R | no_license | ikanx101/ikanx101.github.io | R | false | false | 2,068 | r | rm(list=ls())
setwd("~/ikanx101.github.io/_posts/linear problem/post 16")
library(dplyr)
library(tidyr)
library(ompr)
library(ompr.roi)
library(ROI.plugin.glpk)
load("soal 2.rda")
# 4 pekerja
# 4 hari
# 7 jam
# max 2 jam max 2 kali
# decision variable
# pekerja : i = 1:4
# hari : j = 1:4
# kegiatan : k = 1:... |
testlist <- list(a = 0L, b = 0L, x = 1027473408L)
result <- do.call(grattan:::anyOutside,testlist)
str(result) | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610130157-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 110 | r | testlist <- list(a = 0L, b = 0L, x = 1027473408L)
result <- do.call(grattan:::anyOutside,testlist)
str(result) |
rtest <- function() {
hdfs_name_node = hadoop.namenode()
hdfs_airlines_file = "/datasets/airlines_all.csv"
#----------------------------------------------------------------------
# Single file cases.
#----------------------------------------------------------------------
heading("Testing single file importHDFS")
u... | /h2o-r/tests/testdir_misc/runit_INTERNAL_airlines_xlarge.R | permissive | StephRoark/h2o-3 | R | false | false | 2,426 | r |
rtest <- function() {
hdfs_name_node = hadoop.namenode()
hdfs_airlines_file = "/datasets/airlines_all.csv"
#----------------------------------------------------------------------
# Single file cases.
#----------------------------------------------------------------------
heading("Testing single file importHDFS")
u... |
#libraries required
library(gbm)
library(dplyr)
library(data.table)
# functions
mcloss <- function (y_actual, y_pred) {
dat <- rep(0, length(y_actual))
for(i in 1:length(y_actual)){
dat_x <- y_pred[i,y_actual[i,1],1]
dat[i] <- max(1e-15,min(1-1e-15,dat_x))
}
... | /train_models_no_caret.R | no_license | jasebris03/GBMTrainingShell | R | false | false | 6,526 | r | #libraries required
library(gbm)
library(dplyr)
library(data.table)
# functions
mcloss <- function (y_actual, y_pred) {
dat <- rep(0, length(y_actual))
for(i in 1:length(y_actual)){
dat_x <- y_pred[i,y_actual[i,1],1]
dat[i] <- max(1e-15,min(1-1e-15,dat_x))
}
... |
\name{NEWS}
\title{dbarts News}
\encoding{UTF-8}
\section{CHANGES IN VERSION 0.9-9}{
\subsection{OPTIMIZATIONS}{
\itemize{
\item Stores \code{x} as integer matrix of the max of which cut point an observation is
to the left of, by default using 16 bit integers. Limited to 65535 cut points
... | /inst/NEWS.Rd | no_license | andrewherren/dbarts | R | false | false | 6,388 | rd | \name{NEWS}
\title{dbarts News}
\encoding{UTF-8}
\section{CHANGES IN VERSION 0.9-9}{
\subsection{OPTIMIZATIONS}{
\itemize{
\item Stores \code{x} as integer matrix of the max of which cut point an observation is
to the left of, by default using 16 bit integers. Limited to 65535 cut points
... |
y= read.csv("28.csv")
y$s155f = (1-(y$s155/y$b)^(-1))*100
y$s163f = (1-(y$s163/y$b)^(-1))*100
y$s999f = (1-(y$s999/y$b)^(-1))*100
write.csv(y, file = "28f.csv")
z = read.csv("28f.csv")
| /28.R | no_license | YujiaT/EPS | R | false | false | 188 | r | y= read.csv("28.csv")
y$s155f = (1-(y$s155/y$b)^(-1))*100
y$s163f = (1-(y$s163/y$b)^(-1))*100
y$s999f = (1-(y$s999/y$b)^(-1))*100
write.csv(y, file = "28f.csv")
z = read.csv("28f.csv")
|
#' A function to generate and save blocks of document term vectors to coherently named files from a variety of inputs.
#'
#' @param input A list of strings, term vectors, raw documents, or csv files you wish to turn into document term vectors.
#' @param output_stem The the stem of the file name we wish to give each blo... | /R/generate_blocked_document_term_vectors.R | no_license | bethanyleap/SpeedReader | R | false | false | 3,940 | r | #' A function to generate and save blocks of document term vectors to coherently named files from a variety of inputs.
#'
#' @param input A list of strings, term vectors, raw documents, or csv files you wish to turn into document term vectors.
#' @param output_stem The the stem of the file name we wish to give each blo... |
#
# Copyright 2007-2018 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 ... | /R/MxFitFunction.R | no_license | mileysmiley/OpenMx | R | false | false | 6,285 | r | #
# Copyright 2007-2018 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 ... |
#' @name plots
#'
#' @title Visualization of gene expression
#'
#' @description Visualization of differential gene expression via heatmap, p-value histogram
#' and volcano plot (fold change vs. p-value).
#'
#'
#' @param p Numeric vector of p-values for each gene.
#' @param fc Numeric vector of fold changes (typical... | /R/plots.R | no_license | lgeistlinger/EnrichmentBrowser | R | false | false | 2,557 | r | #' @name plots
#'
#' @title Visualization of gene expression
#'
#' @description Visualization of differential gene expression via heatmap, p-value histogram
#' and volcano plot (fold change vs. p-value).
#'
#'
#' @param p Numeric vector of p-values for each gene.
#' @param fc Numeric vector of fold changes (typical... |
# Cast object to data.table, or if already a data.table, make a copy so we don't
# modify by reference
getDT <- function(x) {
if (is.data.table(x)) {
copy(x)
} else {
as.data.table(x)
}
}
# If a user is not using the data.table package (i.e. its not loaded by the user
# in their R session) make sure to r... | /R/utils.R | permissive | sritchie73/ukbnmr | R | false | false | 3,715 | r | # Cast object to data.table, or if already a data.table, make a copy so we don't
# modify by reference
getDT <- function(x) {
if (is.data.table(x)) {
copy(x)
} else {
as.data.table(x)
}
}
# If a user is not using the data.table package (i.e. its not loaded by the user
# in their R session) make sure to r... |
#Code for extracting NDWI data from google earth engine
library(terra)
#' @author Brian Maitner
#' @description This function will download the most recent MODIS NDWI layer
#' @import rgee piggyback sf
#' @param directory directory to save data in. Defaults to "data/temp/raw_data/NDWI_MODIS/"
#' @param domain domain (... | /R/get_release_ndwi_modis.R | permissive | AdamWilsonLab/emma_envdata | R | false | false | 3,225 | r | #Code for extracting NDWI data from google earth engine
library(terra)
#' @author Brian Maitner
#' @description This function will download the most recent MODIS NDWI layer
#' @import rgee piggyback sf
#' @param directory directory to save data in. Defaults to "data/temp/raw_data/NDWI_MODIS/"
#' @param domain domain (... |
local({
# the requested version of renv
version <- "0.12.0"
# the project directory
project <- getwd()
# avoid recursion
if (!is.na(Sys.getenv("RENV_R_INITIALIZING", unset = NA)))
return(invisible(TRUE))
# signal that we're loading renv during R startup
Sys.setenv("RENV_R_INITIALIZING" = "true"... | /renv/activate.R | no_license | maskegger/cbShinyDemo | R | false | false | 11,340 | r |
local({
# the requested version of renv
version <- "0.12.0"
# the project directory
project <- getwd()
# avoid recursion
if (!is.na(Sys.getenv("RENV_R_INITIALIZING", unset = NA)))
return(invisible(TRUE))
# signal that we're loading renv during R startup
Sys.setenv("RENV_R_INITIALIZING" = "true"... |
# Sandbox for the Rmd.
library(caret)
library(ggplot2)
library(reshape2)
library(gridExtra)
library(gbm)
library(randomForest)
library(kableExtra)
if (!dir.exists("data")) {
dir.create("data")
}
download.file(url = "https://d396qusza40orc.cloudfront.net/predmachlearn/pml-training.csv",
d... | /_Classroom/DSC8-PracticalMachineLearning/raw.R | no_license | maltejet/DataScience | R | false | false | 14,843 | r | # Sandbox for the Rmd.
library(caret)
library(ggplot2)
library(reshape2)
library(gridExtra)
library(gbm)
library(randomForest)
library(kableExtra)
if (!dir.exists("data")) {
dir.create("data")
}
download.file(url = "https://d396qusza40orc.cloudfront.net/predmachlearn/pml-training.csv",
d... |
library(SARP.compo)
### Name: tests
### Title: Utility functions to obtain p-values from tests on individual
### ratios
### Aliases: tests anva1.fpc anva1vi.fpc rls.fpc kw.fpc anva_SC.fpc
### student.fpc
### Keywords: compositional
### ** Examples
# load the potery data set
data( poteries )
# Compute ... | /data/genthat_extracted_code/SARP.compo/examples/test.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 582 | r | library(SARP.compo)
### Name: tests
### Title: Utility functions to obtain p-values from tests on individual
### ratios
### Aliases: tests anva1.fpc anva1vi.fpc rls.fpc kw.fpc anva_SC.fpc
### student.fpc
### Keywords: compositional
### ** Examples
# load the potery data set
data( poteries )
# Compute ... |
#' Map agreement
#'
#' @title aa_card
#' @description Calculates Agreement and Area of disproportioned sampling
#' @param data confusion matrix or cbind(reference,map)
#' @param w stratum weights
#' @param A total area (optional)
#' @param confusion_matrix define if data contains a confusion matrix or sample vectors
#'... | /rscripts/GWA_TBX/aa_card.R | no_license | GlobWetlandAfrica/GWA_scripts | R | false | false | 4,255 | r | #' Map agreement
#'
#' @title aa_card
#' @description Calculates Agreement and Area of disproportioned sampling
#' @param data confusion matrix or cbind(reference,map)
#' @param w stratum weights
#' @param A total area (optional)
#' @param confusion_matrix define if data contains a confusion matrix or sample vectors
#'... |
library(changepoint)
### Name: decision
### Title: Decision Function - Only intended for developer use.
### Aliases: decision
### Keywords: methods univar models ts
### ** Examples
# Example of finding a change
out=c(100,765.1905,435.6529) # tau, null, alt
decision(out[1],out[2],out[3],penalty="SIC",n=200,diffparam... | /data/genthat_extracted_code/changepoint/examples/decision.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 527 | r | library(changepoint)
### Name: decision
### Title: Decision Function - Only intended for developer use.
### Aliases: decision
### Keywords: methods univar models ts
### ** Examples
# Example of finding a change
out=c(100,765.1905,435.6529) # tau, null, alt
decision(out[1],out[2],out[3],penalty="SIC",n=200,diffparam... |
library(mscstts)
### Name: ms_locales
### Title: Locales for Microsoft Translate
### Aliases: ms_locales ms_locale_df ms_languages ms_language_codes
### ** Examples
ms_locales()
| /data/genthat_extracted_code/mscstts/examples/ms_locales.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 185 | r | library(mscstts)
### Name: ms_locales
### Title: Locales for Microsoft Translate
### Aliases: ms_locales ms_locale_df ms_languages ms_language_codes
### ** Examples
ms_locales()
|
##read data
data <- read.table("household_power_consumption.txt", sep = ";", na.strings = "?", header = TRUE)
##data within 2/1 - 2/2/07
data$date2 <- strptime(data$Date, "%d/%m/%Y")
x <- subset(data, data$date2 %in% c('2007-02-01','2007-02-02' ))
## create a date with time field
x$datetime <- strptime(paste(x$Date, ... | /plot3.R | no_license | lhewlett/ExData_Plotting1 | R | false | false | 848 | r | ##read data
data <- read.table("household_power_consumption.txt", sep = ";", na.strings = "?", header = TRUE)
##data within 2/1 - 2/2/07
data$date2 <- strptime(data$Date, "%d/%m/%Y")
x <- subset(data, data$date2 %in% c('2007-02-01','2007-02-02' ))
## create a date with time field
x$datetime <- strptime(paste(x$Date, ... |
library(NISTunits)
### Name: NISTjoulePerSqrMeterTOukThUnthPerSqrFt
### Title: Convert joule per square meter to British thermal unitth per
### square foot
### Aliases: NISTjoulePerSqrMeterTOukThUnthPerSqrFt
### Keywords: programming
### ** Examples
NISTjoulePerSqrMeterTOukThUnthPerSqrFt(10)
| /data/genthat_extracted_code/NISTunits/examples/NISTjoulePerSqrMeterTOukThUnthPerSqrFt.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 302 | r | library(NISTunits)
### Name: NISTjoulePerSqrMeterTOukThUnthPerSqrFt
### Title: Convert joule per square meter to British thermal unitth per
### square foot
### Aliases: NISTjoulePerSqrMeterTOukThUnthPerSqrFt
### Keywords: programming
### ** Examples
NISTjoulePerSqrMeterTOukThUnthPerSqrFt(10)
|
#------------------------#
# UI part of TiSAn-build #
#------------------------#
# install required packages if needed
if(!require(plotly)) install.packages('plotly')
if(!require(shinyFiles)) install.packages('shinyFiles')
shinyUI(fluidPage(#theme = "bootstrap.css",
titlePanel("TiSAn-build: train your Tissue Spe... | /TiSAn-build/ui.R | permissive | kevinVervier/TiSAn | R | false | false | 5,896 | r | #------------------------#
# UI part of TiSAn-build #
#------------------------#
# install required packages if needed
if(!require(plotly)) install.packages('plotly')
if(!require(shinyFiles)) install.packages('shinyFiles')
shinyUI(fluidPage(#theme = "bootstrap.css",
titlePanel("TiSAn-build: train your Tissue Spe... |
require(rjags)
require(runjags)
require(bayesplot)
color_scheme_set("brightblue")
bayesplot_theme_set()
############ data prep ##############
# Load data and fill NAs.
setwd('C:/Users/johnd/OneDrive/Documents/TDI_project')
data <- read.csv('counties_person_hours_areas.csv')
# Remove those with 0 electrical fires rec... | /regression_rjags.R | no_license | johndavidevans/PGE_wildfire_analysis | R | false | false | 4,913 | r | require(rjags)
require(runjags)
require(bayesplot)
color_scheme_set("brightblue")
bayesplot_theme_set()
############ data prep ##############
# Load data and fill NAs.
setwd('C:/Users/johnd/OneDrive/Documents/TDI_project')
data <- read.csv('counties_person_hours_areas.csv')
# Remove those with 0 electrical fires rec... |
[
{
"title": "High Performance Computing in the Cloud with cloudnumbers.com",
"href": "https://web.archive.org/web/http://cloudnumbers.com/r-project-hpc-cloud"
},
{
"title": "Statistique de l’assurance STT6705V, partie 12 bis",
"href": "http://blog.free.fr/"
},
{
"title": "Plot Multiple Ti... | /json/91.r | no_license | rweekly/rweekly.org | R | false | false | 8,352 | r | [
{
"title": "High Performance Computing in the Cloud with cloudnumbers.com",
"href": "https://web.archive.org/web/http://cloudnumbers.com/r-project-hpc-cloud"
},
{
"title": "Statistique de l’assurance STT6705V, partie 12 bis",
"href": "http://blog.free.fr/"
},
{
"title": "Plot Multiple Ti... |
#' Simulate Strauss process in 2- or 3-dimensional box
#'
#' Simulate the spatial point Strauss process in 2- or 3-dimensional box
#' (rectangular cuboid). Three algorithms are available:
#' \describe{
#' \item{BD}{Birth-and-death simulation with variable number of points.}
#' \item{dCFTP}{Dominated Coupling-From-The... | /R/rstrauss.R | no_license | antiphon/rstrauss | R | false | false | 3,947 | r | #' Simulate Strauss process in 2- or 3-dimensional box
#'
#' Simulate the spatial point Strauss process in 2- or 3-dimensional box
#' (rectangular cuboid). Three algorithms are available:
#' \describe{
#' \item{BD}{Birth-and-death simulation with variable number of points.}
#' \item{dCFTP}{Dominated Coupling-From-The... |
"degencal4"<-function(){
rr<-1
if (length(txt1)!=1 & length(txt2)!=1 & length(txt3)!=1 & length(txt4)!=1) rr<- 0
if (nbsequence=="optional")tkmessageBox(message=paste("Degenerate oligonucleotide matchs ",c(c(length(levels(factor(c(txt1,txt2,txt3,txt4)))))-rr)," unique sequences"))
if (nbsequence!="opt... | /OligoSpecificitySystem/R/degencal4.r | no_license | ingted/R-Examples | R | false | false | 518 | r | "degencal4"<-function(){
rr<-1
if (length(txt1)!=1 & length(txt2)!=1 & length(txt3)!=1 & length(txt4)!=1) rr<- 0
if (nbsequence=="optional")tkmessageBox(message=paste("Degenerate oligonucleotide matchs ",c(c(length(levels(factor(c(txt1,txt2,txt3,txt4)))))-rr)," unique sequences"))
if (nbsequence!="opt... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ffs_demo.R
\name{ffs_demo}
\alias{ffs_demo}
\alias{ffs}
\title{Estimation of Bilateral Migrant Flows from Bilateral Migrant Stocks Using Demographic Accounting Approaches}
\usage{
ffs_demo(m1 = NULL, m2 = NULL, b_por = NULL, d_por = NU... | /man/ffs_demo.Rd | no_license | JamesBorn/migest | R | false | true | 5,340 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ffs_demo.R
\name{ffs_demo}
\alias{ffs_demo}
\alias{ffs}
\title{Estimation of Bilateral Migrant Flows from Bilateral Migrant Stocks Using Demographic Accounting Approaches}
\usage{
ffs_demo(m1 = NULL, m2 = NULL, b_por = NULL, d_por = NU... |
library(ggplot2)
library(ggpubr)
library(dplyr)
library(reshape2)
####### Everything is Nelder-Mead
####################### Multistep Nelder-Mead
files <- list.files(path = "Evaluation/Nelder-Mead/Evaluation_multistep/ARIMA/S1/Lists", pattern = ".rdata", recursive = TRUE)
ARIMA_ms_S1 <- lapply(paste("Evaluation/Nelde... | /Code/Evaluation/Nelder-Mead/plots/old/PI_violin_old.R | no_license | arijoh/DataDrivenForecastModels | R | false | false | 5,376 | r | library(ggplot2)
library(ggpubr)
library(dplyr)
library(reshape2)
####### Everything is Nelder-Mead
####################### Multistep Nelder-Mead
files <- list.files(path = "Evaluation/Nelder-Mead/Evaluation_multistep/ARIMA/S1/Lists", pattern = ".rdata", recursive = TRUE)
ARIMA_ms_S1 <- lapply(paste("Evaluation/Nelde... |
# install.packages('tm')
library(tm)
# 조회 및 저장 ####
getSources()
getReaders()
folder = system.file("texts", "txt", package = "tm")
txtSource = DirSource(folder)
doc = VCorpus(txtSource, readerControl = list(language = 'lat'))
class(doc)
summary(doc)
meta(doc)
meta(doc, type = 'local')
inspect(doc)
inspect(doc[1])
do... | /textmining_practice.R | no_license | eeuoo/R | R | false | false | 2,663 | r | # install.packages('tm')
library(tm)
# 조회 및 저장 ####
getSources()
getReaders()
folder = system.file("texts", "txt", package = "tm")
txtSource = DirSource(folder)
doc = VCorpus(txtSource, readerControl = list(language = 'lat'))
class(doc)
summary(doc)
meta(doc)
meta(doc, type = 'local')
inspect(doc)
inspect(doc[1])
do... |
## Plot 1
#Reading Data
dat <- read.csv("household_power_consumption.txt", header = TRUE, sep = ";")
#Formatting Date
dat$Date <- as.Date(dat$Date, "%d/%m/%Y")
dat$Time <- format(dat$Time, format="%H:%M:%S")
#Filtering down to the two days
dat <- subset(dat, Date == "2007-02-02" | Date == "2007-02-01" )
#Remo... | /Plot1.R | no_license | nirr3/ExData_Plotting1 | R | false | false | 778 | r | ## Plot 1
#Reading Data
dat <- read.csv("household_power_consumption.txt", header = TRUE, sep = ";")
#Formatting Date
dat$Date <- as.Date(dat$Date, "%d/%m/%Y")
dat$Time <- format(dat$Time, format="%H:%M:%S")
#Filtering down to the two days
dat <- subset(dat, Date == "2007-02-02" | Date == "2007-02-01" )
#Remo... |
library(shiny)
library(leaflet)
library(rgdal)
library(data.table)
#bus route colors
colors <- list("#cae868", "#4aefe4", "#9ffcb1", "#11c46b", "#76f79f", "#ef8687", "#82e060",
"#1dc44c", "#abcdfc", "#f43feb", "#e26376", "#00b6f2", "#ea9d9e", "#fca6c8",
"#7e55d1", "#e36e07", "#dd5654")
#bus rout... | /shiny_demo/app.R | no_license | domscarcelli/SB-Transport-Equity | R | false | false | 2,138 | r | library(shiny)
library(leaflet)
library(rgdal)
library(data.table)
#bus route colors
colors <- list("#cae868", "#4aefe4", "#9ffcb1", "#11c46b", "#76f79f", "#ef8687", "#82e060",
"#1dc44c", "#abcdfc", "#f43feb", "#e26376", "#00b6f2", "#ea9d9e", "#fca6c8",
"#7e55d1", "#e36e07", "#dd5654")
#bus rout... |
# SMC sampler, recursively assimilating all data
#'@export
smcsampler <- function(y, target, param_algo, thetas = NULL, normw = NULL){
nthetas <- param_algo$nthetas
param_algo$original_proposal <- param_algo$proposal
if (is.null(thetas) && is.null(normw)){
print("will sample from the prior at the initial step... | /R/smcsampler.R | no_license | pierrejacob/bettertogether | R | false | false | 9,345 | r | # SMC sampler, recursively assimilating all data
#'@export
smcsampler <- function(y, target, param_algo, thetas = NULL, normw = NULL){
nthetas <- param_algo$nthetas
param_algo$original_proposal <- param_algo$proposal
if (is.null(thetas) && is.null(normw)){
print("will sample from the prior at the initial step... |
-- @@stderr --
dtrace: failed to compile script test/unittest/arrays/err.D_ARR_BOUNDS.ctf.d: [D_ARR_BOUNDS] line 18: index outside array bounds: 256, max is 16
| /test/unittest/arrays/err.D_ARR_BOUNDS.ctf.r | permissive | oracle/dtrace-utils | R | false | false | 160 | r | -- @@stderr --
dtrace: failed to compile script test/unittest/arrays/err.D_ARR_BOUNDS.ctf.d: [D_ARR_BOUNDS] line 18: index outside array bounds: 256, max is 16
|
library(agricolae)
### Name: design.crd
### Title: Completely Randomized Design
### Aliases: design.crd
### Keywords: design
### ** Examples
library(agricolae)
trt <-c("CIP-101","CIP-201","CIP-301","CIP-401","CIP-501")
r <-c(4,3,5,4,3)
# seed = 12543
outdesign1 <-design.crd(trt,r,serie=2,2543,"Mersenne-Twister")
bo... | /data/genthat_extracted_code/agricolae/examples/design.crd.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 537 | r | library(agricolae)
### Name: design.crd
### Title: Completely Randomized Design
### Aliases: design.crd
### Keywords: design
### ** Examples
library(agricolae)
trt <-c("CIP-101","CIP-201","CIP-301","CIP-401","CIP-501")
r <-c(4,3,5,4,3)
# seed = 12543
outdesign1 <-design.crd(trt,r,serie=2,2543,"Mersenne-Twister")
bo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.