content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checkFit.R
\name{checkFit}
\alias{checkFit}
\title{checkFit function}
\usage{
checkFit(pop)
}
\arguments{
\item{pop}{[value]}
}
\value{
[value]
}
\description{
function to (do something)
}
\details{
[fill in details here]
}
\examples{
none
}
| /man/checkFit.Rd | no_license | skayondo/breedingProgramR | R | false | true | 320 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checkFit.R
\name{checkFit}
\alias{checkFit}
\title{checkFit function}
\usage{
checkFit(pop)
}
\arguments{
\item{pop}{[value]}
}
\value{
[value]
}
\description{
function to (do something)
}
\details{
[fill in details here]
}
\examples{
none
}
|
db$run( '{"createIndexes":"metadb","indexes":[{"key":{"name":1},"name":"typename","unique":"true"}] }' )
| /CreateScripts/uniqueindex.R | no_license | ceparman/ShinyLIMS | R | false | false | 108 | r |
db$run( '{"createIndexes":"metadb","indexes":[{"key":{"name":1},"name":"typename","unique":"true"}] }' )
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param.R
\name{check.rpath.params}
\alias{check.rpath.params}
\title{Check Rpath parameter files}
\usage{
check.rpath.params(Rpath.params)
}
\arguments{
\item{filename}{Name of the parameter file. Can be the path to a .csv or an R
object.}
\... | /Rpath/man/check.rpath.params.Rd | no_license | kakearney/RpathDev | R | false | true | 1,232 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param.R
\name{check.rpath.params}
\alias{check.rpath.params}
\title{Check Rpath parameter files}
\usage{
check.rpath.params(Rpath.params)
}
\arguments{
\item{filename}{Name of the parameter file. Can be the path to a .csv or an R
object.}
\... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/quick.helpers.R
\name{quick.SAS.labels}
\alias{quick.SAS.labels}
\title{Quick SAS Factor Labels}
\usage{
quick.SAS.labels(my.df)
}
\arguments{
\item{my.df}{Data frame to get the new information}
}
\value{
Dataframe with label information
}
\d... | /man/quick.SAS.labels.Rd | no_license | ckraner/quick.tasks | R | false | true | 415 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/quick.helpers.R
\name{quick.SAS.labels}
\alias{quick.SAS.labels}
\title{Quick SAS Factor Labels}
\usage{
quick.SAS.labels(my.df)
}
\arguments{
\item{my.df}{Data frame to get the new information}
}
\value{
Dataframe with label information
}
\d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rand_dist.R
\name{rand_dist}
\alias{rand_dist}
\title{Randomization Test Distribution}
\usage{
rand_dist(x, show.all = TRUE)
}
\arguments{
\item{x}{double}
\item{show.all}{boolean}
}
\value{
output
}
\description{
Display the distribution of... | /man/rand_dist.Rd | permissive | fourthz/nplearn | R | false | true | 434 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rand_dist.R
\name{rand_dist}
\alias{rand_dist}
\title{Randomization Test Distribution}
\usage{
rand_dist(x, show.all = TRUE)
}
\arguments{
\item{x}{double}
\item{show.all}{boolean}
}
\value{
output
}
\description{
Display the distribution of... |
library(dplyr)
# reading test data, including activity and subject
test <- read.table("./X_test.txt")
test_activ <- read.table("./y_test.txt", colClasses = "factor", col.names = "activity")
test_subject <- read.table("./subject_test.txt", colClasses = "factor", col.names = "subject")
# reading train data, incl... | /run_analysis.R | no_license | juanjord/cleaningdata_project | R | false | false | 1,960 | r | library(dplyr)
# reading test data, including activity and subject
test <- read.table("./X_test.txt")
test_activ <- read.table("./y_test.txt", colClasses = "factor", col.names = "activity")
test_subject <- read.table("./subject_test.txt", colClasses = "factor", col.names = "subject")
# reading train data, incl... |
library(tidyverse)
load("rdas/murders.rda")
head(murders)
murders%>% mutate(abb=reorder(abb,rate))%>%
ggplot(aes(abb,rate))+
geom_bar(width=0.5,stat = "identity", color="black")+coord_flip()
ggsave("figs/barplot.png")
| /analysis.R | no_license | Binmana/murders | R | false | false | 222 | r | library(tidyverse)
load("rdas/murders.rda")
head(murders)
murders%>% mutate(abb=reorder(abb,rate))%>%
ggplot(aes(abb,rate))+
geom_bar(width=0.5,stat = "identity", color="black")+coord_flip()
ggsave("figs/barplot.png")
|
## input a matrix to compute its inverse, if there is already an existing matrix
## it checks if it is the same with the old one
## if it is, the cacheSolve will return the old matrix
## Assignment number 3.
## i understand a little how the code works, but i cant grasp the idea fully
## would really appreciate if you... | /cachematrix.R | no_license | lemuellozada/ProgrammingAssignment2 | R | false | false | 1,386 | r | ## input a matrix to compute its inverse, if there is already an existing matrix
## it checks if it is the same with the old one
## if it is, the cacheSolve will return the old matrix
## Assignment number 3.
## i understand a little how the code works, but i cant grasp the idea fully
## would really appreciate if you... |
\name{graze}
\alias{graze}
\docType{data}
\title{ Site information and grazed vegetation data. }
\description{
This data frame contains site location, landscape context and dominant plant species abundances for 25 of the plant species found in 50 grazed pastures in the northeastern United States. Elements are the mea... | /man/graze.Rd | no_license | cran/ecodist | R | false | false | 2,876 | rd | \name{graze}
\alias{graze}
\docType{data}
\title{ Site information and grazed vegetation data. }
\description{
This data frame contains site location, landscape context and dominant plant species abundances for 25 of the plant species found in 50 grazed pastures in the northeastern United States. Elements are the mea... |
library(tidyverse)
library(ggplot2)
library(rstan)
library(shinystan)
setwd("~/basketball")
df = read_csv('data/rw_nba.csv')# %>% sample_n(1000)
sdata = list(N = nrow(df),
K = 80,
x = df$x,
y = df$result)
fit = stan('models/rff_bernoulli.stan', data = sdata, chains = 4, cores ... | /westbrook_rff.R | no_license | bbbales2/basketball | R | false | false | 1,468 | r | library(tidyverse)
library(ggplot2)
library(rstan)
library(shinystan)
setwd("~/basketball")
df = read_csv('data/rw_nba.csv')# %>% sample_n(1000)
sdata = list(N = nrow(df),
K = 80,
x = df$x,
y = df$result)
fit = stan('models/rff_bernoulli.stan', data = sdata, chains = 4, cores ... |
# Setup
library(googlesheets)
library(dplyr)
library(lubridate)
library(zoo)
library(randomForest)
library(timeDate)
library(rvest)
library(tidyr)
library(jsonlite)
library(shiny)
library(ggplot2)
library(data.table)
# Helper Functions
get_monthly_weather <- function(airport="PDX", date=as.Date("2016-12-19")) {
... | /global.R | no_license | ntbryant/PyroPizzaPredictor | R | false | false | 9,718 | r |
# Setup
library(googlesheets)
library(dplyr)
library(lubridate)
library(zoo)
library(randomForest)
library(timeDate)
library(rvest)
library(tidyr)
library(jsonlite)
library(shiny)
library(ggplot2)
library(data.table)
# Helper Functions
get_monthly_weather <- function(airport="PDX", date=as.Date("2016-12-19")) {
... |
library(tidyverse)
library(toolbox)
# reference ---------------------------------------------------------------
met.thresh.df <-
data.table::fread(
"H:/Projects/Chessie_BIBI/report/FINAL_May25_2017/2017_Data/Metric_Thresholds/metric_thresholds.csv"
) %>%
toolbox::prep_df() %>%
filter(
taxonomic_resolut... | /dev/bio_fam_funs_dev_old.R | no_license | InterstateCommissionPotomacRiverBasin/bibi2.0 | R | false | false | 25,297 | r | library(tidyverse)
library(toolbox)
# reference ---------------------------------------------------------------
met.thresh.df <-
data.table::fread(
"H:/Projects/Chessie_BIBI/report/FINAL_May25_2017/2017_Data/Metric_Thresholds/metric_thresholds.csv"
) %>%
toolbox::prep_df() %>%
filter(
taxonomic_resolut... |
#' @title Title
#'
#' @description Description
#'
#' @param x A number.
#' @param y A number.
#' @return return value here.
#' @details
#' Additional details here
#' @examples
#' example function call here
#' @export
risk_group_changes <- function(dat,at){
#wrapper for various transition functions for social attribu... | /pkg/R/risk_group_changes.R | no_license | RodrigoAnderle/EvoNetHIV | R | false | false | 1,520 | r | #' @title Title
#'
#' @description Description
#'
#' @param x A number.
#' @param y A number.
#' @return return value here.
#' @details
#' Additional details here
#' @examples
#' example function call here
#' @export
risk_group_changes <- function(dat,at){
#wrapper for various transition functions for social attribu... |
battles <- read.csv("battles.csv")
deaths <- read.csv("character-deaths.csv")
predictions <- read.csv("character-predictions.csv")
str(battles)
temp <- as.factor(battles$year)
plot(temp)
#maximum battles in year 299, then year 300, then 298
summary(battles$battle_number)
table(battles$battle_number)
table(battles$attac... | /game of thrones.R | no_license | srikarth/Game-of-Thrones | R | false | false | 4,442 | r | battles <- read.csv("battles.csv")
deaths <- read.csv("character-deaths.csv")
predictions <- read.csv("character-predictions.csv")
str(battles)
temp <- as.factor(battles$year)
plot(temp)
#maximum battles in year 299, then year 300, then 298
summary(battles$battle_number)
table(battles$battle_number)
table(battles$attac... |
#' Fit the probabilistic dropout parameters
#'
#' The method infers the position and scale of the dropout sigmoids, the
#' location prior of the means and the prior for the variance. In addition it
#' estimates some feature parameters (mean, uncertainty of mean and variance
#' for each protein and condition).
... | /R/fit_hyperparameters.R | no_license | const-ae/proDD | R | false | false | 13,152 | r |
#' Fit the probabilistic dropout parameters
#'
#' The method infers the position and scale of the dropout sigmoids, the
#' location prior of the means and the prior for the variance. In addition it
#' estimates some feature parameters (mean, uncertainty of mean and variance
#' for each protein and condition).
... |
meshRows_hda <-
function(df1, df2) {
rn <- rownames(df1)[{rownames(df1) %in% rownames(df2)}];
ndf1 <- df1[rn, ];
ndf2 <- df2[rn, ];
return(list(ndf1, ndf2))}
| /R/meshRows_hda.R | no_license | chronchi/simpleTTMap | R | false | false | 174 | r | meshRows_hda <-
function(df1, df2) {
rn <- rownames(df1)[{rownames(df1) %in% rownames(df2)}];
ndf1 <- df1[rn, ];
ndf2 <- df2[rn, ];
return(list(ndf1, ndf2))}
|
#' Trojkat
#'
#' @description funkcja tworzaca obiekt jakim jest trojkat na podstawie
#' odpowiednich parametrow - wspolrzednych.
#'
#' @param x1 wspolrzedna pierwszego punktu na osi x
#' @param x2 wspolrzedna drugiego punktu na osi x
#' @param x3 wspolrzedna trzeciego punktu na osi x
#' @param y1 wspolrzedna pierwszeg... | /R/trojkat.R | no_license | bartlomiejtyrcha/mathobjects | R | false | false | 1,317 | r | #' Trojkat
#'
#' @description funkcja tworzaca obiekt jakim jest trojkat na podstawie
#' odpowiednich parametrow - wspolrzednych.
#'
#' @param x1 wspolrzedna pierwszego punktu na osi x
#' @param x2 wspolrzedna drugiego punktu na osi x
#' @param x3 wspolrzedna trzeciego punktu na osi x
#' @param y1 wspolrzedna pierwszeg... |
# ----------------------------------------
# Temporal Scaling Analyses -- Create baseline growing season model
# Non-linear driver effects through time
# Christy Rollinson, crollinson@gmail.com
# Date Created: 10 July 2015
# ----------------------------------------
# -------------------------
# Objectives & Overview
# ... | /R/Exploratory2/2a_process_drivers_all_drivers_byResolution_GS_dAGB.R | no_license | PalEON-Project/Temporal-Scaling-MS | R | false | false | 12,931 | r | # ----------------------------------------
# Temporal Scaling Analyses -- Create baseline growing season model
# Non-linear driver effects through time
# Christy Rollinson, crollinson@gmail.com
# Date Created: 10 July 2015
# ----------------------------------------
# -------------------------
# Objectives & Overview
# ... |
exp.fitter <- function(degrees = 150, inc = 1, bin.factor = 1, is.plot = TRUE, fit = exp.fit, x = i100[i100*FUV>0], y = FUV[i100*FUV>0], z = long[i100*FUV>0], mu = rep(1,9), sig = rep(1,9)){
x <- x[z < degrees + inc & z >= degrees];
y <- y[z < degrees + inc & z >= degrees];
#Fit the Model
exp.data <- list(N ... | /Hierarchical Model/Exponential Model/Exp_Fitter.R | no_license | swupnil/astronomy_ep | R | false | false | 1,584 | r | exp.fitter <- function(degrees = 150, inc = 1, bin.factor = 1, is.plot = TRUE, fit = exp.fit, x = i100[i100*FUV>0], y = FUV[i100*FUV>0], z = long[i100*FUV>0], mu = rep(1,9), sig = rep(1,9)){
x <- x[z < degrees + inc & z >= degrees];
y <- y[z < degrees + inc & z >= degrees];
#Fit the Model
exp.data <- list(N ... |
PEVMAX0 <-
function(Train,Test, P, lambda=1e-5){
PTrain<-P[rownames(P)%in%Train,]
PEVmean<-max(diag(PTrain%*%solve(crossprod(PTrain)+lambda*diag(ncol(P)),t(PTrain))))
return(PEVmean)
} | /STPGA/R/PEVMAX0.R | no_license | ingted/R-Examples | R | false | false | 201 | r |
PEVMAX0 <-
function(Train,Test, P, lambda=1e-5){
PTrain<-P[rownames(P)%in%Train,]
PEVmean<-max(diag(PTrain%*%solve(crossprod(PTrain)+lambda*diag(ncol(P)),t(PTrain))))
return(PEVmean)
} |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{crtTest}
\alias{crtTest}
\title{Test Rcpp function}
\usage{
crtTest(test)
}
\arguments{
\item{test}{test parameter}
}
\description{
Test Rcpp function
}
| /man/crtTest.Rd | no_license | olssol/rwetools | R | false | true | 251 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{crtTest}
\alias{crtTest}
\title{Test Rcpp function}
\usage{
crtTest(test)
}
\arguments{
\item{test}{test parameter}
}
\description{
Test Rcpp function
}
|
#!/usr/bin/env Rscript
# Plots mean referring ability (RA) weight for round and calculates significance using a general linear model with random effects for dyad ("session").
#
#
# Copyright 2018 Todd Shore
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compli... | /plot_round_ra.R | permissive | errantlinguist/tangrams-analysis | R | false | false | 3,393 | r | #!/usr/bin/env Rscript
# Plots mean referring ability (RA) weight for round and calculates significance using a general linear model with random effects for dyad ("session").
#
#
# Copyright 2018 Todd Shore
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compli... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lib_writeme.R
\name{lib_writeme}
\alias{lib_writeme}
\title{Document the dependancies}
\usage{
lib_writeme(script)
}
\arguments{
\item{script}{a .R file}
}
\value{
markdown
}
\description{
Input a R script to prepare a markdown file documenti... | /man/lib_writeme.Rd | permissive | UBC-MDS/librely | R | false | true | 428 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lib_writeme.R
\name{lib_writeme}
\alias{lib_writeme}
\title{Document the dependancies}
\usage{
lib_writeme(script)
}
\arguments{
\item{script}{a .R file}
}
\value{
markdown
}
\description{
Input a R script to prepare a markdown file documenti... |
\name{dgCMatrix-class}
\docType{class}
\title{Compressed, sparse, column-oriented numeric matrices}
\alias{dgCMatrix-class}
\alias{as.vector,dgCMatrix,missing-method}
\alias{coerce,matrix,dgCMatrix-method}
\alias{coerce,dgeMatrix,dgCMatrix-method}
\alias{coerce,dgCMatrix,dgTMatrix-method}
\alias{coerce,dgCMatrix,dsCMat... | /branches/Matrix-new-SuiteSparse/man/dgCMatrix-class.Rd | no_license | LTLA/Matrix | R | false | false | 3,678 | rd | \name{dgCMatrix-class}
\docType{class}
\title{Compressed, sparse, column-oriented numeric matrices}
\alias{dgCMatrix-class}
\alias{as.vector,dgCMatrix,missing-method}
\alias{coerce,matrix,dgCMatrix-method}
\alias{coerce,dgeMatrix,dgCMatrix-method}
\alias{coerce,dgCMatrix,dgTMatrix-method}
\alias{coerce,dgCMatrix,dsCMat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analysis.R
\name{elite.network.org}
\alias{elite.network.org}
\title{Elite network for affiliations}
\usage{
elite.network.org(den = den, sigma = 14)
}
\arguments{
\item{sigma}{the number of members in an affiliation above which all affiliati... | /man/elite.network.org.Rd | no_license | antongrau/soc.elite | R | false | true | 513 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analysis.R
\name{elite.network.org}
\alias{elite.network.org}
\title{Elite network for affiliations}
\usage{
elite.network.org(den = den, sigma = 14)
}
\arguments{
\item{sigma}{the number of members in an affiliation above which all affiliati... |
\name{AM2016ClimateSensitiveSINorway}
\alias{AM2016ClimateSensitiveSINorway}
\title{
Climate-sensitive site index models for Norway
}
\description{
Implementation of models for climate-sensitive site index models for
Norway as described in Antón-Fernández et al. (2016).
}
\usage{
AM2016ClimateSensitiveSINorway(soilqua... | /man/AM2016ClimateSensitiveSINorway.Rd | no_license | cran/sitreeE | R | false | false | 1,506 | rd | \name{AM2016ClimateSensitiveSINorway}
\alias{AM2016ClimateSensitiveSINorway}
\title{
Climate-sensitive site index models for Norway
}
\description{
Implementation of models for climate-sensitive site index models for
Norway as described in Antón-Fernández et al. (2016).
}
\usage{
AM2016ClimateSensitiveSINorway(soilqua... |
testlist <- list(cost = structure(c(1.44888560957826e+135, 1.6249392498385e+65, 5.27956628994611e-134, 1.56839475268612e-251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 5L)), flow = structure(c(3.80768289350145e+125, 8.58414828913381e+155, 3.37787969964034e+43, 2.83184518248624e-19... | /epiphy/inst/testfiles/costTotCPP/AFL_costTotCPP/costTotCPP_valgrind_files/1615926790-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 1,101 | r | testlist <- list(cost = structure(c(1.44888560957826e+135, 1.6249392498385e+65, 5.27956628994611e-134, 1.56839475268612e-251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 5L)), flow = structure(c(3.80768289350145e+125, 8.58414828913381e+155, 3.37787969964034e+43, 2.83184518248624e-19... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 3878
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 3864
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 3864
c
c Input Parameter (command line, fil... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/MayerEichberger-Saffidine/PositionalGames_hex/hex_rand_5x5-6m-8/hex_rand_5x5-6m-8.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 830 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 3878
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 3864
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 3864
c
c Input Parameter (command line, fil... |
meansArray <- vector('numeric')
for(i in 1:100){
system ("java -Xint Lab data1.txt result1.txt 600")
data1 <- read.csv('result1.txt')
data1 <- data1[100:nrow(data1),2]
meansArray <- c(meansArray,mean(data1))
}
meanOfMean <- mean(meansArray)
ci1 <-confidenceInterval(meansArray)
print(meanOfMean)
| /R-workspace/Lab 5/meanNConfidenceScript.R | no_license | mcfr3d/EDAA35-Utv-rdering-av-programvarusystem | R | false | false | 301 | r |
meansArray <- vector('numeric')
for(i in 1:100){
system ("java -Xint Lab data1.txt result1.txt 600")
data1 <- read.csv('result1.txt')
data1 <- data1[100:nrow(data1),2]
meansArray <- c(meansArray,mean(data1))
}
meanOfMean <- mean(meansArray)
ci1 <-confidenceInterval(meansArray)
print(meanOfMean)
|
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/grmCAT.R
\name{grmCAT}
\alias{grmCAT}
\title{Computerized Adaptive Testing Graded Response Model}
\usage{
grmCAT(data, object = NULL, ...)
}
\arguments{
\item{data}{a \code{data.frame} or a numeric \code{matrix} of manifest variables.... | /catSurv/man/grmCAT.Rd | no_license | drmiller1220/CATSurv | R | false | false | 2,054 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/grmCAT.R
\name{grmCAT}
\alias{grmCAT}
\title{Computerized Adaptive Testing Graded Response Model}
\usage{
grmCAT(data, object = NULL, ...)
}
\arguments{
\item{data}{a \code{data.frame} or a numeric \code{matrix} of manifest variables.... |
devtools::load_all()
devtools::document()
devtools::build(binary = TRUE)
| /previous_work/package_dev.R | no_license | ethanwhite/LDATS | R | false | false | 73 | r | devtools::load_all()
devtools::document()
devtools::build(binary = TRUE)
|
library(testthat)
library(covid19India)
test_check("covid19India")
| /tests/testthat.R | permissive | shubhrampandey/covid19India | R | false | false | 68 | r | library(testthat)
library(covid19India)
test_check("covid19India")
|
############### SESYNC Research Support: Fisheries and food security ##########
## Importing and processing data from survey for the fisheries project at SESYNC.
##
## DATE CREATED: 06/06/2017
## DATE MODIFIED: 04/24/2018
## AUTHORS: Benoit Parmentier
## PROJECT: Garden Wealth (urban garden)
## ISSUE:
## TO DO:
##
... | /connectivity_and_resistance_surface_example.R | no_license | bparment1/cost_and_resistance_surface_analyses | R | false | false | 9,659 | r | ############### SESYNC Research Support: Fisheries and food security ##########
## Importing and processing data from survey for the fisheries project at SESYNC.
##
## DATE CREATED: 06/06/2017
## DATE MODIFIED: 04/24/2018
## AUTHORS: Benoit Parmentier
## PROJECT: Garden Wealth (urban garden)
## ISSUE:
## TO DO:
##
... |
/fundflow and risktaking/09-netflow大小于0.R | no_license | shenfan2018/shenfan2018 | R | false | false | 2,995 | r | ||
all_aes <- function(geom, n, .values) {
list(
required = if (n == 1) "x" else c("x", "y"),
optional_class = .values$plot$GEOM_CLASS_OPTIONAL_AES[[geom_class(geom, .values)]],
optional_geom = c(
filter(.values$plot$GEOM, name == !!geom)$optional[[1]],
.values$plot$ALWAYS_OPTIONAL
)
)
}
... | /modules/Operations/Plot/Aes/helper.R | no_license | DavidBarke/shinyplyr | R | false | false | 658 | r | all_aes <- function(geom, n, .values) {
list(
required = if (n == 1) "x" else c("x", "y"),
optional_class = .values$plot$GEOM_CLASS_OPTIONAL_AES[[geom_class(geom, .values)]],
optional_geom = c(
filter(.values$plot$GEOM, name == !!geom)$optional[[1]],
.values$plot$ALWAYS_OPTIONAL
)
)
}
... |
#plot2
# Download data file 'household_power_consumption.zip' from:
# https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip
# and unzip in working directory
setClass("CDate")
setAs("character","CDate", function(from) as.Date(from, format="%d/%m/%Y") )
data <- read.csv("household_power_... | /plot2.R | no_license | mmaul/ExData_Plotting1 | R | false | false | 804 | r | #plot2
# Download data file 'household_power_consumption.zip' from:
# https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip
# and unzip in working directory
setClass("CDate")
setAs("character","CDate", function(from) as.Date(from, format="%d/%m/%Y") )
data <- read.csv("household_power_... |
library(tidyverse)
library(dynwrap)
library(dynutils)
library(furrr)
source("data-raw/1a-helper_functions.R")
files <- list.files("../methods/", pattern = "Dockerfile", recursive = TRUE, full.names = TRUE)
# iterate over the containers and generate R scripts for each of them
# this loads in the current version from ... | /data-raw/1-generate_r_code_from_containers.R | no_license | zorrodong/dynmethods | R | false | false | 1,578 | r | library(tidyverse)
library(dynwrap)
library(dynutils)
library(furrr)
source("data-raw/1a-helper_functions.R")
files <- list.files("../methods/", pattern = "Dockerfile", recursive = TRUE, full.names = TRUE)
# iterate over the containers and generate R scripts for each of them
# this loads in the current version from ... |
\name{sellStock}
\alias{sellStock}
\title{Sell Stocks over a fix connection}
\usage{
sellStock(ticker, price, quantity)
}
\arguments{
\item{ticker}{A string representing the ticker of the security}
\item{price}{A double value representing the price}
\item{quantity}{ A double value representing the quantity }
}
\value{
... | /man/sellStock.Rd | no_license | arrebagrove/FIX | R | false | false | 577 | rd | \name{sellStock}
\alias{sellStock}
\title{Sell Stocks over a fix connection}
\usage{
sellStock(ticker, price, quantity)
}
\arguments{
\item{ticker}{A string representing the ticker of the security}
\item{price}{A double value representing the price}
\item{quantity}{ A double value representing the quantity }
}
\value{
... |
## Copyright (C) 2012, 2013 Bitergia
##
## 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 3 of the License, or
## (at your option) any later version.
##
## This program is distri... | /vizGrimoireJS/validator_dbstatus.R | no_license | rodrigoprimo/VizGrimoireR | R | false | false | 13,607 | r | ## Copyright (C) 2012, 2013 Bitergia
##
## 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 3 of the License, or
## (at your option) any later version.
##
## This program is distri... |
#####
#
# streamflow testing - regression
library(optparse)
source("/data2/3to5/I35/scripts/analysisfunctions.R")
#source("/data2/3to5/I35/scripts/colorramp.R")
library(ncdf4)
library(maps)
library(fields)
library(sp)
library(raster)
library(rasterVis)
library(maptools)
library(ggplot2)
library(zoo)
library(lars)
libr... | /streamflowregtests_all_5daymean.R | no_license | amwootte/analysisscripts | R | false | false | 28,714 | r | #####
#
# streamflow testing - regression
library(optparse)
source("/data2/3to5/I35/scripts/analysisfunctions.R")
#source("/data2/3to5/I35/scripts/colorramp.R")
library(ncdf4)
library(maps)
library(fields)
library(sp)
library(raster)
library(rasterVis)
library(maptools)
library(ggplot2)
library(zoo)
library(lars)
libr... |
# read classes first to improve read performance total dataset
tab5rows <- read.table("household_power_consumption.txt", header = TRUE, sep=';', nrows = 5)
classes <- sapply(tab5rows, class)
# read total dataset
xf <- read.table("household_power_consumption.txt", header = TRUE, sep=';', na.string="?", colClasses = cl... | /project1/plot3.R | no_license | dwoltjer/ExData_Plotting1 | R | false | false | 1,036 | r | # read classes first to improve read performance total dataset
tab5rows <- read.table("household_power_consumption.txt", header = TRUE, sep=';', nrows = 5)
classes <- sapply(tab5rows, class)
# read total dataset
xf <- read.table("household_power_consumption.txt", header = TRUE, sep=';', na.string="?", colClasses = cl... |
#' fisher
#'
#' Performs a Fisher transformation on a number between -1 and 1. If input is
#' outside that range, returns 0.
#'
#' @param r Number between -1 and 1 to be transformed.
#'
#' @return If \code{-1 < r < 1}, Fisher transformed input. Else, 0.
#'
#' @export
fisher <- function(r){
# Set r=0 if outside range.... | /DCM/R/fisher.R | no_license | oconnor-kevin/Differential-Correlation-Mining | R | false | false | 401 | r | #' fisher
#'
#' Performs a Fisher transformation on a number between -1 and 1. If input is
#' outside that range, returns 0.
#'
#' @param r Number between -1 and 1 to be transformed.
#'
#' @return If \code{-1 < r < 1}, Fisher transformed input. Else, 0.
#'
#' @export
fisher <- function(r){
# Set r=0 if outside range.... |
library("data.table")
dtime <- difftime(as.POSIXct("2007-02-03"), as.POSIXct("2007-02-01"),units="mins")
rowsToRead <- as.numeric(dtime)
DT <- fread("household_power_consumption.txt", skip="1/2/2007", nrows = rowsToRead, na.strings = c("?", ""))
DT$datetime <- as.POSIXct(paste(DT$V1,DT$V2), format="%d/%m/%Y %H:%M:%S")
... | /plot4.R | no_license | Inquisitive-Geek/ExData_Plotting1 | R | false | false | 1,077 | r | library("data.table")
dtime <- difftime(as.POSIXct("2007-02-03"), as.POSIXct("2007-02-01"),units="mins")
rowsToRead <- as.numeric(dtime)
DT <- fread("household_power_consumption.txt", skip="1/2/2007", nrows = rowsToRead, na.strings = c("?", ""))
DT$datetime <- as.POSIXct(paste(DT$V1,DT$V2), format="%d/%m/%Y %H:%M:%S")
... |
\name{predict.interflex}
\alias{predict.interflex}
\title{Plotting Marginal Effect Estimates}
\description{Plotting expected outcomes given fixed values of the treatment and moderator after either the linear, binning or the kernel estimator is applied.}
\usage{\method{predict}{interflex}(out, order = NULL, subtitle... | /man/predict.interflex.Rd | no_license | Ganzeb/interflex | R | false | false | 4,288 | rd | \name{predict.interflex}
\alias{predict.interflex}
\title{Plotting Marginal Effect Estimates}
\description{Plotting expected outcomes given fixed values of the treatment and moderator after either the linear, binning or the kernel estimator is applied.}
\usage{\method{predict}{interflex}(out, order = NULL, subtitle... |
context("Just a test of test")
test_that("test", {
x <- 1L
y <- 2L
expect_identical(x, y-x)
})
| /tests/testthat/test-test.R | no_license | cran/tribe | R | false | false | 109 | r | context("Just a test of test")
test_that("test", {
x <- 1L
y <- 2L
expect_identical(x, y-x)
})
|
#' Am example
setClass("employee",representation(
name = "character",
salary = "numeric",
union = "logical",
info = "data.frame"
)
)
setMethod("show","employee",
function(object){
inorout<-ifelse(object@union,"is","is not")
cat(object@name,"has a salary of",... | /R/employee-class.R | no_license | ritianjiang/MethyAge2 | R | false | false | 400 | r | #' Am example
setClass("employee",representation(
name = "character",
salary = "numeric",
union = "logical",
info = "data.frame"
)
)
setMethod("show","employee",
function(object){
inorout<-ifelse(object@union,"is","is not")
cat(object@name,"has a salary of",... |
# vim:textwidth=80:expandtab:shiftwidth=4:softtabstop=4
#' Class to Store AMSR-2 Satellite Data
#'
#' This class stores data from the AMSR-2 satellite.
#'
#' The Advanced Microwave Scanning Radiometer (AMSR-2) is in current operation on
#' the Japan Aerospace Exploration Agency (JAXA) GCOM-W1 space craft, launched in
... | /R/amsr.R | no_license | cran/oce | R | false | false | 37,924 | r | # vim:textwidth=80:expandtab:shiftwidth=4:softtabstop=4
#' Class to Store AMSR-2 Satellite Data
#'
#' This class stores data from the AMSR-2 satellite.
#'
#' The Advanced Microwave Scanning Radiometer (AMSR-2) is in current operation on
#' the Japan Aerospace Exploration Agency (JAXA) GCOM-W1 space craft, launched in
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Functions.R
\name{spp692}
\alias{spp692}
\title{species function}
\usage{
spp692(a, b, c, d, e)
}
\arguments{
\item{a}{environmental parameter}
\item{b}{environmental parameter}
\item{c}{environmental parameter}
\item{d}{environmental para... | /man/spp692.Rd | permissive | Djeppschmidt/Model.Microbiome | R | false | true | 456 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Functions.R
\name{spp692}
\alias{spp692}
\title{species function}
\usage{
spp692(a, b, c, d, e)
}
\arguments{
\item{a}{environmental parameter}
\item{b}{environmental parameter}
\item{c}{environmental parameter}
\item{d}{environmental para... |
######
#Author: Nashipae Waweru
#Date: 28/MARCH/2020
#Title: Building a function
# Write a function that flips a coin 100 times.
# Solution
flip <- function(){
coin <- c("Head", "Tail")
result <- sample(coin, size = 100, replace = TRUE, prob = c(0.3, 0.7) )
print(result)
}
flip()
?sample()... | /Day 12/Exercise5.R | no_license | Nashie-R/100DaysOfCodingR. | R | false | false | 467 | r | ######
#Author: Nashipae Waweru
#Date: 28/MARCH/2020
#Title: Building a function
# Write a function that flips a coin 100 times.
# Solution
flip <- function(){
coin <- c("Head", "Tail")
result <- sample(coin, size = 100, replace = TRUE, prob = c(0.3, 0.7) )
print(result)
}
flip()
?sample()... |
"batons2" <-
function(..., waist = FALSE){
bstats <- boxplot(..., plot=FALSE)
n <- ncol(bstats$stats)
max.range <- range(unlist(bstats[c(1,3:4)]))
# start plot
cl <- match.call()
if(is.na(match("xlim", names(cl)))){xl <- c(0, n+1)}
else{xl <- cl$xlim}
if(is.na(match("ylim", names(cl)))){yl <- max.range + diff(... | /simba/R/batons2.R | no_license | ingted/R-Examples | R | false | false | 520 | r | "batons2" <-
function(..., waist = FALSE){
bstats <- boxplot(..., plot=FALSE)
n <- ncol(bstats$stats)
max.range <- range(unlist(bstats[c(1,3:4)]))
# start plot
cl <- match.call()
if(is.na(match("xlim", names(cl)))){xl <- c(0, n+1)}
else{xl <- cl$xlim}
if(is.na(match("ylim", names(cl)))){yl <- max.range + diff(... |
mydata <- read.table('/Users/apple/Downloads/household_power_consumption.txt', sep = ';', header = TRUE)
mydata$Date <- strptime(mydata$Date, format = "%d/%m/%Y")
mydata$Date <- as.Date(mydata$Date)
new_data <- mydata[mydata$Date >= as.Date(strptime("1/2/07", "%d/%m/%y")) & mydata$Date <= as.Date(strptime("2/2/07", ... | /plot1.R | no_license | marmohamed/ExData_Plotting1 | R | false | false | 1,090 | r | mydata <- read.table('/Users/apple/Downloads/household_power_consumption.txt', sep = ';', header = TRUE)
mydata$Date <- strptime(mydata$Date, format = "%d/%m/%Y")
mydata$Date <- as.Date(mydata$Date)
new_data <- mydata[mydata$Date >= as.Date(strptime("1/2/07", "%d/%m/%y")) & mydata$Date <= as.Date(strptime("2/2/07", ... |
#' @title
#' Devide a matrix or a data.frame into two subsets.
#'
#' @description
#' Similar function as dplyr::sample_frac but return both sampled and remained subset.
#'
#' @param tbl [a matrix] or [a data.frame] to be split.
#' @param size [a mumeric] Sampling ratio. Must be between 0 and 1.
#'
#' @examples... | /R/split_frac.R | no_license | katokohaku/SKmisc | R | false | false | 607 | r | #' @title
#' Devide a matrix or a data.frame into two subsets.
#'
#' @description
#' Similar function as dplyr::sample_frac but return both sampled and remained subset.
#'
#' @param tbl [a matrix] or [a data.frame] to be split.
#' @param size [a mumeric] Sampling ratio. Must be between 0 and 1.
#'
#' @examples... |
library(ggplot2)
library(dplyr)
# load in misc functions to sort data and find best
source("./validation/soil_moisture/R/misc_functions.R")
# correlation matrix data
list.files("~/drought_indicators_data/correlation_matrix/",pattern = ".RData", full.names = T)%>%
lapply(., load, .GlobalEnv)
# set up storage lists ... | /validation/soil_moisture/R/post_processing_correlations.R | no_license | LMXB/drought_indicators | R | false | false | 55,404 | r | library(ggplot2)
library(dplyr)
# load in misc functions to sort data and find best
source("./validation/soil_moisture/R/misc_functions.R")
# correlation matrix data
list.files("~/drought_indicators_data/correlation_matrix/",pattern = ".RData", full.names = T)%>%
lapply(., load, .GlobalEnv)
# set up storage lists ... |
#' app UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_app_ui <- function(id) {
ns <- NS(id)
dashboard_header <- bs4Dash::dashboardHeader(
title = "COVID-19 in Canada",
fixed = TRU... | /R/mod_app.R | permissive | armcn/covidashboard | R | false | false | 3,119 | r | #' app UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_app_ui <- function(id) {
ns <- NS(id)
dashboard_header <- bs4Dash::dashboardHeader(
title = "COVID-19 in Canada",
fixed = TRU... |
library(dplyr)
library(cluster)
###################
# UI
###################
clusteringModuleUI <- function(id) {
ns <- NS(id)
fluidRow(
h2(class="panel__title", i18n$t("Clustering")),
box( width = 12,
column(12,uiOutput(ns("setup")))
),
plotOutput(ns("clusteringPlo... | /modules/clusteringModule.R | no_license | qomposer/survey-shiny-app | R | false | false | 1,992 | r | library(dplyr)
library(cluster)
###################
# UI
###################
clusteringModuleUI <- function(id) {
ns <- NS(id)
fluidRow(
h2(class="panel__title", i18n$t("Clustering")),
box( width = 12,
column(12,uiOutput(ns("setup")))
),
plotOutput(ns("clusteringPlo... |
setwd('/Users/ivanliu/Downloads/Prudential-Life-Insurance-Assessment')
library(readr)
library(xgboost)
library(Metrics)
library(Hmisc)
rm(list=ls());gc()
load('data/fin_train_test_prod.RData')
evalerror = function(preds, dtrain) {
labels <- getinfo(dtrain, "label")
err <- ScoreQuadraticWeightedKappa(as.numeri... | /Rscripts/_Fin_meta_data.R | no_license | ivanliu1989/Prudential-Life-Insurance-Assessment | R | false | false | 11,932 | r | setwd('/Users/ivanliu/Downloads/Prudential-Life-Insurance-Assessment')
library(readr)
library(xgboost)
library(Metrics)
library(Hmisc)
rm(list=ls());gc()
load('data/fin_train_test_prod.RData')
evalerror = function(preds, dtrain) {
labels <- getinfo(dtrain, "label")
err <- ScoreQuadraticWeightedKappa(as.numeri... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit_and_reporting.R
\name{geometric_mean}
\alias{geometric_mean}
\title{Geometric Mean}
\usage{
geometric_mean(x, na.rm = c(TRUE, FALSE))
}
\arguments{
\item{x}{A vector of values.}
\item{na.rm}{remove NAs by default.}
}
\value{
\itemize{
\i... | /man/geometric_mean.Rd | no_license | jishanling/umx | R | false | true | 1,501 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit_and_reporting.R
\name{geometric_mean}
\alias{geometric_mean}
\title{Geometric Mean}
\usage{
geometric_mean(x, na.rm = c(TRUE, FALSE))
}
\arguments{
\item{x}{A vector of values.}
\item{na.rm}{remove NAs by default.}
}
\value{
\itemize{
\i... |
#######################################
# Author: Rother Jay B. Copino #
# Date Create: 02/24/2017 #
# Dataset: Electric Power Consumption #
# File: plot2.png #
#######################################
# Set the current working directory
setwd("Downloads/Data Science/Module 4/Peer... | /plot2.R | no_license | rotherjay/ExData_Plotting1 | R | false | false | 1,086 | r | #######################################
# Author: Rother Jay B. Copino #
# Date Create: 02/24/2017 #
# Dataset: Electric Power Consumption #
# File: plot2.png #
#######################################
# Set the current working directory
setwd("Downloads/Data Science/Module 4/Peer... |
########################UPSETR##############################
#UpsetR takes a list of genes, with each column named after the DE list, with 1's (present gene) and 0's. I made a combined list of
HAM_24hpi_DE_genes_FDR_0.05$HAM_24hpi <- rep(1,nrow(HAM_24hpi_DE_genes_FDR_0.05))
MDM_24hpi_DE_genes_FDR_0.05$MDM_24hpi <- rep... | /R_scripts/PLOT_UpsetR.R | no_license | ThomasHall1688/Human_Bovine_comparison | R | false | false | 3,008 | r | ########################UPSETR##############################
#UpsetR takes a list of genes, with each column named after the DE list, with 1's (present gene) and 0's. I made a combined list of
HAM_24hpi_DE_genes_FDR_0.05$HAM_24hpi <- rep(1,nrow(HAM_24hpi_DE_genes_FDR_0.05))
MDM_24hpi_DE_genes_FDR_0.05$MDM_24hpi <- rep... |
\name{LapDem_Model_calc_logPP_orig}
\alias{LapDem_Model_calc_logPP_orig}
\title{The function calculating posterior probability of parameter values}
\usage{
LapDem_Model_calc_logPP_orig(params, MyData)
}
\arguments{
\item{params}{the parameter values}
\item{MyData}{The
\code{\link[LaplacesDemon]{LaplacesDemon}}... | /man/LapDem_Model_calc_logPP_orig.Rd | no_license | pedroreys/BioGeoBEARS | R | false | false | 718 | rd | \name{LapDem_Model_calc_logPP_orig}
\alias{LapDem_Model_calc_logPP_orig}
\title{The function calculating posterior probability of parameter values}
\usage{
LapDem_Model_calc_logPP_orig(params, MyData)
}
\arguments{
\item{params}{the parameter values}
\item{MyData}{The
\code{\link[LaplacesDemon]{LaplacesDemon}}... |
testlist <- list(cost = structure(c(1.44888560957826e+135, 1.6249392498385e+65, 5.27956628994611e-134, 1.56839475268612e-251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 5L)), flow = structure(c(3.80768289350145e+125, 8.58414828913381e+155, 3.37787969964034e+43, 2.83184518248624e-19... | /epiphy/inst/testfiles/costTotCPP/AFL_costTotCPP/costTotCPP_valgrind_files/1615927191-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 1,101 | r | testlist <- list(cost = structure(c(1.44888560957826e+135, 1.6249392498385e+65, 5.27956628994611e-134, 1.56839475268612e-251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 5L)), flow = structure(c(3.80768289350145e+125, 8.58414828913381e+155, 3.37787969964034e+43, 2.83184518248624e-19... |
########################################################################################################################
## segmentation.R
## created: 2019-01-04
## creator: Michael Scherer
## ---------------------------------------------------------------------------------------------------------------------
## Functi... | /R/segmentation.R | no_license | epigen/RnBeads | R | false | false | 16,660 | r | ########################################################################################################################
## segmentation.R
## created: 2019-01-04
## creator: Michael Scherer
## ---------------------------------------------------------------------------------------------------------------------
## Functi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_page_range.R
\name{get_page_range}
\alias{get_page_range}
\title{get_page_range}
\usage{
get_page_range(
country = NULL,
branch = NULL,
type = NULL,
operator_force = NULL,
query = NULL,
environment = NULL,
post_date = NULL,
... | /man/get_page_range.Rd | no_license | cgpeltier/janes | R | false | true | 1,338 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_page_range.R
\name{get_page_range}
\alias{get_page_range}
\title{get_page_range}
\usage{
get_page_range(
country = NULL,
branch = NULL,
type = NULL,
operator_force = NULL,
query = NULL,
environment = NULL,
post_date = NULL,
... |
## ----options, echo=FALSE-------------------------------------------------
opts_chunk$set(comment=NA, fig.width=6, fig.height=5, size='tiny', out.width='0.6\\textwidth', fig.align='center', message=FALSE)
library(plyr)
library(ggplot2)
library(xtable)
## ----bernoulli, echo=FALSE------------------------------------... | /courses/stat587Ag/slides/Ch04.R | no_license | jarad/jarad.github.com | R | false | false | 4,111 | r |
## ----options, echo=FALSE-------------------------------------------------
opts_chunk$set(comment=NA, fig.width=6, fig.height=5, size='tiny', out.width='0.6\\textwidth', fig.align='center', message=FALSE)
library(plyr)
library(ggplot2)
library(xtable)
## ----bernoulli, echo=FALSE------------------------------------... |
context("Test leave-like functions")
test_that("functions 'leaves()' and 'is_leafnode()' work properly", {
expect_identical(list(), leaves(empty_tree()))
tr0 = c_("Bob", "Carl", "Daniel")
expect_identical(list(r_("Daniel")), leaves(tr0))
expect_false(is_leafnode("Bob", tr0))
expect_false(is_leafnode("Car... | /tests/testthat/test-leaves.R | no_license | paulponcet/oak | R | false | false | 3,658 | r | context("Test leave-like functions")
test_that("functions 'leaves()' and 'is_leafnode()' work properly", {
expect_identical(list(), leaves(empty_tree()))
tr0 = c_("Bob", "Carl", "Daniel")
expect_identical(list(r_("Daniel")), leaves(tr0))
expect_false(is_leafnode("Bob", tr0))
expect_false(is_leafnode("Car... |
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108123e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613112954-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 251 | r | testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108123e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) |
#Chapter 3 - analysis with spark
#Thomas Zwagerman
#06/08
#Libraries----
#Read in the library
library(sparklyr)
library(dplyr)
#connect to spark
sc <- spark_connect(master = "local", version = "2.3")
#import cars into spark
cars <- copy_to(sc, mtcars)
#Note: When using real clusters, you should use copy_to() to tran... | /chapter_3_analysis.R | no_license | thomaszwagerman/learning_spark | R | false | false | 1,132 | r | #Chapter 3 - analysis with spark
#Thomas Zwagerman
#06/08
#Libraries----
#Read in the library
library(sparklyr)
library(dplyr)
#connect to spark
sc <- spark_connect(master = "local", version = "2.3")
#import cars into spark
cars <- copy_to(sc, mtcars)
#Note: When using real clusters, you should use copy_to() to tran... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/replicapool_functions.R
\name{replicas.delete}
\alias{replicas.delete}
\title{Deletes a replica from the pool.}
\usage{
replicas.delete(ReplicasDeleteRequest, projectName, zone, poolName, replicaName)
}
\arguments{
\item{ReplicasDeleteRequest... | /googlereplicapoolv1beta1.auto/man/replicas.delete.Rd | permissive | Phippsy/autoGoogleAPI | R | false | true | 1,399 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/replicapool_functions.R
\name{replicas.delete}
\alias{replicas.delete}
\title{Deletes a replica from the pool.}
\usage{
replicas.delete(ReplicasDeleteRequest, projectName, zone, poolName, replicaName)
}
\arguments{
\item{ReplicasDeleteRequest... |
#Load in required packages for functions below
require(qpcR)
require(plyr)
require(ggplot2)
require(splitstackshape)
#Read in raw fluorescence data from 1st Actin replicate
rep1<-read.csv("Actin3rawfluoro.csv", header = T)
#Remove blank first column entitled "X"
rep1$X<-NULL
#Rename columns so that qpcR package and ap... | /qPCR data/raw fluoro/actinstandard.R | no_license | jheare/Resilience-Project | R | false | false | 17,002 | r | #Load in required packages for functions below
require(qpcR)
require(plyr)
require(ggplot2)
require(splitstackshape)
#Read in raw fluorescence data from 1st Actin replicate
rep1<-read.csv("Actin3rawfluoro.csv", header = T)
#Remove blank first column entitled "X"
rep1$X<-NULL
#Rename columns so that qpcR package and ap... |
#' wrapper function of rmarkdown::render for opencpu to render a report for maxquant summary from markdown template
#'
#' This function is destined for working on the opencpu server end, accepting file posted by front end to produce an html file to send to the front end.
#' It also works in stand-alone mode, to genera... | /R/archived/report_metalab.R | permissive | caitsimop/metareport | R | false | false | 4,324 | r | #' wrapper function of rmarkdown::render for opencpu to render a report for maxquant summary from markdown template
#'
#' This function is destined for working on the opencpu server end, accepting file posted by front end to produce an html file to send to the front end.
#' It also works in stand-alone mode, to genera... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/twoCatCI.R
\name{twoCatCI}
\alias{twoCatCI}
\title{Confidence intervals and standard errors of multiple imputation for the cross-tabulation of two categorical variables.}
\usage{
twoCatCI(obs_data, imp_data_list, type, vars, sig = 4, al... | /man/twoCatCI.Rd | no_license | RTIInternational/SynthTools | R | false | true | 2,402 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/twoCatCI.R
\name{twoCatCI}
\alias{twoCatCI}
\title{Confidence intervals and standard errors of multiple imputation for the cross-tabulation of two categorical variables.}
\usage{
twoCatCI(obs_data, imp_data_list, type, vars, sig = 4, al... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clump.R
\name{.check_clumps}
\alias{.check_clumps}
\title{Checks if correct clumps were found. If not, finds clumps}
\usage{
.check_clumps(detector, row = NA, col = NA)
}
\arguments{
\item{detector}{Detector object}
\item{row}{Module row num... | /man/dot-check_clumps.Rd | permissive | alan-turing-institute/DetectorChecker | R | false | true | 496 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clump.R
\name{.check_clumps}
\alias{.check_clumps}
\title{Checks if correct clumps were found. If not, finds clumps}
\usage{
.check_clumps(detector, row = NA, col = NA)
}
\arguments{
\item{detector}{Detector object}
\item{row}{Module row num... |
folderLocation <- choose.dir()
setwd(folderLocation)
vctFiles <- c(list.files(path = folderLocation,pattern = "csv",recursive = FALSE))
vctFiles
total.logs <- length(vctFiles) #log count
total.logs
#create variables
EqName <- ("ET101")
TestName <- ("MyTest")
#create loop
datalist10 = list()
for ( j in 1:length(vct... | /r/Session 2 Multiple Structured/1 exercise/session 2 exercise 1.R | permissive | justwinata/Py-R | R | false | false | 745 | r | folderLocation <- choose.dir()
setwd(folderLocation)
vctFiles <- c(list.files(path = folderLocation,pattern = "csv",recursive = FALSE))
vctFiles
total.logs <- length(vctFiles) #log count
total.logs
#create variables
EqName <- ("ET101")
TestName <- ("MyTest")
#create loop
datalist10 = list()
for ( j in 1:length(vct... |
rm(list = ls())
CRAN_packages <- c("dplyr", "readr", "magrittr", "lubridate")
lapply(CRAN_packages, require, character.only = TRUE)
main <- function() {
state_county <- clean_state_county()
state_county %>% save_state()
state_county %>% save_county()
return(NULL)
}
clean_state_county <- function() {
state_c... | /data/code/clean_policies.R | no_license | gabrieljkelvin/acre_allcott | R | false | false | 1,312 | r | rm(list = ls())
CRAN_packages <- c("dplyr", "readr", "magrittr", "lubridate")
lapply(CRAN_packages, require, character.only = TRUE)
main <- function() {
state_county <- clean_state_county()
state_county %>% save_state()
state_county %>% save_county()
return(NULL)
}
clean_state_county <- function() {
state_c... |
library(lessR)
### Name: simCImean
### Title: Pedagogical Simulation for the Confidence Interval of the Mean
### Aliases: simCImean
### Keywords: confidence interval
### ** Examples
# 25 confidence intervals with a sample size each of 100
# mu=0, sigma=1, that is, sample from the standard normal
simCImean(25, 100)
... | /data/genthat_extracted_code/lessR/examples/simCImean.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 499 | r | library(lessR)
### Name: simCImean
### Title: Pedagogical Simulation for the Confidence Interval of the Mean
### Aliases: simCImean
### Keywords: confidence interval
### ** Examples
# 25 confidence intervals with a sample size each of 100
# mu=0, sigma=1, that is, sample from the standard normal
simCImean(25, 100)
... |
#
# If you are going to use results produced by the scripts please do cite the
# SRMSerivce R package by providing the following URL
# www.github.com/protViz/SRMService
# by W.E. Wolski, J. Grossmann, C. Panse
#
library(limma)
library(SRMService)
protein <-
system.file("samples/proteinGroups/proteinGroupsPullDown.tx... | /inst/samples/proteinGroups/PullDownTest.R | no_license | protViz/SRMService | R | false | false | 2,264 | r | #
# If you are going to use results produced by the scripts please do cite the
# SRMSerivce R package by providing the following URL
# www.github.com/protViz/SRMService
# by W.E. Wolski, J. Grossmann, C. Panse
#
library(limma)
library(SRMService)
protein <-
system.file("samples/proteinGroups/proteinGroupsPullDown.tx... |
#' Anolis phenotype data
#'
#' Data on anolis phenotype data from Thomas et al. 2009
#'
#' @docType data
#'
#' @usage data(anolis.data)
#'
#' @format An object of class \code{"data.frame"}.
#'
#' @keywords datasets
#'
#' @references Thomas GH, Meiri S, & Phillimore AB. 2009. Body size diversification in Anolis: novel e... | /fuzzedpackages/motmot/R/RData.R | no_license | akhikolla/testpackages | R | false | false | 445 | r | #' Anolis phenotype data
#'
#' Data on anolis phenotype data from Thomas et al. 2009
#'
#' @docType data
#'
#' @usage data(anolis.data)
#'
#' @format An object of class \code{"data.frame"}.
#'
#' @keywords datasets
#'
#' @references Thomas GH, Meiri S, & Phillimore AB. 2009. Body size diversification in Anolis: novel e... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{df_neighbors}
\alias{df_neighbors}
\title{Neighbours for locations}
\format{
A nested dataframe of 1,942 rows and 2 variables:
\describe{
\item{grid_id}{unique identifier for each location}
\item{neighbor}{computed... | /man/df_neighbors.Rd | permissive | lenamax2355/homelocator | R | false | true | 570 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{df_neighbors}
\alias{df_neighbors}
\title{Neighbours for locations}
\format{
A nested dataframe of 1,942 rows and 2 variables:
\describe{
\item{grid_id}{unique identifier for each location}
\item{neighbor}{computed... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BIOMOD_cv.R
\name{BIOMOD_cv}
\alias{BIOMOD_cv}
\title{Custom models cross-validation procedure}
\usage{
BIOMOD_cv(data, k = 5, repetition = 5, do.full.models = TRUE,
stratified.cv = FALSE, stratify = "both", balance = "pres")
}
\arguments{
... | /man/BIOMOD_cv.Rd | no_license | MirzaCengic/biomod2 | R | false | true | 5,849 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BIOMOD_cv.R
\name{BIOMOD_cv}
\alias{BIOMOD_cv}
\title{Custom models cross-validation procedure}
\usage{
BIOMOD_cv(data, k = 5, repetition = 5, do.full.models = TRUE,
stratified.cv = FALSE, stratify = "both", balance = "pres")
}
\arguments{
... |
/Tong_Anal/5 두 모집단의 비교.R | no_license | SilverwestKim/Univ | R | false | false | 3,705 | r | ||
library(EMCluster)
library(data.table)
setwd('/Users/abhishekjindal/Desktop/UCI_courses/Fall_2017/CS273A/kaggleProj/mlTechniques')
train_x = data.table(read.table('../final_datasets/X_training_100K.txt', sep = ','))
train_y = data.table(read.table('../final_datasets/Y_training_100K.txt', sep = ','))
val_x = data.table... | /mlTechniques/em_test_v1.R | no_license | gagankhanijau/ml_cs273_rain_pred | R | false | false | 1,152 | r | library(EMCluster)
library(data.table)
setwd('/Users/abhishekjindal/Desktop/UCI_courses/Fall_2017/CS273A/kaggleProj/mlTechniques')
train_x = data.table(read.table('../final_datasets/X_training_100K.txt', sep = ','))
train_y = data.table(read.table('../final_datasets/Y_training_100K.txt', sep = ','))
val_x = data.table... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iot_operations.R
\name{iot_create_job}
\alias{iot_create_job}
\title{Creates a job}
\usage{
iot_create_job(jobId, targets, documentSource, document, description,
presignedUrlConfig, targetSelection, jobExecutionsRolloutConfig,
abortConfig... | /cran/paws.internet.of.things/man/iot_create_job.Rd | permissive | sanchezvivi/paws | R | false | true | 3,654 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iot_operations.R
\name{iot_create_job}
\alias{iot_create_job}
\title{Creates a job}
\usage{
iot_create_job(jobId, targets, documentSource, document, description,
presignedUrlConfig, targetSelection, jobExecutionsRolloutConfig,
abortConfig... |
#' Python configuration
#'
#' Information on Python and Numpy versions detected
#'
#' @return Python configuration object; Logical indicating whether Python
#' bindings are available
#'
#' @export
py_config <- function() {
ensure_python_initialized()
.globals$py_config
}
#' Build Python configuration error me... | /R/config.R | permissive | nathania/reticulate | R | false | false | 18,276 | r |
#' Python configuration
#'
#' Information on Python and Numpy versions detected
#'
#' @return Python configuration object; Logical indicating whether Python
#' bindings are available
#'
#' @export
py_config <- function() {
ensure_python_initialized()
.globals$py_config
}
#' Build Python configuration error me... |
## This function will creates a matrix and cache it's inverse matrix
## It will create an ordinary matrix
## Get the value of the matrix
## Create value for inverse matrix
## Get the value of inverse matrix
## Lets create the matrix
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
# Initiate th... | /cachematrix.R | no_license | zillurbmb51/ProgrammingAssignment2 | R | false | false | 1,435 | r | ## This function will creates a matrix and cache it's inverse matrix
## It will create an ordinary matrix
## Get the value of the matrix
## Create value for inverse matrix
## Get the value of inverse matrix
## Lets create the matrix
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
# Initiate th... |
\name{Loaloa}
\alias{Loaloa}
\docType{data}
\title{
Loa loa prevalence in North Cameroon, 1991-2001
}
\description{
This data set describes prevalence of infection by the nematode \emph{Loa loa} in North Cameroon, 1991-2001.
This is a superset of the data discussed by Diggle and Ribeiro (2007) and Diggle et a... | /man/Loaloa.Rd | no_license | cran/spaMM | R | false | false | 4,677 | rd | \name{Loaloa}
\alias{Loaloa}
\docType{data}
\title{
Loa loa prevalence in North Cameroon, 1991-2001
}
\description{
This data set describes prevalence of infection by the nematode \emph{Loa loa} in North Cameroon, 1991-2001.
This is a superset of the data discussed by Diggle and Ribeiro (2007) and Diggle et a... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hyperg.R
\name{hyperg}
\alias{hyperg}
\title{Compute hypergeometric backbone}
\usage{
hyperg(B)
}
\arguments{
\item{B}{Matrix: Bipartite network}
}
\value{
list(positive, negative).
positive gives matrix of probability of ties above the obser... | /man/hyperg.Rd | no_license | jcfisher/backbone | R | false | true | 955 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hyperg.R
\name{hyperg}
\alias{hyperg}
\title{Compute hypergeometric backbone}
\usage{
hyperg(B)
}
\arguments{
\item{B}{Matrix: Bipartite network}
}
\value{
list(positive, negative).
positive gives matrix of probability of ties above the obser... |
library(data.table)
setwd("/Users/vinaysesham/Documents/datasciencecoursera/ExploratoryDataAnalysis/explot_project1")
hpc <- read.table("household_power_consumption.txt",header=TRUE,sep=";",stringsAsFactors=FALSE)
hpcSubset <- hpc[hpc$Date %in% c("1/2/2007","2/2/2007") ,]
hpcSubset$datetime <- strptime(paste(subSetDat... | /plot4.R | no_license | vsesham/ExData_Plotting1 | R | false | false | 1,034 | r | library(data.table)
setwd("/Users/vinaysesham/Documents/datasciencecoursera/ExploratoryDataAnalysis/explot_project1")
hpc <- read.table("household_power_consumption.txt",header=TRUE,sep=";",stringsAsFactors=FALSE)
hpcSubset <- hpc[hpc$Date %in% c("1/2/2007","2/2/2007") ,]
hpcSubset$datetime <- strptime(paste(subSetDat... |
preprocessing_tool <- function(
data_in, # name of the input file (tab delimited text with the raw counts) or R matrix
data_type ="file", # c(file, r_matrix)
output_object ="default", # output ... | /preprocessing_tool.r | no_license | RonaldHShi/Ronald-and-Mert | R | false | false | 25,225 | r | preprocessing_tool <- function(
data_in, # name of the input file (tab delimited text with the raw counts) or R matrix
data_type ="file", # c(file, r_matrix)
output_object ="default", # output ... |
time<-as.character(Sys.time()-60*60*24)
options(stringsAsFactors = FALSE)
library("RCurl")
library("XML")
library("plyr")
url<-"http://www.vnukovo.ru/flights/online-timetable/#tab-sortie"
html <- getURL(url, followlocation = TRUE,encoding="gzip",httpheader = c(`Accept-Encoding` = "gzip"),.encoding="UTF-8")
doc = htm... | /vko_today.R | no_license | pavlov-aa/Parsing-aeroflights-table | R | false | false | 831 | r | time<-as.character(Sys.time()-60*60*24)
options(stringsAsFactors = FALSE)
library("RCurl")
library("XML")
library("plyr")
url<-"http://www.vnukovo.ru/flights/online-timetable/#tab-sortie"
html <- getURL(url, followlocation = TRUE,encoding="gzip",httpheader = c(`Accept-Encoding` = "gzip"),.encoding="UTF-8")
doc = htm... |
/newpostKnit.R | no_license | R-adas/R-adas-source | R | false | false | 7,493 | r | ||
#' The application User-Interface
#'
#' @param request Internal parameter for `{shiny}`.
#' DO NOT REMOVE.
#' @import shiny
#' @noRd
app_ui <- function(request) {
tagList(
# Leave this function for adding external resources
golem_add_external_resources(),
# List the first level UI elements here
... | /BTM/R/app_ui.R | no_license | MaryleneH/prez_dataquitaine | R | false | false | 937 | r | #' The application User-Interface
#'
#' @param request Internal parameter for `{shiny}`.
#' DO NOT REMOVE.
#' @import shiny
#' @noRd
app_ui <- function(request) {
tagList(
# Leave this function for adding external resources
golem_add_external_resources(),
# List the first level UI elements here
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interpolate.R
\name{fun_xy}
\alias{fun_xy}
\title{Interpolation between curve points}
\usage{
fun_xy(df_mtp, x_out, x_name = "hours", y_name = "fit",
feat_name = x_name)
}
\arguments{
\item{df_mtp}{The data frame containing \code{x} and \co... | /man/fun_xy.Rd | no_license | JannikVindeloev/RAPr | R | false | true | 1,276 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interpolate.R
\name{fun_xy}
\alias{fun_xy}
\title{Interpolation between curve points}
\usage{
fun_xy(df_mtp, x_out, x_name = "hours", y_name = "fit",
feat_name = x_name)
}
\arguments{
\item{df_mtp}{The data frame containing \code{x} and \co... |
#' Plot grouped or hierarchical time series
#'
#' Method for plotting grouped or hierarchical time series and their forecasts.
#'
#'
#' @param x An object of class \code{\link[hts]{gts}}.
#' @param include Number of values from historical time series to include in
#' the plot of forecasted group/hierarchical ... | /R/plot-gts.R | no_license | VaughanR0/Streamline-R | R | false | false | 5,023 | r | #' Plot grouped or hierarchical time series
#'
#' Method for plotting grouped or hierarchical time series and their forecasts.
#'
#'
#' @param x An object of class \code{\link[hts]{gts}}.
#' @param include Number of values from historical time series to include in
#' the plot of forecasted group/hierarchical ... |
setwd("~/Documents/github/headr/dev")
library(glue)
library(yaml)
meta <- yaml.load_file("_metadata.yaml")
helper_glue <- function(...) glue::glue_data(..., .open = "<<", .close = ">>")
hdr_abstract <- function(meta){
helper_glue(.x = meta, "<<abstract>>")
}
helper_author <- function(x) {
# format name
na... | /dev/testing_acs.r | no_license | tpall/headr | R | false | false | 1,185 | r | setwd("~/Documents/github/headr/dev")
library(glue)
library(yaml)
meta <- yaml.load_file("_metadata.yaml")
helper_glue <- function(...) glue::glue_data(..., .open = "<<", .close = ">>")
hdr_abstract <- function(meta){
helper_glue(.x = meta, "<<abstract>>")
}
helper_author <- function(x) {
# format name
na... |
library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/breast.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.65,family="gaussian",standardize=TRUE)
sink('./Model/EN/ReliefF/breast/breast_069.txt',append=TRU... | /Model/EN/ReliefF/breast/breast_069.R | no_license | leon1003/QSMART | R | false | false | 352 | r | library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/breast.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.65,family="gaussian",standardize=TRUE)
sink('./Model/EN/ReliefF/breast/breast_069.txt',append=TRU... |
##' AlignmentPairsList
##'
##' @export
##' @rdname AlignmentPairsList-class
##'
##' @importFrom methods new
##'
setMethod("AlignmentPairsList", "list",
function(obj) new("AlignmentPairsList", listData = obj))
##' as.data.frame
##'
##' @description Convert AlignmentPairsList to data.frame.
##'
##' @param x A... | /R/methods-AlignmentPairsList-class.R | permissive | NBISweden/ripr | R | false | false | 1,964 | r | ##' AlignmentPairsList
##'
##' @export
##' @rdname AlignmentPairsList-class
##'
##' @importFrom methods new
##'
setMethod("AlignmentPairsList", "list",
function(obj) new("AlignmentPairsList", listData = obj))
##' as.data.frame
##'
##' @description Convert AlignmentPairsList to data.frame.
##'
##' @param x A... |
#' Plot shapefiles
#'
#' Plot geography shapefiles using geom_sf
#'
#' @import sf
#' @import tmap
#' @import ggplot2
#' @param data An sf object that contains the geometries
#' @param method Plotting method. Can be "sf" or "tmap"
#' @param fill_with (Optional) The variable from the sf object to fill the polygons.
#' @p... | /R/plot_map.R | no_license | franc703/minnccaccess | R | false | false | 2,868 | r | #' Plot shapefiles
#'
#' Plot geography shapefiles using geom_sf
#'
#' @import sf
#' @import tmap
#' @import ggplot2
#' @param data An sf object that contains the geometries
#' @param method Plotting method. Can be "sf" or "tmap"
#' @param fill_with (Optional) The variable from the sf object to fill the polygons.
#' @p... |
lefftpack::lazy_setup()
source("FG12_funcs.r")
# words that could be used
words <- c("blue","green","fun", "square","dog","owl","emu")
# objects that could be referred to
objects <- c("blue_square","blue_owl","blue_dog","blue_emu",
"green_square","green_emu", "green_dog",
"fun_dog", "fun_em... | /paper03_goodman_frank2012/FG12_sandbox.r | no_license | lefft/UoC_ling_comp_modeling | R | false | false | 2,440 | r | lefftpack::lazy_setup()
source("FG12_funcs.r")
# words that could be used
words <- c("blue","green","fun", "square","dog","owl","emu")
# objects that could be referred to
objects <- c("blue_square","blue_owl","blue_dog","blue_emu",
"green_square","green_emu", "green_dog",
"fun_dog", "fun_em... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasets.R
\docType{data}
\name{clean.goa}
\alias{clean.goa}
\title{Clean Gulf of Alaska
Clean data set for the Gulf of Alaska bottom trawl survey}
\format{A dim = 197026 x 48 data.table data.frame:
\tabular{rlll}{
[,1] \tab ref \tab c... | /man/clean.goa.Rd | no_license | rBatt/trawlData | R | false | true | 5,701 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasets.R
\docType{data}
\name{clean.goa}
\alias{clean.goa}
\title{Clean Gulf of Alaska
Clean data set for the Gulf of Alaska bottom trawl survey}
\format{A dim = 197026 x 48 data.table data.frame:
\tabular{rlll}{
[,1] \tab ref \tab c... |
library(mixOmics)
# Get some test data
dataset<-as.matrix(data(linnerud))
X <- as.matrix(as.data.frame(linnerud$exercise))
Y <- as.matrix(as.data.frame(linnerud$physiological))
## Create folds
kfolds <- 10
folds <- sample(cut(seq(1,nrow(X)),breaks=kfolds,labels=1:kfolds),size=nrow(X))
ncomp<-c(1:min(ncol(X),nrow(X)))... | /Code/Test_environment/Calib/calibration_cross_validate_PLS.R | no_license | puczilka/PLS | R | false | false | 2,378 | r | library(mixOmics)
# Get some test data
dataset<-as.matrix(data(linnerud))
X <- as.matrix(as.data.frame(linnerud$exercise))
Y <- as.matrix(as.data.frame(linnerud$physiological))
## Create folds
kfolds <- 10
folds <- sample(cut(seq(1,nrow(X)),breaks=kfolds,labels=1:kfolds),size=nrow(X))
ncomp<-c(1:min(ncol(X),nrow(X)))... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.