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 |
|---|---|---|---|---|---|---|---|---|---|
par(cex=1.5)
| /cex.R | no_license | dushoff/Generation_distributions | R | false | false | 14 | r | par(cex=1.5)
|
#sap xep noi bot
vec = c(1,-1,3,2,10,9)
bubble <- function(x){
n<-length(x)
for(j in 1:(n-1)){
for(i in 1:(n-j)){
if(x[i]>x[i+1]){
temp<-x[i]
x[i]<-x[i+1]
x[i+1]<-temp
}
}
}
return(x)
}
bubble(vec)
| /Bài tập 16.R | no_license | LBMH-lang/CTDTGT_R | R | false | false | 270 | r | #sap xep noi bot
vec = c(1,-1,3,2,10,9)
bubble <- function(x){
n<-length(x)
for(j in 1:(n-1)){
for(i in 1:(n-j)){
if(x[i]>x[i+1]){
temp<-x[i]
x[i]<-x[i+1]
x[i+1]<-temp
}
}
}
return(x)
}
bubble(vec)
|
##
# The script takes a list of movie names, does a google search and retrieves the URLs
# which contain 'imdb' in it. The goal is to eventually get the imdb IDs of the movies
# Some of the code is taken from this stackoverflow answerhttps://stackoverflow.com/questions/32889136/how-to-get-google-search-results/4018156... | /get-movie-url.R | no_license | mdoucem/oscar-movie-appearance-analysis | R | false | false | 1,426 | r | ##
# The script takes a list of movie names, does a google search and retrieves the URLs
# which contain 'imdb' in it. The goal is to eventually get the imdb IDs of the movies
# Some of the code is taken from this stackoverflow answerhttps://stackoverflow.com/questions/32889136/how-to-get-google-search-results/4018156... |
\alias{gtkDrawSlider}
\name{gtkDrawSlider}
\title{gtkDrawSlider}
\description{
Draws a slider in the given rectangle on \code{window} using the
given style and orientation.
\strong{WARNING: \code{gtk_draw_slider} is deprecated and should not be used in newly-written code.}
}
\usage{gtkDrawSlider(object, window, state.t... | /RGtk2/man/gtkDrawSlider.Rd | no_license | lawremi/RGtk2 | R | false | false | 978 | rd | \alias{gtkDrawSlider}
\name{gtkDrawSlider}
\title{gtkDrawSlider}
\description{
Draws a slider in the given rectangle on \code{window} using the
given style and orientation.
\strong{WARNING: \code{gtk_draw_slider} is deprecated and should not be used in newly-written code.}
}
\usage{gtkDrawSlider(object, window, state.t... |
col.2.rgb.fun<-function(col.pal, alpha.val=.5) {
col.rgb<-col2rgb(col.pal)/255
new.pal<-c()
for(i in 1:ncol(col.rgb)) {
new.pal[i]<-rgb(col.rgb[1,i], col.rgb[2,i], col.rgb[3,i], alpha=alpha.val)
}
return(new.pal)
}
##### Function to process output of stan model and plot fit
plot.stan.fun<-function(model,
... | /Code/figure_plot_stan_output.R | permissive | isabelrodbar/dengue_foi | R | false | false | 1,659 | r |
col.2.rgb.fun<-function(col.pal, alpha.val=.5) {
col.rgb<-col2rgb(col.pal)/255
new.pal<-c()
for(i in 1:ncol(col.rgb)) {
new.pal[i]<-rgb(col.rgb[1,i], col.rgb[2,i], col.rgb[3,i], alpha=alpha.val)
}
return(new.pal)
}
##### Function to process output of stan model and plot fit
plot.stan.fun<-function(model,
... |
% Generated by roxygen2 (4.1.0.9001): do not edit by hand
% Please edit documentation in R/pedigree.format.R
\name{pedigree.format}
\alias{pedigree.format}
\title{Format Pedigree
This function formats the pedigree for downstream analysis.}
\usage{
pedigree.format(ped, pedigree.type = "simple")
}
\arguments{
\item{ped}{... | /man/pedigree.format.Rd | no_license | susjoh/simperSNP | R | false | false | 902 | rd | % Generated by roxygen2 (4.1.0.9001): do not edit by hand
% Please edit documentation in R/pedigree.format.R
\name{pedigree.format}
\alias{pedigree.format}
\title{Format Pedigree
This function formats the pedigree for downstream analysis.}
\usage{
pedigree.format(ped, pedigree.type = "simple")
}
\arguments{
\item{ped}{... |
data(iris)
str(iris)
head(iris)
plot(iris)
| /dadas_iris.R | no_license | Marcos001/R_Projects | R | false | false | 44 | r |
data(iris)
str(iris)
head(iris)
plot(iris)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/preprocessing.R
\name{load_data}
\alias{load_data}
\title{User friendly data loader}
\usage{
load_data(input, sep, cols_to_read = NULL)
}
\arguments{
\item{input}{can be a file name or a data frame}
\item{sep}{delimiter if input is a file na... | /man/load_data.Rd | permissive | keviny2/methylationfun | R | false | true | 586 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/preprocessing.R
\name{load_data}
\alias{load_data}
\title{User friendly data loader}
\usage{
load_data(input, sep, cols_to_read = NULL)
}
\arguments{
\item{input}{can be a file name or a data frame}
\item{sep}{delimiter if input is a file na... |
library(sqldf)
getTheAveragesOfTheTrainingAndTestDataByActivityAndSubject <-
function()
{
theTrainingAndTestData <-
getTheTrainingAndTestData()
theNamesOfTheMeansAndStandardDeviationColumns <-
names(theTrainingAndTestData)[c(-1, -2, -3)]
theAver... | /run_analysis.R | no_license | marcolisi/Coursera_GettingAndCleaningData_CourseProject | R | false | false | 7,247 | r | library(sqldf)
getTheAveragesOfTheTrainingAndTestDataByActivityAndSubject <-
function()
{
theTrainingAndTestData <-
getTheTrainingAndTestData()
theNamesOfTheMeansAndStandardDeviationColumns <-
names(theTrainingAndTestData)[c(-1, -2, -3)]
theAver... |
\name{d_german}
\alias{d_german}
\docType{data}
\title{German Sample Data (complete orderings)}
\description{The German Sample dataset (\code{d_german}) is part of a comparative cross-sectional study on political actions and mass participation involving five Western countries. The dataset regards a sample of \eqn{N=226... | /PLMIX/man/d_german.Rd | no_license | akhikolla/InformationHouse | R | false | false | 1,361 | rd | \name{d_german}
\alias{d_german}
\docType{data}
\title{German Sample Data (complete orderings)}
\description{The German Sample dataset (\code{d_german}) is part of a comparative cross-sectional study on political actions and mass participation involving five Western countries. The dataset regards a sample of \eqn{N=226... |
rm(list=ls())
require(optimx)
## Optimization test function HOBBS
## ?? refs (put in .doc??)
## Nash and Walker-Smith (1987, 1989) ...
hobbs.f<- function(x){ # # Hobbs weeds problem -- function
if (abs(12*x[3]) > 500) { # check computability
fbad<-.Machine$double.xmax
return(fbad)
}
res<-hob... | /tests/hobbs.R | no_license | Giatomo/optimx | R | false | false | 3,536 | r | rm(list=ls())
require(optimx)
## Optimization test function HOBBS
## ?? refs (put in .doc??)
## Nash and Walker-Smith (1987, 1989) ...
hobbs.f<- function(x){ # # Hobbs weeds problem -- function
if (abs(12*x[3]) > 500) { # check computability
fbad<-.Machine$double.xmax
return(fbad)
}
res<-hob... |
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#@@@@@@ Based on 2004 Efron's paper @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#@@@ Efron B. (2004) The estimation of prediction error: covariance
#@@@ penalties and cross-validation,
#@@@ Journal of the American Statistical Association, Vol. 99... | /RTI/Model_Complexity/nnet_pert.r | no_license | ishanUNC/Internship_Work | R | false | false | 17,570 | r | #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#@@@@@@ Based on 2004 Efron's paper @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#@@@ Efron B. (2004) The estimation of prediction error: covariance
#@@@ penalties and cross-validation,
#@@@ Journal of the American Statistical Association, Vol. 99... |
library(EpiDynamics)
### Name: sir2AgeClasses
### Title: SIR model with 2 age classes (P 3.3).
### Aliases: sir2AgeClasses
### ** Examples
# Parameters and initial conditions.
parameters <- c(betaCC = 100, betaCA = 10, betaAC = 10, betaAA = 20,
gamma = 10, lC = 0.0666667, muC = 0.0, muA = 0.016667)
... | /data/genthat_extracted_code/EpiDynamics/examples/sir2AgeClasses.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 591 | r | library(EpiDynamics)
### Name: sir2AgeClasses
### Title: SIR model with 2 age classes (P 3.3).
### Aliases: sir2AgeClasses
### ** Examples
# Parameters and initial conditions.
parameters <- c(betaCC = 100, betaCA = 10, betaAC = 10, betaAA = 20,
gamma = 10, lC = 0.0666667, muC = 0.0, muA = 0.016667)
... |
# RipRAM Random Forest Draft
# January 29, 2021
# Heili Lowman
# The following script will walk through a random forest created to predict state-wide RipRAM scores, with datasets from Kevin O'Connor, SMC, and StreamCat databases. The dependent variable in this case will be the Riparian Rapid Assessment Method (RipRAM)... | /ripram_rf.R | no_license | SCCWRP/healthy_watershed_random_forest | R | false | false | 23,268 | r | # RipRAM Random Forest Draft
# January 29, 2021
# Heili Lowman
# The following script will walk through a random forest created to predict state-wide RipRAM scores, with datasets from Kevin O'Connor, SMC, and StreamCat databases. The dependent variable in this case will be the Riparian Rapid Assessment Method (RipRAM)... |
library(MatchLinReg)
### Name: mlr.bias.constructor
### Title: Generating the treatment effect bias constructor vector
### Aliases: mlr.bias.constructor
### ** Examples
# number of included adjustment covariates
K <- 10
# number of observations in treatment group
Nt <- 100
# number of observations in control group... | /data/genthat_extracted_code/MatchLinReg/examples/mlr.bias.constructor.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 954 | r | library(MatchLinReg)
### Name: mlr.bias.constructor
### Title: Generating the treatment effect bias constructor vector
### Aliases: mlr.bias.constructor
### ** Examples
# number of included adjustment covariates
K <- 10
# number of observations in treatment group
Nt <- 100
# number of observations in control group... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.functions.R
\name{timeplot}
\alias{timeplot}
\title{Plot raw responses over time by treatment or class}
\usage{
timeplot(network, level = "treatment", plotby = "arm", link = "identity", ...)
}
\arguments{
\item{network}{An objec... | /man/timeplot.Rd | no_license | hugaped/MBNMAtime | R | false | true | 2,252 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.functions.R
\name{timeplot}
\alias{timeplot}
\title{Plot raw responses over time by treatment or class}
\usage{
timeplot(network, level = "treatment", plotby = "arm", link = "identity", ...)
}
\arguments{
\item{network}{An objec... |
rna_seq<-read.table("GSE60424_GEOSubmit_FC1to11_normalized_counts.txt",header =TRUE)
column_names<-c("whole_blood","Neutrophil","Monocytes","Bcells","CD4T","CD8T","NK")
healthy_1<-cbind(rna_seq$lib221,rna_seq[,7:12])
healthy_2<-cbind(rna_seq[,74],rna_seq[,68:73])
healthy_3<-cbind(rna_seq[,81],rna_seq[,75:80])
healthy_4... | /A few trials on the signature/Trial_2_PCA_Whole_blood.R | no_license | BinLiu9205/Master_thesis_RNA-seq | R | false | false | 7,640 | r | rna_seq<-read.table("GSE60424_GEOSubmit_FC1to11_normalized_counts.txt",header =TRUE)
column_names<-c("whole_blood","Neutrophil","Monocytes","Bcells","CD4T","CD8T","NK")
healthy_1<-cbind(rna_seq$lib221,rna_seq[,7:12])
healthy_2<-cbind(rna_seq[,74],rna_seq[,68:73])
healthy_3<-cbind(rna_seq[,81],rna_seq[,75:80])
healthy_4... |
#radial scatter plot published in plotly using plotly R API
library(plotly)
library(ggplot2)
Sys.setenv("plotly_username"="caluchko")
Sys.setenv("plotly_api_key"="cqdk1g1p7k")
df$Activity <- as.factor(df$Activity)
p <- plot_ly(plotly::hobbs, r = df$Elevation..m., t = df$degjit, color = df$activity,
opaci... | /scatter.R | no_license | caluchko/avalanche | R | false | false | 568 | r | #radial scatter plot published in plotly using plotly R API
library(plotly)
library(ggplot2)
Sys.setenv("plotly_username"="caluchko")
Sys.setenv("plotly_api_key"="cqdk1g1p7k")
df$Activity <- as.factor(df$Activity)
p <- plot_ly(plotly::hobbs, r = df$Elevation..m., t = df$degjit, color = df$activity,
opaci... |
setMethodS3("getStateColorMap", "SegmentedGenomicSignalsInterface", function(this, ...) {
colorMap <- getBasicField(this, ".stateColorMap")
if (is.null(colorMap)) {
this <- setStateColorMap(this, colorMap="default")
colorMap <- getBasicField(this, ".stateColorMap")
}
colorMap
})
setMethodS3("setStateC... | /R/SegmentedGenomicSignalsInterface.COLS.R | no_license | HenrikBengtsson/aroma.core | R | false | false | 2,259 | r | setMethodS3("getStateColorMap", "SegmentedGenomicSignalsInterface", function(this, ...) {
colorMap <- getBasicField(this, ".stateColorMap")
if (is.null(colorMap)) {
this <- setStateColorMap(this, colorMap="default")
colorMap <- getBasicField(this, ".stateColorMap")
}
colorMap
})
setMethodS3("setStateC... |
#' dxsmall
#'
#' A SummarizedExperiment with covariates and mRNA counts from 501 AML cases.
#'
#' @importFrom utils data
#'
#' @usage data(dxsmall)
#' @format A \code{SummarizedExperiment} object
#' @source This data was created using inst/extdata/mRNA/dxsmall.reassemble.R
#'
#' @examples
#'
#' data(dxsmall)
#' show... | /R/data.R | no_license | VanAndelInstitute/bifurcatoR | R | false | false | 1,728 | r | #' dxsmall
#'
#' A SummarizedExperiment with covariates and mRNA counts from 501 AML cases.
#'
#' @importFrom utils data
#'
#' @usage data(dxsmall)
#' @format A \code{SummarizedExperiment} object
#' @source This data was created using inst/extdata/mRNA/dxsmall.reassemble.R
#'
#' @examples
#'
#' data(dxsmall)
#' show... |
data.set <- "C:/Users/User/Documents/exer/knnwithR/dataset/setofdata.csv"
print("read dataset")
df <- read.csv(data.set, header=TRUE)
df
#random number
ran <- sample(1:nrow(df), 0.9 * nrow(df))
#normalization
norm <- function(x) {(x-min(x))/(max(x)-min(x))}
data_norm <- as.data.frame(lapply(df[,c(1,2,3,4)],norm))
summa... | /knn.R | permissive | dittrash/KNN-Accuracy-With-R | R | false | false | 875 | r | data.set <- "C:/Users/User/Documents/exer/knnwithR/dataset/setofdata.csv"
print("read dataset")
df <- read.csv(data.set, header=TRUE)
df
#random number
ran <- sample(1:nrow(df), 0.9 * nrow(df))
#normalization
norm <- function(x) {(x-min(x))/(max(x)-min(x))}
data_norm <- as.data.frame(lapply(df[,c(1,2,3,4)],norm))
summa... |
library(rasterWidget)
library(raster)
library(classInt)
library(devtools)
meuseFile <- system.file("external/test.grd", package="raster")
meuseRaster <- raster(meuseFile)
plot(meuseRaster)
# execute again after changes in rasterWidget code
setwd("/Users/christopherstephan/Documents/git/rasterWidget/rasterWidget")
dev... | /demoRasterWidget.R | no_license | ChristopherStephan/rasterWidget | R | false | false | 1,863 | r | library(rasterWidget)
library(raster)
library(classInt)
library(devtools)
meuseFile <- system.file("external/test.grd", package="raster")
meuseRaster <- raster(meuseFile)
plot(meuseRaster)
# execute again after changes in rasterWidget code
setwd("/Users/christopherstephan/Documents/git/rasterWidget/rasterWidget")
dev... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EPFR.r
\name{combinations.next}
\alias{combinations.next}
\title{combinations.next}
\usage{
combinations.next(x)
}
\arguments{
\item{x}{= a logical vector}
}
\description{
returns the next combination in dictionary order
}
\seealso{
Other com... | /man/combinations.next.Rd | no_license | vsrimurthy/EPFR | R | false | true | 462 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EPFR.r
\name{combinations.next}
\alias{combinations.next}
\title{combinations.next}
\usage{
combinations.next(x)
}
\arguments{
\item{x}{= a logical vector}
}
\description{
returns the next combination in dictionary order
}
\seealso{
Other com... |
########################################################################
# Radial Support Vector Machine (SVM) Classification
# Author: Arielle S. Selya
# Date posted: 2/28/2021
########################################################################
load("Managed Sanford Data.RData")
require(e1071)
# Set par... | /SVM Radial Diabetes Predictive Model R2 final.R | no_license | ArielleSelya/Diabetes-Predictive-Model | R | false | false | 7,144 | r | ########################################################################
# Radial Support Vector Machine (SVM) Classification
# Author: Arielle S. Selya
# Date posted: 2/28/2021
########################################################################
load("Managed Sanford Data.RData")
require(e1071)
# Set par... |
boots = 500
DGP = 1
load("func_forms1.RData")
if (DGP == 1) {
func_list = func_formsYM$func_listYMmis
forms = func_formsYM
}
if (DGP == 2) {
func_list = func_formsYZ$func_listYZmis
forms = func_formsYZ
}
if (DGP == 3) {
func_list = func_formsYS$func_listYSmis
forms = func_formsYS
}
form_name = paste0("... | /scripts_new_eff/master_eff.R | no_license | jlstiles/SDEtransportsim | R | false | false | 1,654 | r |
boots = 500
DGP = 1
load("func_forms1.RData")
if (DGP == 1) {
func_list = func_formsYM$func_listYMmis
forms = func_formsYM
}
if (DGP == 2) {
func_list = func_formsYZ$func_listYZmis
forms = func_formsYZ
}
if (DGP == 3) {
func_list = func_formsYS$func_listYSmis
forms = func_formsYS
}
form_name = paste0("... |
#' @title Get the currently open exercise
#'
#' @description If the currently open exercise (the exercise which is located at the current
#' working directory) is a valid TMC R exercise project, return it as a \code{c(name = path)}
#' vector.
#'
#' @usage exercisePathFromWd()
#'
#' @details The exercise is a valid TMC ... | /tmcrstudioaddin/R/Exercises.R | no_license | RTMC/tmc-rstudio | R | false | false | 5,885 | r | #' @title Get the currently open exercise
#'
#' @description If the currently open exercise (the exercise which is located at the current
#' working directory) is a valid TMC R exercise project, return it as a \code{c(name = path)}
#' vector.
#'
#' @usage exercisePathFromWd()
#'
#' @details The exercise is a valid TMC ... |
library(soilDB)
### Name: fetchNASISWebReport
### Title: Extract component tables from a the NASIS Web Reports
### Aliases: fetchNASISWebReport get_project_from_NASISWebReport
### get_progress_from_NASISWebReport
### get_project_correlation_from_NASISWebReport
### get_mapunit_from_NASISWebReport
### get_proje... | /data/genthat_extracted_code/soilDB/examples/fetchLIMS_component.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 3,022 | r | library(soilDB)
### Name: fetchNASISWebReport
### Title: Extract component tables from a the NASIS Web Reports
### Aliases: fetchNASISWebReport get_project_from_NASISWebReport
### get_progress_from_NASISWebReport
### get_project_correlation_from_NASISWebReport
### get_mapunit_from_NASISWebReport
### get_proje... |
# getting data
file <- "./Documents/comp/eda/household_power_consumption.txt"
data <- read.table(file, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
subsetdata <- subset(data,data$Date=="1/2/2007" | data$Date =="2/2/2007")
# plot graph
active <- as.numeric(subsetdata$Global_active_power)
png("./Documents/comp... | /plot1.R | no_license | vespyrs/eda | R | false | false | 441 | r | # getting data
file <- "./Documents/comp/eda/household_power_consumption.txt"
data <- read.table(file, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
subsetdata <- subset(data,data$Date=="1/2/2007" | data$Date =="2/2/2007")
# plot graph
active <- as.numeric(subsetdata$Global_active_power)
png("./Documents/comp... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/celltrackR-package.R
\name{cheatsheet}
\alias{cheatsheet}
\title{Open the package cheat sheet}
\usage{
cheatsheet(opencmd = NULL)
}
\arguments{
\item{opencmd}{The command used to open pdfs from the command line.}
}
\value{
None
}
\description... | /man/cheatsheet.Rd | no_license | ingewortel/celltrackR | R | false | true | 419 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/celltrackR-package.R
\name{cheatsheet}
\alias{cheatsheet}
\title{Open the package cheat sheet}
\usage{
cheatsheet(opencmd = NULL)
}
\arguments{
\item{opencmd}{The command used to open pdfs from the command line.}
}
\value{
None
}
\description... |
library(quanteda)
neg_texts <- getTextDir("~/Dropbox/QUANTESS/corpora/movieReviews/smaller/neg/")
pos_texts <- getTextDir("~/Dropbox/QUANTESS/corpora/movieReviews/smaller/pos/")
texts <- c(neg_texts,pos_texts)
vals <-vector()
vals[1:1000] <- "neg"
vals[1001:2000] <- "pos"
atts <- data.frame(vals)
names(atts)<-c("label... | /working_files/examples/kwicExample.R | no_license | saldaihani/quanteda | R | false | false | 575 | r | library(quanteda)
neg_texts <- getTextDir("~/Dropbox/QUANTESS/corpora/movieReviews/smaller/neg/")
pos_texts <- getTextDir("~/Dropbox/QUANTESS/corpora/movieReviews/smaller/pos/")
texts <- c(neg_texts,pos_texts)
vals <-vector()
vals[1:1000] <- "neg"
vals[1001:2000] <- "pos"
atts <- data.frame(vals)
names(atts)<-c("label... |
# Detailed description of the tree data structure and related functions
# ---------------------------------------------------------------------
#
# We will use structures to implement the tree datatype. The tree is formed by
# nodes. The code of a node
#
# node <- new.node(name="Temperature", branches=c("Good", "Bad")... | /src/dt.tutorial.R | no_license | mmunozpatino/l1-AM | R | false | false | 4,339 | r | # Detailed description of the tree data structure and related functions
# ---------------------------------------------------------------------
#
# We will use structures to implement the tree datatype. The tree is formed by
# nodes. The code of a node
#
# node <- new.node(name="Temperature", branches=c("Good", "Bad")... |
library(tidyverse)
library(lme4)
library(lmerTest)
library(sjPlot)
## read in spp list from google drive
spp_traits <- read.csv('data/traits/insect_traits.csv', stringsAsFactors = FALSE) %>%
na_if("")
## read in phenesse outputs
model_df <- read.csv(file = "data/model_dfs/duration_climate_population_data.csv",
... | /scripts/08_trait_analyses2.R | no_license | mbelitz/insect-pheno-duration | R | false | false | 30,047 | r | library(tidyverse)
library(lme4)
library(lmerTest)
library(sjPlot)
## read in spp list from google drive
spp_traits <- read.csv('data/traits/insect_traits.csv', stringsAsFactors = FALSE) %>%
na_if("")
## read in phenesse outputs
model_df <- read.csv(file = "data/model_dfs/duration_climate_population_data.csv",
... |
fjComm::clear_()
df=read_tsv("K562_merged_rep1_20.6U_79.2U_304U_MNase.sorted.rmdup.autosomes.over140fragments.fragment_coverage.All_motifs_overlap_K562_ChIP.autosomes_top500.v2.200bp_flank_from_center.average_per_TF.txt")
df %<>% dplyr::filter(TF %in% qw("YBX1 HMBOX1 PKNOX1 ATF2 ELF1 ATF3")) %>% set_colnames(qw("TF po... | /!ADD_Nat_revise1/6_ENCODE_corr/MNase_cvg_v3/examples.R | no_license | aquaflakes/individual_analyses | R | false | false | 605 | r | fjComm::clear_()
df=read_tsv("K562_merged_rep1_20.6U_79.2U_304U_MNase.sorted.rmdup.autosomes.over140fragments.fragment_coverage.All_motifs_overlap_K562_ChIP.autosomes_top500.v2.200bp_flank_from_center.average_per_TF.txt")
df %<>% dplyr::filter(TF %in% qw("YBX1 HMBOX1 PKNOX1 ATF2 ELF1 ATF3")) %>% set_colnames(qw("TF po... |
#' @title plot hits as a xy dotplot
#' @description
#' \code{plot_hits} routines to make visually appealing dotplots
#' @name plot_hits
#'
#' @param gsParam A list of genespace parameters. This should be created
#' by init_genespace.
#' @param type character string of "all", "raw", or "syntenic" specifying which
#' typ... | /R/plot_hits.R | permissive | jtlovell/GENESPACE | R | false | false | 19,784 | r | #' @title plot hits as a xy dotplot
#' @description
#' \code{plot_hits} routines to make visually appealing dotplots
#' @name plot_hits
#'
#' @param gsParam A list of genespace parameters. This should be created
#' by init_genespace.
#' @param type character string of "all", "raw", or "syntenic" specifying which
#' typ... |
# Tests:
context("rule_text_color")
test_that("rule_text_color works", {
data(iris)
x <- condformat(iris[c(1:10, 51:60, 101:110),])
y <- x %>% rule_text_color(Species,
expression = ifelse(Species == "setosa", "blue", ""))
out <- condformat2html(y)
expect_match(out, "color: blue.*... | /tests/testthat/test_rule_text_color.R | no_license | leeleavitt/condformat | R | false | false | 540 | r | # Tests:
context("rule_text_color")
test_that("rule_text_color works", {
data(iris)
x <- condformat(iris[c(1:10, 51:60, 101:110),])
y <- x %>% rule_text_color(Species,
expression = ifelse(Species == "setosa", "blue", ""))
out <- condformat2html(y)
expect_match(out, "color: blue.*... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{timesThree}
\alias{timesThree}
\title{Multiply a number by three}
\usage{
timesThree(x)
}
\arguments{
\item{x}{A single integer.}
}
\description{
Multiply a number by three
}
| /q2e/man/timesThree.Rd | no_license | bioarch-sjh/q2e | R | false | true | 273 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{timesThree}
\alias{timesThree}
\title{Multiply a number by three}
\usage{
timesThree(x)
}
\arguments{
\item{x}{A single integer.}
}
\description{
Multiply a number by three
}
|
library(tidyverse)
library(ggmap)
library(ggplot2)
library(dplyr)
library(sf)
library(leaflet)
mat_locations <- readr::read_csv("MAT_locations.csv")
mat_locations <- mat_locations %>% mutate(
search_address = paste(address, city, state, zip, sep = ", ")
)
register_google(key = "AIzaSyArse9KN5w6I6XekxNOkFWgt_brvM_m-C... | /stuff/mat_locations.R | permissive | DSPG-ISU/DSPG | R | false | false | 757 | r | library(tidyverse)
library(ggmap)
library(ggplot2)
library(dplyr)
library(sf)
library(leaflet)
mat_locations <- readr::read_csv("MAT_locations.csv")
mat_locations <- mat_locations %>% mutate(
search_address = paste(address, city, state, zip, sep = ", ")
)
register_google(key = "AIzaSyArse9KN5w6I6XekxNOkFWgt_brvM_m-C... |
# Geodistances ordered according to travelling salesman algo ####
# TRAVELLING SALESMAN
# Purpose is to estimate the right number of waypoints - to reduce api runs
tscalc <- function(xy,outpois, startposition, endposition) {
xy0 <- xy
for (j in 2:(nrow(xy0)-1)) {
xy <- xy0[-j,]
nu_kor <- xy0[j,c("lat","ln... | /iterator.R | no_license | pjerrot/r_stuff | R | false | false | 3,066 | r |
# Geodistances ordered according to travelling salesman algo ####
# TRAVELLING SALESMAN
# Purpose is to estimate the right number of waypoints - to reduce api runs
tscalc <- function(xy,outpois, startposition, endposition) {
xy0 <- xy
for (j in 2:(nrow(xy0)-1)) {
xy <- xy0[-j,]
nu_kor <- xy0[j,c("lat","ln... |
library(BayesianTools)
library(phydynR)
#get_BT_sample <- function(rds_file, end_sample){
# bt_posterior <- readRDS(rds_file)
# bt_sample <- getSample(bt_posterior, start = 1, end = end_sample, coda = TRUE)
#}
#pol gene ----
# list
rds_dirs <- list.files("Analyses/MCMC_Results/pol_all/results_zmatrix/stage13", ful... | /Analyses/Scripts/R-scripts/South_Africa/Summary.R | no_license | thednainus/pangeaZA | R | false | false | 18,607 | r | library(BayesianTools)
library(phydynR)
#get_BT_sample <- function(rds_file, end_sample){
# bt_posterior <- readRDS(rds_file)
# bt_sample <- getSample(bt_posterior, start = 1, end = end_sample, coda = TRUE)
#}
#pol gene ----
# list
rds_dirs <- list.files("Analyses/MCMC_Results/pol_all/results_zmatrix/stage13", ful... |
"benchstats" <-
structure(c(-60.7831272900001, 34.3079583900001, 3.56745360999999,
9.94903490800002, 22.4989411700000, 33.89292992, 50.0425105499999,
53.2141230900001, 59.1443245600001, 58.6841452499999, 13.21342134,
5.15217918889568, 2.89643983703556, 0.95543584548527, 1.68101350129359,
2.0897844158153, 1.75364152... | /packages/nimble/inst/classic-bugs/vol2/beetles/bench-test1.R | permissive | nimble-dev/nimble | R | false | false | 1,088 | r | "benchstats" <-
structure(c(-60.7831272900001, 34.3079583900001, 3.56745360999999,
9.94903490800002, 22.4989411700000, 33.89292992, 50.0425105499999,
53.2141230900001, 59.1443245600001, 58.6841452499999, 13.21342134,
5.15217918889568, 2.89643983703556, 0.95543584548527, 1.68101350129359,
2.0897844158153, 1.75364152... |
# this is the server file for my project
library(shiny)
if (!require(quantmod)) {
stop("This app requires the quantmod package. To install it, run 'install.packages(\"quantmod\")'.\n")
}
require_symbol <- function(symbol, envir = parent.frame()) {
if (is.null(envir[[symbol]])) {
envir... | /app/app1.R | no_license | gustavovasquezperdomo/ProjectPitch | R | false | false | 1,064 | r | # this is the server file for my project
library(shiny)
if (!require(quantmod)) {
stop("This app requires the quantmod package. To install it, run 'install.packages(\"quantmod\")'.\n")
}
require_symbol <- function(symbol, envir = parent.frame()) {
if (is.null(envir[[symbol]])) {
envir... |
# Load Data From File
data <- read.table(file="household_power_consumption.txt",sep=";",header=TRUE
,stringsAsFactors=FALSE)
#Format and Filter Data
data$Date <- as.Date(data$Date,format="%d/%m/%Y")
data <- data[data$Date == "2007-02-01" | data$Date == "2007-02-02",]
data$Global_active_power <- as.... | /plot2.R | no_license | anshulr/ExData_Plotting1 | R | false | false | 633 | r | # Load Data From File
data <- read.table(file="household_power_consumption.txt",sep=";",header=TRUE
,stringsAsFactors=FALSE)
#Format and Filter Data
data$Date <- as.Date(data$Date,format="%d/%m/%Y")
data <- data[data$Date == "2007-02-01" | data$Date == "2007-02-02",]
data$Global_active_power <- as.... |
\name{predict.tsglm}
\alias{predict.tsglm}
\title{
Predicts Method for Time Series of Counts Following Generalised Linear Models
}
\description{
Predict future observations based on a fitted GLM-type model for time series of counts.
}
\usage{
\method{predict}{tsglm}(object, n.ahead=1, newobs=NULL, newxreg=NULL, level=0... | /man/predict.tsglm.Rd | no_license | cran/tscount | R | false | false | 10,269 | rd | \name{predict.tsglm}
\alias{predict.tsglm}
\title{
Predicts Method for Time Series of Counts Following Generalised Linear Models
}
\description{
Predict future observations based on a fitted GLM-type model for time series of counts.
}
\usage{
\method{predict}{tsglm}(object, n.ahead=1, newobs=NULL, newxreg=NULL, level=0... |
library(deSolve)
library(plot3D)
outputdir <- "/isi/olga/xin/GTA_project/output/20160701/X_ratio_c_N.txt"
c.array <- seq(0.0001, 1, length.out = 500)
K.array <- seq(1e5, 1e9, length.out = 500)
r.array <- seq(0.0001, 1, length.out = 500)
N.array <- c(1e-11, 1e-10, 5e-10, seq(1e-9, 1e-8, length.out = 495), 1e-7, 1e-6) ... | /deSolveGTA_cN.R | no_license | mascoma/GTA_project_script | R | false | false | 2,877 | r | library(deSolve)
library(plot3D)
outputdir <- "/isi/olga/xin/GTA_project/output/20160701/X_ratio_c_N.txt"
c.array <- seq(0.0001, 1, length.out = 500)
K.array <- seq(1e5, 1e9, length.out = 500)
r.array <- seq(0.0001, 1, length.out = 500)
N.array <- c(1e-11, 1e-10, 5e-10, seq(1e-9, 1e-8, length.out = 495), 1e-7, 1e-6) ... |
library(lubridateExtras)
context("Instances Functions")
test_that("yesterday", {
expect_equal(yesterday(), Sys.Date() - 1)
})
test_that("tomorrow", {
expect_equal(tomorrow(), Sys.Date() + 1)
})
test_that("days_ago", {
expect_equal(days_ago(0), Sys.Date())
expect_equal(days_ago(1), yesterday())
expect_equal... | /tests/testthat/test_instances.R | permissive | j450h1/lubridateExtras | R | false | false | 1,704 | r | library(lubridateExtras)
context("Instances Functions")
test_that("yesterday", {
expect_equal(yesterday(), Sys.Date() - 1)
})
test_that("tomorrow", {
expect_equal(tomorrow(), Sys.Date() + 1)
})
test_that("days_ago", {
expect_equal(days_ago(0), Sys.Date())
expect_equal(days_ago(1), yesterday())
expect_equal... |
help(package="rpart")
library(caret): confusionMatrix()
library(Metrics)
#ce( classificatino error),rmse
# auc: use prob, real numerical prediction and actual data has to be 1 and 0
#regression; method is anova
> auc_bag
[1] 0.7809724
auc_bag_caret
[1] 0.7762389
auc_bag
[1] 0.7809724
> auc(actual = ifelse(credi... | /GBM/Intro Notes.R | no_license | li42125msa/R-projects | R | false | false | 1,060 | r | help(package="rpart")
library(caret): confusionMatrix()
library(Metrics)
#ce( classificatino error),rmse
# auc: use prob, real numerical prediction and actual data has to be 1 and 0
#regression; method is anova
> auc_bag
[1] 0.7809724
auc_bag_caret
[1] 0.7762389
auc_bag
[1] 0.7809724
> auc(actual = ifelse(credi... |
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = 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), ra = numeric(0), relh = -1.72131968218895e+83, rs = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, ... | /meteor/inst/testfiles/ET0_PenmanMonteith/AFL_ET0_PenmanMonteith/ET0_PenmanMonteith_valgrind_files/1615839142-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 829 | r | testlist <- list(G = numeric(0), Rn = numeric(0), atmp = 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), ra = numeric(0), relh = -1.72131968218895e+83, rs = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, ... |
# generate_figure3.R
#
# Author: Bob Verity
# Date: 2019-12-17
#
# Purpose:
# Produce maps of first few principal components.
#
# ------------------------------------------------------------------
# NOTE - uncomment these lines to install packages as needed
#devtools::install_github("mrc-ide/MIPAnalyzer", ref = "vers... | /figure3_PCA_maps/generate_figure3.R | no_license | OJWatson/antimalarial_resistance_DRC | R | false | false | 4,498 | r |
# generate_figure3.R
#
# Author: Bob Verity
# Date: 2019-12-17
#
# Purpose:
# Produce maps of first few principal components.
#
# ------------------------------------------------------------------
# NOTE - uncomment these lines to install packages as needed
#devtools::install_github("mrc-ide/MIPAnalyzer", ref = "vers... |
# Load data and caluclate life tables -------------------------------------
# Load and organize data
Nola<-read.csv('data/Cemetery_Partial_NOLA_Data.csv')
NolaF<-subset.data.frame(Nola,Nola$Sex=='Female') #grab all of the females
NolaM<-subset.data.frame(Nola,Nola$Sex=='Male') #and grab all the males
#Paramiterize ... | /CemeteryScript_Completed.R | no_license | cmKent/Tulane-General-Ecology-Lab | R | false | false | 2,616 | r |
# Load data and caluclate life tables -------------------------------------
# Load and organize data
Nola<-read.csv('data/Cemetery_Partial_NOLA_Data.csv')
NolaF<-subset.data.frame(Nola,Nola$Sex=='Female') #grab all of the females
NolaM<-subset.data.frame(Nola,Nola$Sex=='Male') #and grab all the males
#Paramiterize ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GRanges_helpers.R
\name{groupGRangesBy}
\alias{groupGRangesBy}
\title{make GRangesList from GRanges,}
\usage{
groupGRangesBy(gr, other = NULL)
}
\arguments{
\item{gr}{a GRanges object}
\item{other}{a vector of names to group, no 2 groups can... | /man/groupGRangesBy.Rd | permissive | katchyz/ORFik | R | false | true | 1,366 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GRanges_helpers.R
\name{groupGRangesBy}
\alias{groupGRangesBy}
\title{make GRangesList from GRanges,}
\usage{
groupGRangesBy(gr, other = NULL)
}
\arguments{
\item{gr}{a GRanges object}
\item{other}{a vector of names to group, no 2 groups can... |
\name{tidedata}
\docType{data}
\alias{tidedata}
\title{Tidal constituent information}
\description{The \code{tidedata} dataset contains Tide-constituent information
that is use by \code{\link{tidem}} to fit tidal models.
\code{tidedata} is a list containing
\describe{
\item{const}{a list containing vect... | /man/tidedata.Rd | no_license | marie-geissler/oce | R | false | false | 2,933 | rd | \name{tidedata}
\docType{data}
\alias{tidedata}
\title{Tidal constituent information}
\description{The \code{tidedata} dataset contains Tide-constituent information
that is use by \code{\link{tidem}} to fit tidal models.
\code{tidedata} is a list containing
\describe{
\item{const}{a list containing vect... |
rm(list = ls())
# devtools::install_github("poceviciute/AdvRprogr_lab4")
# devtools::install_github("poceviciute/AdvRprogr_lab4", build_vignettes = TRUE)
library(linreg)
linreg_mod <- linreg$new(Petal.Length~Sepal.Width+Sepal.Length, data=iris)
# devtools::test()
# Print
linreg_mod$print()
# Plot
linreg_mod$plot(... | /test_code.R | no_license | poceviciute/AdvRprogr_lab4 | R | false | false | 542 | r | rm(list = ls())
# devtools::install_github("poceviciute/AdvRprogr_lab4")
# devtools::install_github("poceviciute/AdvRprogr_lab4", build_vignettes = TRUE)
library(linreg)
linreg_mod <- linreg$new(Petal.Length~Sepal.Width+Sepal.Length, data=iris)
# devtools::test()
# Print
linreg_mod$print()
# Plot
linreg_mod$plot(... |
##cache the inverse of a matrix
##This function creats a special matrix that can cache its inverse
makeCacheMatrix<-function(x=matrix()){
inv<-NULL
#set the value of the matrix
set<-function(y){
x<<-y
inv<<-NULL
}
#get the value of matrix
get<-function() x
#set the value of the inverse matrix
setinverse<-f... | /cachematrix.R | no_license | sky0502/ProgrammingAssignment2 | R | false | false | 1,108 | r | ##cache the inverse of a matrix
##This function creats a special matrix that can cache its inverse
makeCacheMatrix<-function(x=matrix()){
inv<-NULL
#set the value of the matrix
set<-function(y){
x<<-y
inv<<-NULL
}
#get the value of matrix
get<-function() x
#set the value of the inverse matrix
setinverse<-f... |
#' Automatic pre-preprocessing
#'
#' This function performs pre-processing on a time series object(ts) to treat
#' heterocedasticity, trend and seasonality in order to make the serie stationary.
#'
#' Returns an object \code{prep} which stores all data needed to undo the changes later on.
#'
#' This function pro... | /R/prep.R | no_license | cran/predtoolsTS | R | false | false | 15,636 | r | #' Automatic pre-preprocessing
#'
#' This function performs pre-processing on a time series object(ts) to treat
#' heterocedasticity, trend and seasonality in order to make the serie stationary.
#'
#' Returns an object \code{prep} which stores all data needed to undo the changes later on.
#'
#' This function pro... |
#! /usr/bin/env Rscript
library(testthat)
library(rly)
context("Missing t_error() rule")
Lexer <- R6Class("Lexer",
public = list(
tokens = c('NUMBER', 'PLUS','MINUS'),
t_PLUS = '\\+',
t_MINUS = '-',
t_NUMBER = '\\d+'
)
)
test_that("no t_error()", {
expect_output(rly::lex(Lexer), "WARN .* No t_... | /tests/testthat/test.lex_error1.R | no_license | caprice-j/rly | R | false | false | 347 | r | #! /usr/bin/env Rscript
library(testthat)
library(rly)
context("Missing t_error() rule")
Lexer <- R6Class("Lexer",
public = list(
tokens = c('NUMBER', 'PLUS','MINUS'),
t_PLUS = '\\+',
t_MINUS = '-',
t_NUMBER = '\\d+'
)
)
test_that("no t_error()", {
expect_output(rly::lex(Lexer), "WARN .* No t_... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dodge_v.r
\name{pos_stackv}
\alias{pos_stackv}
\title{Stack overlapping intervals.
Assumes that each set has the same horizontal position}
\usage{
pos_stackv(df, height)
}
\description{
Stack overlapping intervals.
Assumes that each set has t... | /man/pos_stackv.Rd | no_license | PDXChris/pmtools | R | false | true | 350 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dodge_v.r
\name{pos_stackv}
\alias{pos_stackv}
\title{Stack overlapping intervals.
Assumes that each set has the same horizontal position}
\usage{
pos_stackv(df, height)
}
\description{
Stack overlapping intervals.
Assumes that each set has t... |
setwd("/mnt/2EA01BDBA01BA7FB/Working issues/WES/AF_Paper/Revision/quality")
library(ggplot2)
library(reshape2)
library(cowplot)
dps = read.table('DP.tsv')
dps$type = c(rep('known', 311101), rep('novel', 21709))
p1 <- ggplot(dps, aes(x=type, y=V1, fill=type)) + geom_violin() +
scale_y_continuous(limits=c(0, 50000))... | /data_cleanup/params.R | no_license | bioinf/afpaper | R | false | false | 1,017 | r | setwd("/mnt/2EA01BDBA01BA7FB/Working issues/WES/AF_Paper/Revision/quality")
library(ggplot2)
library(reshape2)
library(cowplot)
dps = read.table('DP.tsv')
dps$type = c(rep('known', 311101), rep('novel', 21709))
p1 <- ggplot(dps, aes(x=type, y=V1, fill=type)) + geom_violin() +
scale_y_continuous(limits=c(0, 50000))... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | /r/R/record-batch-writer.R | permissive | blmarket/arrow | R | false | false | 7,521 | r | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
# a function to convert a mating summary list to a dataframe
matingSummary.df <- function(matSum){
if(is.list(matSum[[1]][[1]])){
df <- lapply(matSum, matingSummary.df)
}
if(is.list(matSum[[1]][1])){
l <- lapply(matSum, unlist)
df <- as.data.frame(do.call(rbind, l))
if('popSt' %in% colname... | /R/helpers.R | no_license | cran/mateable | R | false | false | 1,897 | r | # a function to convert a mating summary list to a dataframe
matingSummary.df <- function(matSum){
if(is.list(matSum[[1]][[1]])){
df <- lapply(matSum, matingSummary.df)
}
if(is.list(matSum[[1]][1])){
l <- lapply(matSum, unlist)
df <- as.data.frame(do.call(rbind, l))
if('popSt' %in% colname... |
# layers ----
layers_id_fields = c('rgn_id','cntry_key','country_id','saup_id','fao_id','fao_saup_id') # note: cntry_key for www2013, country_id for nature2012
layer_region_labels = 'rgn_labels'
layer_region_areas = 'rgn_area'
# pressures & resilience matrices ----
# components describe the layer and l... | /subcountry2014/conf/config.R | no_license | OHI-Science/swe | R | false | false | 3,169 | r | # layers ----
layers_id_fields = c('rgn_id','cntry_key','country_id','saup_id','fao_id','fao_saup_id') # note: cntry_key for www2013, country_id for nature2012
layer_region_labels = 'rgn_labels'
layer_region_areas = 'rgn_area'
# pressures & resilience matrices ----
# components describe the layer and l... |
## This now includes 'thresh' variable
## DIDN'T HAVE TO USE THIS: SEE 70.community_iterations.py INSTEAD
Args <- Sys.getenv("R_ARGS")
print(noquote(strsplit(Args," ")[[1]]))
print(length(noquote(strsplit(Args," ")[[1]])))
subj <- noquote(strsplit(Args," ")[[1]][1])
cond <- as.numeric(noquote(strsplit(Args," ")[[1]][... | /modularity_conn/8.blondel_iterations.R | no_license | michaelandric/steadystate | R | false | false | 1,146 | r | ## This now includes 'thresh' variable
## DIDN'T HAVE TO USE THIS: SEE 70.community_iterations.py INSTEAD
Args <- Sys.getenv("R_ARGS")
print(noquote(strsplit(Args," ")[[1]]))
print(length(noquote(strsplit(Args," ")[[1]])))
subj <- noquote(strsplit(Args," ")[[1]][1])
cond <- as.numeric(noquote(strsplit(Args," ")[[1]][... |
library(RandomFields)
### Name: RMbiwm
### Title: Full Bivariate Whittle Matern Model
### Aliases: RMbiwm
### Keywords: spatial models
### ** Examples
## Don't show:
StartExample()
## End(Don't show)
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
## RFoptions(seed=NA) to ma... | /data/genthat_extracted_code/RandomFields/examples/RMbiwm.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 573 | r | library(RandomFields)
### Name: RMbiwm
### Title: Full Bivariate Whittle Matern Model
### Aliases: RMbiwm
### Keywords: spatial models
### ** Examples
## Don't show:
StartExample()
## End(Don't show)
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
## RFoptions(seed=NA) to ma... |
#' @author Bill Peterman
#' @title Generate correlated Gaussian surfaces
#' @description Function to create correlated Gaussian surfaces
#'
#' @param corr Desired correlation level between fbm surfaces
#' @param dim Dimension of simulated raster
#' @param autocorr_range Maximum range (raster units) of spatial autocor... | /R/correlated_gaus_function.R | no_license | nspope/radishDGS | R | false | false | 2,215 | r | #' @author Bill Peterman
#' @title Generate correlated Gaussian surfaces
#' @description Function to create correlated Gaussian surfaces
#'
#' @param corr Desired correlation level between fbm surfaces
#' @param dim Dimension of simulated raster
#' @param autocorr_range Maximum range (raster units) of spatial autocor... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tally.R
\name{columns}
\alias{columns}
\alias{rows}
\title{return a vector of row or column indices}
\usage{
columns(x, default = c())
rows(x, default = c())
}
\arguments{
\item{x}{an object that may or may not have any rows or columns}
\it... | /man/columns.Rd | no_license | ProjectMOSAIC/mosaicCore | R | false | true | 622 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tally.R
\name{columns}
\alias{columns}
\alias{rows}
\title{return a vector of row or column indices}
\usage{
columns(x, default = c())
rows(x, default = c())
}
\arguments{
\item{x}{an object that may or may not have any rows or columns}
\it... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print.crm.r
\name{print.crmlist}
\alias{print.crmlist}
\title{Print model table from model list}
\usage{
\method{print}{crmlist}(x,...)
}
\arguments{
\item{x}{list of model results}
\item{...}{generic arguments not used here}
}
\value{
None
... | /man/print.crmlist.Rd | no_license | cran/marked | R | false | true | 443 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print.crm.r
\name{print.crmlist}
\alias{print.crmlist}
\title{Print model table from model list}
\usage{
\method{print}{crmlist}(x,...)
}
\arguments{
\item{x}{list of model results}
\item{...}{generic arguments not used here}
}
\value{
None
... |
12b9e05bec45383ec3fc42219dfbd954 query33_falsequ_1344.qdimacs 99 141 | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/A1/Database/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query33_falsequ_1344/query33_falsequ_1344.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 68 | r | 12b9e05bec45383ec3fc42219dfbd954 query33_falsequ_1344.qdimacs 99 141 |
#Modeled after the R6 testing structure: https://github.com/wch/R6/blob/master/tests/testthat.R
library(testthat)
library(REDCapR)
testthat::test_check("REDCapR")
| /REDCapR/tests/test-all.R | no_license | ingted/R-Examples | R | false | false | 169 | r | #Modeled after the R6 testing structure: https://github.com/wch/R6/blob/master/tests/testthat.R
library(testthat)
library(REDCapR)
testthat::test_check("REDCapR")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_mz_tab.R
\name{extractMetadata}
\alias{extractMetadata}
\title{Extract metadata from data frame.}
\usage{
extractMetadata(MzTabDataFrame)
}
\arguments{
\item{MzTabDataFrame}{the mztab data frame}
}
\description{
Extract the \link{Metadat... | /man/extractMetadata.Rd | permissive | lifs-tools/rmzTab-m | R | false | true | 351 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_mz_tab.R
\name{extractMetadata}
\alias{extractMetadata}
\title{Extract metadata from data frame.}
\usage{
extractMetadata(MzTabDataFrame)
}
\arguments{
\item{MzTabDataFrame}{the mztab data frame}
}
\description{
Extract the \link{Metadat... |
library(SPEI)
# Example
# Load data
data(wichita)
# Compute potential evapotranspiration (PET) and climatic water balance (BAL)
wichita$PET = thornthwaite(wichita$TMED, 37.6475)
wichita$BAL = wichita$PRCP-wichita$PET
# Convert to a ts (time series) object for convenience
wichita_ts = ts(wichita[,-c(1,2)], end=c(2011,10... | /SPEI_satellite/calc_SPEI.R | no_license | behroozeslami/Impact_Based_Forecasting_Droughts | R | false | false | 737 | r | library(SPEI)
# Example
# Load data
data(wichita)
# Compute potential evapotranspiration (PET) and climatic water balance (BAL)
wichita$PET = thornthwaite(wichita$TMED, 37.6475)
wichita$BAL = wichita$PRCP-wichita$PET
# Convert to a ts (time series) object for convenience
wichita_ts = ts(wichita[,-c(1,2)], end=c(2011,10... |
#### DYNASTYPROCESS IMPORT ####
#' Import latest DynastyProcess values
#'
#' Fetches a copy of the latest DynastyProcess dynasty trade values sheets
#'
#' @param file one of `c("values.csv","values-players.csv","values-picks.csv")`
#'
#' @seealso <https://github.com/DynastyProcess/data>
#'
#' @examples
#' \donttest{
#... | /R/1_import_dp.R | permissive | jpiburn/ffscrapr | R | false | false | 4,091 | r | #### DYNASTYPROCESS IMPORT ####
#' Import latest DynastyProcess values
#'
#' Fetches a copy of the latest DynastyProcess dynasty trade values sheets
#'
#' @param file one of `c("values.csv","values-players.csv","values-picks.csv")`
#'
#' @seealso <https://github.com/DynastyProcess/data>
#'
#' @examples
#' \donttest{
#... |
SHeader <- function(id) {
ns <- NS(id)
dashboardHeader(title = "Intelligent Data Analysis",
tags$li(a(href = 'https://www.fi.upm.es/',
img(src = 'Captura.png',
title = "a", height = "31px", width = "96px"),
... | /01 Hw1.2/00 Shinny app/00 Previous versions/Header.R | no_license | Data-Heretic/Intelligent-Data-Analysis | R | false | false | 420 | r | SHeader <- function(id) {
ns <- NS(id)
dashboardHeader(title = "Intelligent Data Analysis",
tags$li(a(href = 'https://www.fi.upm.es/',
img(src = 'Captura.png',
title = "a", height = "31px", width = "96px"),
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ec2_operations.R
\name{ec2_describe_transit_gateway_connects}
\alias{ec2_describe_transit_gateway_connects}
\title{Describes one or more Connect attachments}
\usage{
ec2_describe_transit_gateway_connects(TransitGatewayAttachmentIds,
Filters... | /cran/paws.compute/man/ec2_describe_transit_gateway_connects.Rd | permissive | sanchezvivi/paws | R | false | true | 2,075 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ec2_operations.R
\name{ec2_describe_transit_gateway_connects}
\alias{ec2_describe_transit_gateway_connects}
\title{Describes one or more Connect attachments}
\usage{
ec2_describe_transit_gateway_connects(TransitGatewayAttachmentIds,
Filters... |
library(networkD3)
library(igraph)
####################################################
### get parameters
args = commandArgs(trailingOnly=TRUE)
signal_matrix_file = args[1]
cd_tree = args[2]
signal_range_color_file = args[3]
signal_input_list = args[4]
signal_matrix_start_col = as.numeric(args[5])
##################... | /bin/plot_tree_multi_color.1.MetaIS.R | permissive | guanjue/snapshot | R | false | false | 1,780 | r | library(networkD3)
library(igraph)
####################################################
### get parameters
args = commandArgs(trailingOnly=TRUE)
signal_matrix_file = args[1]
cd_tree = args[2]
signal_range_color_file = args[3]
signal_input_list = args[4]
signal_matrix_start_col = as.numeric(args[5])
##################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wflow_run.R
\name{wflow_run}
\alias{wflow_run}
\title{Run the code}
\usage{
wflow_run(file = NULL, verbose = TRUE, project = ".")
}
\arguments{
\item{file}{character (default: \code{NULL}). The R Markdown file to execute.
Must have file exten... | /man/wflow_run.Rd | permissive | workflowr/workflowr | R | false | true | 1,729 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wflow_run.R
\name{wflow_run}
\alias{wflow_run}
\title{Run the code}
\usage{
wflow_run(file = NULL, verbose = TRUE, project = ".")
}
\arguments{
\item{file}{character (default: \code{NULL}). The R Markdown file to execute.
Must have file exten... |
library(ggplot2)
library(dplyr)
library(scales)
library(ggrepel)
library(RColorBrewer)
source('code/byte_formater.R')
wikiSizeVocab <- function() {
sizes <- read.csv('output_files/wsmall_sizes.csv')
plot <- sizes[sizes$new_size != -1,]
ggplot(plot) + geom_line(aes(idx,dif)) + annotate("text", x=3000, y=805000... | /assignments/a5/code/wiki_plotter.R | no_license | N0taN3rd/cs834-f16 | R | false | false | 1,849 | r | library(ggplot2)
library(dplyr)
library(scales)
library(ggrepel)
library(RColorBrewer)
source('code/byte_formater.R')
wikiSizeVocab <- function() {
sizes <- read.csv('output_files/wsmall_sizes.csv')
plot <- sizes[sizes$new_size != -1,]
ggplot(plot) + geom_line(aes(idx,dif)) + annotate("text", x=3000, y=805000... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shrinkVARcoef.R
\name{shrinkVARcoef}
\alias{shrinkVARcoef}
\title{Semiparametric Bayesian Shrinkage Estimator for
Multivariate Regression}
\usage{
shrinkVARcoef(Y, X, lambda, dof = Inf, prior_type = "NCJ",
TolDRes = 1e-04, m0 = ncol(Y))
}
\... | /man/shrinkVARcoef.Rd | no_license | Allisterh/VARshrink | R | false | true | 1,313 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shrinkVARcoef.R
\name{shrinkVARcoef}
\alias{shrinkVARcoef}
\title{Semiparametric Bayesian Shrinkage Estimator for
Multivariate Regression}
\usage{
shrinkVARcoef(Y, X, lambda, dof = Inf, prior_type = "NCJ",
TolDRes = 1e-04, m0 = ncol(Y))
}
\... |
#' Digit analysis
#'
#' @param x A vector or matrix of numeric values.
#' @param type Type of digit analysis ('benford' or 'terminal')
#'
#' @return
#' @export
#'
#' @examples
#' digit_analysis(c(1.234, 65.4321, 53.222), type = 'terminal')
#' digit_analysis(c(1.234, 65.4321, 53.222), type = 'benford')
digit_analys... | /assets/functions/digit_analysis.R | permissive | chartgerink/dissertation | R | false | false | 2,585 | r | #' Digit analysis
#'
#' @param x A vector or matrix of numeric values.
#' @param type Type of digit analysis ('benford' or 'terminal')
#'
#' @return
#' @export
#'
#' @examples
#' digit_analysis(c(1.234, 65.4321, 53.222), type = 'terminal')
#' digit_analysis(c(1.234, 65.4321, 53.222), type = 'benford')
digit_analys... |
data <- read.table("./household_power_consumption.txt", sep = ";", dec = ".", header = TRUE,
col.names = c("Date","Time", "Global_active_power", "Global_reactive_power",
"Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2",
"Sub_metering_3"), na.string = "?")
data_subset <- data[(data$Date == "1/2/2... | /plot3.R | no_license | ywsheng227/exploratory_data_analysis_1 | R | false | false | 968 | r | data <- read.table("./household_power_consumption.txt", sep = ";", dec = ".", header = TRUE,
col.names = c("Date","Time", "Global_active_power", "Global_reactive_power",
"Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2",
"Sub_metering_3"), na.string = "?")
data_subset <- data[(data$Date == "1/2/2... |
# 5. How have emissions from motor vehicle sources changed from 1999–2008 in
# Baltimore City?
library(RDS)
NEI <- readRDS("exdata-data-NEI_data/summarySCC_PM25.rds")
SCC <- readRDS("exdata-data-NEI_data/Source_Classification_Code.rds")
library(ggplot2)
v <- grepl("vehicle", SCC$SCC.Level.Two, ignore.case=TRUE)
vSCC... | /MyNotes/04 - Exploratory Data Analysis/CourseProject2/plot5.R | no_license | vitorefigenio/datasciencecoursera | R | false | false | 791 | r | # 5. How have emissions from motor vehicle sources changed from 1999–2008 in
# Baltimore City?
library(RDS)
NEI <- readRDS("exdata-data-NEI_data/summarySCC_PM25.rds")
SCC <- readRDS("exdata-data-NEI_data/Source_Classification_Code.rds")
library(ggplot2)
v <- grepl("vehicle", SCC$SCC.Level.Two, ignore.case=TRUE)
vSCC... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/exports.R
\name{get_jira_server_info}
\alias{get_jira_server_info}
\title{Get the JIRA server information as a \code{data.frame}}
\usage{
get_jira_server_info(
domain = NULL,
username = NULL,
password = NULL,
verbose = FALSE
)
}
\argu... | /man/get_jira_server_info.Rd | permissive | amishakov/JirAgileR | R | false | true | 2,029 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/exports.R
\name{get_jira_server_info}
\alias{get_jira_server_info}
\title{Get the JIRA server information as a \code{data.frame}}
\usage{
get_jira_server_info(
domain = NULL,
username = NULL,
password = NULL,
verbose = FALSE
)
}
\argu... |
library(testthat)
library(BLRF)
test_check("BLRF")
| /BLRF/tests/testthat.R | permissive | STA141C/Final_project | R | false | false | 52 | r | library(testthat)
library(BLRF)
test_check("BLRF")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hbgd-package.R
\docType{data}
\name{hbgd_labels_df}
\alias{hbgd_labels_df}
\title{Labels for common variable names in hbgd data}
\usage{
hbgd_labels_df
}
\description{
Labels for common variable names in hbgd data, used in \code{\link{get_dat... | /man/hbgd_labels_df.Rd | permissive | hafen/hbgd | R | false | true | 391 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hbgd-package.R
\docType{data}
\name{hbgd_labels_df}
\alias{hbgd_labels_df}
\title{Labels for common variable names in hbgd data}
\usage{
hbgd_labels_df
}
\description{
Labels for common variable names in hbgd data, used in \code{\link{get_dat... |
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = c(-5.59219752033303e+72, -1.06823407896587e-87, -4.25255837648531e+71, 1.7951202446173e-155, -8.18790345762274e-12, -4.84876319029531e+202, -3.96895588925774e+304, -1.15261897385914e+41, -4.16286459815484e-108, -2.95899697222989e+94, 0, 0, 0, 0, 0, 0, 0, 0... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615860153-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 428 | r | testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = c(-5.59219752033303e+72, -1.06823407896587e-87, -4.25255837648531e+71, 1.7951202446173e-155, -8.18790345762274e-12, -4.84876319029531e+202, -3.96895588925774e+304, -1.15261897385914e+41, -4.16286459815484e-108, -2.95899697222989e+94, 0, 0, 0, 0, 0, 0, 0, 0... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ec2_operations.R
\name{ec2_import_image}
\alias{ec2_import_image}
\title{Import single or multi-volume disk images or EBS snapshots into an
Amazon Machine Image (AMI)}
\usage{
ec2_import_image(Architecture, ClientData, ClientToken, Descriptio... | /paws/man/ec2_import_image.Rd | permissive | sanchezvivi/paws | R | false | true | 6,587 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ec2_operations.R
\name{ec2_import_image}
\alias{ec2_import_image}
\title{Import single or multi-volume disk images or EBS snapshots into an
Amazon Machine Image (AMI)}
\usage{
ec2_import_image(Architecture, ClientData, ClientToken, Descriptio... |
\name{PE}
\alias{PE}
\title{Partition entropy}
\description{
Produces the partition entropy index. The optimal number of clusters \emph{k} is is such that the index takes the minimum value.
}
\usage{
PE (U, b)
}
\arguments{
\item{U}{Membership degree matrix}
\item{b}{Logarithmic base (default: exp(1))}
}
\value{
... | /man/PE.Rd | no_license | cran/fclust | R | false | false | 1,112 | rd | \name{PE}
\alias{PE}
\title{Partition entropy}
\description{
Produces the partition entropy index. The optimal number of clusters \emph{k} is is such that the index takes the minimum value.
}
\usage{
PE (U, b)
}
\arguments{
\item{U}{Membership degree matrix}
\item{b}{Logarithmic base (default: exp(1))}
}
\value{
... |
# load data
source(data_claning.R')
# open device
png(filename='plot3.png',width=480,height=480,units='px')
# plot data
lncol<-c('black','red','blue')
lbls<-c('Sub_metering_1','Sub_metering_2','Sub_metering_3')
plot(power.consumption$DateTime,power.consumption$SubMetering1,type='l',col=lncol[1],xlab='',ylab='Energy s... | /plot3.R | no_license | annaszungyi/ExData_Plotting1 | R | false | false | 585 | r | # load data
source(data_claning.R')
# open device
png(filename='plot3.png',width=480,height=480,units='px')
# plot data
lncol<-c('black','red','blue')
lbls<-c('Sub_metering_1','Sub_metering_2','Sub_metering_3')
plot(power.consumption$DateTime,power.consumption$SubMetering1,type='l',col=lncol[1],xlab='',ylab='Energy s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/peak_matrix.R
\name{get_peak_matrix}
\alias{get_peak_matrix}
\title{retrieve matrix of precalculated peaks}
\usage{
get_peak_matrix(fid)
}
\arguments{
\item{fid}{h5d file handle}
}
\value{
matrix of all peaks captured in Ionicion sofrtware
}
... | /man/get_peak_matrix.Rd | permissive | bdcaf/rawTof | R | false | true | 421 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/peak_matrix.R
\name{get_peak_matrix}
\alias{get_peak_matrix}
\title{retrieve matrix of precalculated peaks}
\usage{
get_peak_matrix(fid)
}
\arguments{
\item{fid}{h5d file handle}
}
\value{
matrix of all peaks captured in Ionicion sofrtware
}
... |
#### Looking at RAD SNPs from Seeb lab for lower 48 chum
setwd("V:/WORK/Chum/AHRP")
## save.image("V:/WORK/Chum/AHRP/RAD_SNPs.RData")
## load("V:/WORK/Chum/AHRP/RAD_SNPs.RData")
## rm(list=setdiff(ls(), c(objects(pattern="RAD"),"fun","hets","ps","phase1","allSNPs","SNPs192")))
RAD_part1=readClipboard()
RAD_part2=rea... | /RAD_SNPs.R | no_license | krshedd/SEAK-Chum-Parentage | R | false | false | 3,987 | r | #### Looking at RAD SNPs from Seeb lab for lower 48 chum
setwd("V:/WORK/Chum/AHRP")
## save.image("V:/WORK/Chum/AHRP/RAD_SNPs.RData")
## load("V:/WORK/Chum/AHRP/RAD_SNPs.RData")
## rm(list=setdiff(ls(), c(objects(pattern="RAD"),"fun","hets","ps","phase1","allSNPs","SNPs192")))
RAD_part1=readClipboard()
RAD_part2=rea... |
library(dplyr)
library(prodlim)
rm(list = ls())
source("~/Desktop/PharmaceuticsData/HPMC/maxDissim9.R")
allX<- read.csv("~/Desktop/PharmaceuticsData/HPMC/remaining_data.csv")
extra <- read.csv("~/Desktop/PharmaceuticsData/HPMC/final_testing_data.csv")
##scale range from 0 to 1
alldata <- data.matrix(allX)
extrada... | /net.mydreamy.mlpharmaceutics.hydrophilicmatrixtablet/src/main/java/net/mydreamy/mlpharmaceutics/hydrophilicmatrixtablet/finalcode/hpmc.R | no_license | yylonly/SolidDispersion | R | false | false | 4,251 | r | library(dplyr)
library(prodlim)
rm(list = ls())
source("~/Desktop/PharmaceuticsData/HPMC/maxDissim9.R")
allX<- read.csv("~/Desktop/PharmaceuticsData/HPMC/remaining_data.csv")
extra <- read.csv("~/Desktop/PharmaceuticsData/HPMC/final_testing_data.csv")
##scale range from 0 to 1
alldata <- data.matrix(allX)
extrada... |
md2html <- function(text){
html_chunk <- markdown::markdownToHTML(text = text,
fragment.only = TRUE)
htmltools::HTML(html_chunk)
}
| /inst/rmd_template/wellbeing/auxiliary.R | permissive | standardgalactic/wpa | R | false | false | 179 | r | md2html <- function(text){
html_chunk <- markdown::markdownToHTML(text = text,
fragment.only = TRUE)
htmltools::HTML(html_chunk)
}
|
#Dafermos and Nikolaidi model for students (September 2018)
#Basic version
#Reproduced by Marco Veronese Passarella, April 4th, 2020
#Clear all
rm(list=ls(all=TRUE))
T<-51
#Upload data from Dropbox
Data <- read.csv( "https://www.dropbox.com/s/kusoabl4s8clhvj/data_dafnik.csv?dl=1" )
#Endogenous variable... | /dafnik.R | no_license | marcoverpas/SFC-models-R | R | false | false | 5,860 | r | #Dafermos and Nikolaidi model for students (September 2018)
#Basic version
#Reproduced by Marco Veronese Passarella, April 4th, 2020
#Clear all
rm(list=ls(all=TRUE))
T<-51
#Upload data from Dropbox
Data <- read.csv( "https://www.dropbox.com/s/kusoabl4s8clhvj/data_dafnik.csv?dl=1" )
#Endogenous variable... |
#----------------------------------------------------------------
# Environment Set-up
#----------------------------------------------------------------
rm(list=ls(all=TRUE))
gc()
options(scipen=999)
library(xgboost)
setwd("/home/rstudio/Dropbox/Public/Springleaf")
subversion <- "10_58"
startTime <- Sys.time()
#-----... | /Benchmark Scripts/CV/Codes/CV_10/CV_10_58.R | no_license | vikasnitk85/SpringleafMarketingesponse | R | false | false | 4,617 | r | #----------------------------------------------------------------
# Environment Set-up
#----------------------------------------------------------------
rm(list=ls(all=TRUE))
gc()
options(scipen=999)
library(xgboost)
setwd("/home/rstudio/Dropbox/Public/Springleaf")
subversion <- "10_58"
startTime <- Sys.time()
#-----... |
\name{PamChipAllPepResults-class}
\docType{class}
\alias{PamChipAllPepResults-class}
\alias{PamChipAllPepResults}
\alias{show,PamChipAllPepResults-method}
\title{"PamChipAllPepResults"}
\description{Object returned by \code{\link{AutoPamGeneMix}}.}
\section{Slots}{
\describe{
\item{\code{AllPepRes}:... | /man/PamChipAllPepResults-class.Rd | no_license | cran/PamGeneMixed | R | false | false | 1,098 | rd | \name{PamChipAllPepResults-class}
\docType{class}
\alias{PamChipAllPepResults-class}
\alias{PamChipAllPepResults}
\alias{show,PamChipAllPepResults-method}
\title{"PamChipAllPepResults"}
\description{Object returned by \code{\link{AutoPamGeneMix}}.}
\section{Slots}{
\describe{
\item{\code{AllPepRes}:... |
#=======================================================================================================================================
# These are the R commands used to analyze the RNAseq data from HTseq output (not included in the current shell script - but provided
# in class in case we can't get stringtie / prepD... | /EdgeR_HTseq.R | no_license | biancamocanu/5430_RNAseq | R | false | false | 4,052 | r | #=======================================================================================================================================
# These are the R commands used to analyze the RNAseq data from HTseq output (not included in the current shell script - but provided
# in class in case we can't get stringtie / prepD... |
library(testthat)
library(RcppDeepState)
library(nc)
context("rcppdeepstate")
insts_path <- system.file(package="LOPART")
print(insts_path)
insts_path <- gsub("/LOPART.Rcheck/LOPART","",insts_path)
print(insts_path)
RcppDeepState::make_run()
RcppDeepState::deepstate_ci_setup(insts_path)
travis_path<-file.path(insts_pa... | /tests/testthat/test-rcppdeepstate.R | no_license | akhikolla/LOPART | R | false | false | 1,073 | r | library(testthat)
library(RcppDeepState)
library(nc)
context("rcppdeepstate")
insts_path <- system.file(package="LOPART")
print(insts_path)
insts_path <- gsub("/LOPART.Rcheck/LOPART","",insts_path)
print(insts_path)
RcppDeepState::make_run()
RcppDeepState::deepstate_ci_setup(insts_path)
travis_path<-file.path(insts_pa... |
TMtest <- function(y, trt, n, dferror, mserror, alpha, dms) {
Ybar <- tapply(y, trt, mean)
Ybar <- sort(Ybar)
posmax <- as.integer(which.max(Ybar[2:n]-Ybar[1:(n - 1)]))
if (posmax >= (n - posmax)) {
Ymean <- mean(Ybar[1:posmax])
} else
{
Ymean <- mean(Ybar[(posmax + 1):n])
}
range <- n
... | /R/TMtest.R | no_license | bendeivide/midrangeMCP | R | false | false | 2,265 | r | TMtest <- function(y, trt, n, dferror, mserror, alpha, dms) {
Ybar <- tapply(y, trt, mean)
Ybar <- sort(Ybar)
posmax <- as.integer(which.max(Ybar[2:n]-Ybar[1:(n - 1)]))
if (posmax >= (n - posmax)) {
Ymean <- mean(Ybar[1:posmax])
} else
{
Ymean <- mean(Ybar[(posmax + 1):n])
}
range <- n
... |
## ----setup, echo = FALSE-------------------------------------------------
knitr::opts_chunk$set(
collapse=TRUE,
comment = NA,
prompt = TRUE
)
set.seed(42)
## ----installation, eval=FALSE--------------------------------------------
# library(devtools)
# install_github(repo = 'lageIBUSP/Rsampling')
... | /inst/doc/RRR.R | no_license | ayanamartins/Rsampling | R | false | false | 7,111 | r | ## ----setup, echo = FALSE-------------------------------------------------
knitr::opts_chunk$set(
collapse=TRUE,
comment = NA,
prompt = TRUE
)
set.seed(42)
## ----installation, eval=FALSE--------------------------------------------
# library(devtools)
# install_github(repo = 'lageIBUSP/Rsampling')
... |
# file MASS/R/kde2d.R
# copyright (C) 1994-2009 W. N. Venables and B. D. Ripley
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or 3 of the License
# (at your option).
#
#... | /MASS/R/kde2d.R | no_license | radfordneal/R-package-mods | R | false | false | 1,532 | r | # file MASS/R/kde2d.R
# copyright (C) 1994-2009 W. N. Venables and B. D. Ripley
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or 3 of the License
# (at your option).
#
#... |
# Element 8: Tidyverse -- dplyr ----
# Load packages ----
# This should already be loaded if you executed the commands in the previous file.
library(tidyverse)
# The PlayData_t dataset comes from the previous file.
# Scenario 1: Aggregation across height & width
# Scenario 2: Aggregation across time 1 & time 2
... | /10 - Element 7- dplyr Recap and Conclusion.R | no_license | Scavetta/DAwR | R | false | false | 376 | r | # Element 8: Tidyverse -- dplyr ----
# Load packages ----
# This should already be loaded if you executed the commands in the previous file.
library(tidyverse)
# The PlayData_t dataset comes from the previous file.
# Scenario 1: Aggregation across height & width
# Scenario 2: Aggregation across time 1 & time 2
... |
currency = "USD"
dependent_var = "log_severity_to_average_after_max_volume_weighted"
#dependent_var = "log_magnitude"
if (currency == "BTC") {
input_filename = "./data/joined_price_network_trivialness_btc.csv"
} else if (currency == "USD") {
input_filename = "./data/joined_price_network_trivialness_usd.csv"
}
if (... | /analysis/models_with_trivialness.R | no_license | nikete/Comunity-Structure-Extremely-Speculative-Asset-Dynamics | R | false | false | 26,662 | r | currency = "USD"
dependent_var = "log_severity_to_average_after_max_volume_weighted"
#dependent_var = "log_magnitude"
if (currency == "BTC") {
input_filename = "./data/joined_price_network_trivialness_btc.csv"
} else if (currency == "USD") {
input_filename = "./data/joined_price_network_trivialness_usd.csv"
}
if (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.