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/route53recoveryreadiness_operations.R \name{route53recoveryreadiness_delete_recovery_group} \alias{route53recoveryreadiness_delete_recovery_group} \title{Deletes a recovery group} \usage{ route53recoveryreadiness_delete_recovery_group(Recover...
/cran/paws.networking/man/route53recoveryreadiness_delete_recovery_group.Rd
permissive
paws-r/paws
R
false
true
591
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/route53recoveryreadiness_operations.R \name{route53recoveryreadiness_delete_recovery_group} \alias{route53recoveryreadiness_delete_recovery_group} \title{Deletes a recovery group} \usage{ route53recoveryreadiness_delete_recovery_group(Recover...
first_vec <- c(1, 5, 4, 2, 3, 7, 6) second_vec <- c(9, 2, 1, 8, 3, 4, 5, 6, 10, 7, 12, 11) third_vec <- c(8, 3, 5, 1, 7, 1, 10) find_longer_vector <- function(vec_one, vec_two) { if (length(vec_one) > length(vec_two)) { return("First") } else if (length(vec_one) < length(vec_two)) { return("Second") ...
/functions_in_R.r
no_license
SubbuDS/Data_Science-and-Big-Data
R
false
false
1,089
r
first_vec <- c(1, 5, 4, 2, 3, 7, 6) second_vec <- c(9, 2, 1, 8, 3, 4, 5, 6, 10, 7, 12, 11) third_vec <- c(8, 3, 5, 1, 7, 1, 10) find_longer_vector <- function(vec_one, vec_two) { if (length(vec_one) > length(vec_two)) { return("First") } else if (length(vec_one) < length(vec_two)) { return("Second") ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/randomForest.R \name{build_model.randomForest} \alias{build_model.randomForest} \title{build_model.randomForest} \usage{ \method{build_model}{randomForest}(object, which_tree = 1, ...) } \arguments{ \item{object}{a object of class randomFores...
/aurelius/man/build_model.randomForest.Rd
permissive
mafpimentel/hadrian
R
false
true
900
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/randomForest.R \name{build_model.randomForest} \alias{build_model.randomForest} \title{build_model.randomForest} \usage{ \method{build_model}{randomForest}(object, which_tree = 1, ...) } \arguments{ \item{object}{a object of class randomFores...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { + inv <- NULL + set <- function(y) { + x <<- y + inv <<- NULL ...
/cachematrix.R
no_license
Makako78/ProgrammingAssignment2
R
false
false
874
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { + inv <- NULL + set <- function(y) { + x <<- y + inv <<- NULL ...
library(testthat) library(data.table) test_package("data.table")
/tests/test-all.R
no_license
dselivanov/data.table
R
false
false
66
r
library(testthat) library(data.table) test_package("data.table")
library(Seurat) ### Name: AddSamples ### Title: Add samples into existing Seurat object. ### Aliases: AddSamples ### ** Examples pbmc1 <- SubsetData(object = pbmc_small, cells.use = pbmc_small@cell.names[1:40]) pbmc1 pbmc2 <- SubsetData(object = pbmc_small, cells.use = pbmc_small@cell.names[41:80]) pbmc2_data <- pb...
/data/genthat_extracted_code/Seurat/examples/AddSamples.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
424
r
library(Seurat) ### Name: AddSamples ### Title: Add samples into existing Seurat object. ### Aliases: AddSamples ### ** Examples pbmc1 <- SubsetData(object = pbmc_small, cells.use = pbmc_small@cell.names[1:40]) pbmc1 pbmc2 <- SubsetData(object = pbmc_small, cells.use = pbmc_small@cell.names[41:80]) pbmc2_data <- pb...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fslsmooth.help.R \name{fslsmooth.help} \alias{fslsmooth.help} \title{fslsmooth Help} \usage{ fslsmooth.help(...) } \arguments{ \item{...}{passed to \code{\link{fslmaths.help}}} } \value{ Prints help output and returns output as character vect...
/man/fslsmooth.help.Rd
no_license
kuonanhong/fslr
R
false
true
491
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fslsmooth.help.R \name{fslsmooth.help} \alias{fslsmooth.help} \title{fslsmooth Help} \usage{ fslsmooth.help(...) } \arguments{ \item{...}{passed to \code{\link{fslmaths.help}}} } \value{ Prints help output and returns output as character vect...
library(CryptRndTest) ### Name: random.walk.tests ### Title: Random Walk Tests ### Aliases: random.walk.tests ### Keywords: Anderson-Darling Kolmogorov-Smirnov Chi-Square nonparametric ### goodness-of-fit test randomness test ### ** Examples RNGkind(kind = "Super-Duper") B=64 # Bit length ...
/data/genthat_extracted_code/CryptRndTest/examples/random.walk.tests.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
584
r
library(CryptRndTest) ### Name: random.walk.tests ### Title: Random Walk Tests ### Aliases: random.walk.tests ### Keywords: Anderson-Darling Kolmogorov-Smirnov Chi-Square nonparametric ### goodness-of-fit test randomness test ### ** Examples RNGkind(kind = "Super-Duper") B=64 # Bit length ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getNodeCDF.R \name{getNodeCDF} \alias{getNodeCDF} \title{Get CDf for Node} \usage{ getNodeCDF(varName, datasources) } \arguments{ \item{varName}{a character, the name of study variable.} \item{datasources}{a list of parameters to access file...
/man/getNodeCDF.Rd
no_license
paularaissa/distStatsServer
R
false
true
536
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getNodeCDF.R \name{getNodeCDF} \alias{getNodeCDF} \title{Get CDf for Node} \usage{ getNodeCDF(varName, datasources) } \arguments{ \item{varName}{a character, the name of study variable.} \item{datasources}{a list of parameters to access file...
require(vioplot) dev.new(width=850, height=650) t1 <- scan("~/SDN/renaissance/Evaluation/ivanandantonPlots/stabTimeMultiC/t1.txt") t2 <- scan("~/SDN/renaissance/Evaluation/ivanandantonPlots/stabTimeMultiC/t2.txt") t3 <- scan("~/SDN/renaissance/Evaluation/ivanandantonPlots/stabTimeMultiC/t3.txt") t4 <- scan("~/SDN/renai...
/Evaluation/rPlots/stabTimeMultiC/stab_time_multiple_controllers.R
no_license
rubiruchi/Renaissance-SDN
R
false
false
2,577
r
require(vioplot) dev.new(width=850, height=650) t1 <- scan("~/SDN/renaissance/Evaluation/ivanandantonPlots/stabTimeMultiC/t1.txt") t2 <- scan("~/SDN/renaissance/Evaluation/ivanandantonPlots/stabTimeMultiC/t2.txt") t3 <- scan("~/SDN/renaissance/Evaluation/ivanandantonPlots/stabTimeMultiC/t3.txt") t4 <- scan("~/SDN/renai...
### Copyright (c) 2011, Yahoo! Inc. All rights reserved. ### Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. ### ### Author: Liang Zhang # compute probability given eta and alpha. eta here could be a vector of values get.splinep <- function(knotval,eta){ neg <- eta < 0 ...
/src/RLFM-ars-logistic/R/util.R
permissive
clumbus963/Latent-Factor-Models
R
false
false
8,766
r
### Copyright (c) 2011, Yahoo! Inc. All rights reserved. ### Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. ### ### Author: Liang Zhang # compute probability given eta and alpha. eta here could be a vector of values get.splinep <- function(knotval,eta){ neg <- eta < 0 ...
# Binding libraries require("shiny") require("RPostgreSQL") require("sqldf") require("shinyjs") require("DT") # Initializing PostgreSQL database initializeDatabase <- function() { sqldf(paste( readLines("./sql_scripts/initialize_create_tables.sql"), collapse = "\n" )) sqldf(paste( readL...
/rshiny_app/server.R
no_license
CFraller/mt_prototypical_impl
R
false
false
27,263
r
# Binding libraries require("shiny") require("RPostgreSQL") require("sqldf") require("shinyjs") require("DT") # Initializing PostgreSQL database initializeDatabase <- function() { sqldf(paste( readLines("./sql_scripts/initialize_create_tables.sql"), collapse = "\n" )) sqldf(paste( readL...
#' @name loadWorkbook #' @title Load an exisiting .xlsx file #' @author Alexander Walker #' @param file A path to an existing .xlsx or .xlsm file #' @param xlsxFile alias for file #' @description loadWorkbook returns a workbook object conserving styles and #' formatting of the original .xlsx file. #' @return Wor...
/R/loadWorkbook.R
no_license
tgwhite/openxlsx
R
false
false
30,358
r
#' @name loadWorkbook #' @title Load an exisiting .xlsx file #' @author Alexander Walker #' @param file A path to an existing .xlsx or .xlsm file #' @param xlsxFile alias for file #' @description loadWorkbook returns a workbook object conserving styles and #' formatting of the original .xlsx file. #' @return Wor...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PoloniexPublic.R \name{ReturnOrderBook} \alias{ReturnOrderBook} \title{Returns the order book for a given market, as well as a sequence number for use with the Push API and an indicator specifying whether the market is frozen.} \usage{...
/man/ReturnOrderBook.Rd
permissive
cran/PoloniexR
R
false
true
2,071
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PoloniexPublic.R \name{ReturnOrderBook} \alias{ReturnOrderBook} \title{Returns the order book for a given market, as well as a sequence number for use with the Push API and an indicator specifying whether the market is frozen.} \usage{...
data <- read.table("household_power_consumption.txt", na.strings="?", header=TRUE, sep=";", stringsAsFactors=FALSE) data[, 1] <- as.Date(data[, 1], "%d/%m/%Y") # Subset data data <- subset(data, data$Date=="2007-02-01" | data$Date=="2007-02-02") data$Time <- paste(data$Date, data$Time) data$Time <...
/plot4.R
no_license
dyaz93/ExData_Plotting1
R
false
false
1,174
r
data <- read.table("household_power_consumption.txt", na.strings="?", header=TRUE, sep=";", stringsAsFactors=FALSE) data[, 1] <- as.Date(data[, 1], "%d/%m/%Y") # Subset data data <- subset(data, data$Date=="2007-02-01" | data$Date=="2007-02-02") data$Time <- paste(data$Date, data$Time) data$Time <...
## power for univariate and bivariate latent change score model ## Johnny Zhang ## Created on Sep 26, 2016 powerLCS<-function(N=100, T=5, R=1000, betay=0, my0=0, mys=0, varey=1, vary0=1, varys=1, vary0ys=0, alpha=0.05, ...){ #if (sum(N < 2*T)>0) stop("The sample size has to be at least 2 times of the number o...
/R/power.R
no_license
cran/RAMpath
R
false
false
18,107
r
## power for univariate and bivariate latent change score model ## Johnny Zhang ## Created on Sep 26, 2016 powerLCS<-function(N=100, T=5, R=1000, betay=0, my0=0, mys=0, varey=1, vary0=1, varys=1, vary0ys=0, alpha=0.05, ...){ #if (sum(N < 2*T)>0) stop("The sample size has to be at least 2 times of the number o...
#' robis: R client for the OBIS API #' #' Work in progress #' #' @docType package #' @name robis #' @import dplyr jsonlite leaflet ggplot2 tidyr tibble httr mapedit sf #' @importFrom rlang .data NULL
/R/robis.R
permissive
howlerMoonkey/robis
R
false
false
200
r
#' robis: R client for the OBIS API #' #' Work in progress #' #' @docType package #' @name robis #' @import dplyr jsonlite leaflet ggplot2 tidyr tibble httr mapedit sf #' @importFrom rlang .data NULL
#Getting and Cleaning Data Course Project #Script for # 0 - Download and create the working directory. # 1 - Merges the training and the test sets to create one data set. # 2 - Extracts only the measurements on the mean and standard deviation for each measurement. # 3 - Uses descriptive activity names to name th...
/run_analysis.R
no_license
t2019br/CleaningDataCourseProject
R
false
false
7,050
r
#Getting and Cleaning Data Course Project #Script for # 0 - Download and create the working directory. # 1 - Merges the training and the test sets to create one data set. # 2 - Extracts only the measurements on the mean and standard deviation for each measurement. # 3 - Uses descriptive activity names to name th...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.r \name{get_interactions} \alias{get_interactions} \title{Get interactions} \usage{ get_interactions(net1, net2) } \arguments{ \item{net1, net2}{Two data frames of interactions, for example constructed with \code{\link[bootdissim]{res...
/man/get_interactions.Rd
permissive
valentinitnelav/bootdissim
R
false
true
841
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.r \name{get_interactions} \alias{get_interactions} \title{Get interactions} \usage{ get_interactions(net1, net2) } \arguments{ \item{net1, net2}{Two data frames of interactions, for example constructed with \code{\link[bootdissim]{res...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Utils_adduct_rules.R \name{adduct_rules_neg} \alias{adduct_rules_neg} \title{Create list with all adduct calculation rules (negative ion model) This function returns a list with rules for the calculation of adducts. It is required for the ca...
/man/adduct_rules_neg.Rd
no_license
michaelwitting/lipidomicsUtils
R
false
true
982
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Utils_adduct_rules.R \name{adduct_rules_neg} \alias{adduct_rules_neg} \title{Create list with all adduct calculation rules (negative ion model) This function returns a list with rules for the calculation of adducts. It is required for the ca...
% Generated by roxygen2 (4.0.1): do not edit by hand \name{S3_get_acl} \alias{S3_get_acl} \title{Get ACL of bucket location} \usage{ S3_get_acl(bucketName, key, filename = 0L) } \arguments{ \item{bucketName}{The name of the bucket} \item{key}{The location of the folder/file.} \item{filename}{The location you want to ...
/man/S3_get_acl.Rd
no_license
leohklee/RS3
R
false
false
668
rd
% Generated by roxygen2 (4.0.1): do not edit by hand \name{S3_get_acl} \alias{S3_get_acl} \title{Get ACL of bucket location} \usage{ S3_get_acl(bucketName, key, filename = 0L) } \arguments{ \item{bucketName}{The name of the bucket} \item{key}{The location of the folder/file.} \item{filename}{The location you want to ...
/Covid19/World_covid/World_covid.R
no_license
orlindowagner/R-Studies
R
false
false
3,269
r
"rimtrf" <- function(x,n=nrow(x),intch=.dFvGet()$ith,tau=.dFvGet()$tua) { np <- ncol(x) mdx <- nrow(x) if (missing(x)) x <- matrix(single(1),mdx,np) k <- integer(1) sf <- single(np) sg <- single(np) sh <- single(np) ip <- integer(np) f.res <- .Fortran("rimtrf", x=to.single(x), n=to.integer(n), np=to.intege...
/robeth/R/rimtrf.R
no_license
ingted/R-Examples
R
false
false
570
r
"rimtrf" <- function(x,n=nrow(x),intch=.dFvGet()$ith,tau=.dFvGet()$tua) { np <- ncol(x) mdx <- nrow(x) if (missing(x)) x <- matrix(single(1),mdx,np) k <- integer(1) sf <- single(np) sg <- single(np) sh <- single(np) ip <- integer(np) f.res <- .Fortran("rimtrf", x=to.single(x), n=to.integer(n), np=to.intege...
\name{poison.text} \alias{poison.text} \docType{data} \title{Poison} \description{ The data used here refer to a survey carried out on a sample of children of primary school who suffered from food poisoning. They were asked about their symptoms and about what they ate. } \usage{data(poison)} \format{ A data frame...
/man/poison.text.Rd
no_license
husson/FactoMineR
R
false
false
754
rd
\name{poison.text} \alias{poison.text} \docType{data} \title{Poison} \description{ The data used here refer to a survey carried out on a sample of children of primary school who suffered from food poisoning. They were asked about their symptoms and about what they ate. } \usage{data(poison)} \format{ A data frame...
.bme_env = new.env(parent=emptyenv()) .bme_env$results = NULL
/R/zzz.R
no_license
Bhanditz/benchmarkmeData
R
false
false
62
r
.bme_env = new.env(parent=emptyenv()) .bme_env$results = NULL
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reagent_barplot.r \name{reagent_barplot} \alias{reagent_barplot} \title{Plot the reagent means as a barplot} \usage{ reagent_barplot(result, includeIntervals = F) } \arguments{ \item{result}{The BAMBAResult object.} \item{includeIntervals}{A...
/man/reagent_barplot.Rd
no_license
RGLab/BAMBA
R
false
true
552
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reagent_barplot.r \name{reagent_barplot} \alias{reagent_barplot} \title{Plot the reagent means as a barplot} \usage{ reagent_barplot(result, includeIntervals = F) } \arguments{ \item{result}{The BAMBAResult object.} \item{includeIntervals}{A...
rmCheckedTF <- function(prefix = "rcbValue", envir = KTSEnv) { rsel <- rep(FALSE, KTSEnv$dSList$nRM) for (ind in 1:KTSEnv$dSList$nRM) { rcbValueind <- paste0(prefix, ind) if (tcltk::tclvalue(get(rcbValueind, envir = envir)) == "1") { rsel[ind] = TRUE } rm(rcbV...
/R/rmCheckedTF.R
no_license
cran/KarsTS
R
false
false
350
r
rmCheckedTF <- function(prefix = "rcbValue", envir = KTSEnv) { rsel <- rep(FALSE, KTSEnv$dSList$nRM) for (ind in 1:KTSEnv$dSList$nRM) { rcbValueind <- paste0(prefix, ind) if (tcltk::tclvalue(get(rcbValueind, envir = envir)) == "1") { rsel[ind] = TRUE } rm(rcbV...
attach(ToyotaCorolla) ToyotaCorolla <- read.csv("E:/Datasets/Multi linear Regression/ToyotaCorolla.csv") View(ToyotaCorolla) install.packages("e1071") library(e1071) install.packages("ggstatplot") library(ggstatplot) library(psych) ToyotaCorolla<-ToyotaCorolla[,-c(1:2)] View(ToyotaCorolla) str(ToyotaCorolla)...
/ToyottaMLR.R
no_license
Ashmita20/Data-Science-R-files
R
false
false
2,580
r
attach(ToyotaCorolla) ToyotaCorolla <- read.csv("E:/Datasets/Multi linear Regression/ToyotaCorolla.csv") View(ToyotaCorolla) install.packages("e1071") library(e1071) install.packages("ggstatplot") library(ggstatplot) library(psych) ToyotaCorolla<-ToyotaCorolla[,-c(1:2)] View(ToyotaCorolla) str(ToyotaCorolla)...
### ======================================================== ### Práctica con el debuging de funciones (31-10-2017) ### ======================================================== ejemplo1 <- function(x) { print("hola") } debug(ejemplo1) # iniciamos el proceso de debuging ejemplo1() # la ejecutamos # Q para salir del...
/Computación en Estadística y Optimización/Clase 11/Debug.R
no_license
MGijon/Learning-R
R
false
false
478
r
### ======================================================== ### Práctica con el debuging de funciones (31-10-2017) ### ======================================================== ejemplo1 <- function(x) { print("hola") } debug(ejemplo1) # iniciamos el proceso de debuging ejemplo1() # la ejecutamos # Q para salir del...
# ################### # SpringRK4.R # library(rODE) setClass("SpringRK4", slots = c( # we should improve this by letting the user entered these values K = "numeric", mu = "numeric", mass = "numeric", state = "numeric", odeSolver = "RK4" ), prototype = prototype( K ...
/SpringRK4.R
no_license
AlfonsoRReyes/rODEExamples
R
false
false
3,445
r
# ################### # SpringRK4.R # library(rODE) setClass("SpringRK4", slots = c( # we should improve this by letting the user entered these values K = "numeric", mu = "numeric", mass = "numeric", state = "numeric", odeSolver = "RK4" ), prototype = prototype( K ...
################################## ## Single Line Geocode Function ## ################################## # The function takes: # - one address at a time as one string (SingleLine) # - token # - allow to return Postal codes if a full street address match cannot be found (default is TRUE) # # The function returns: # lon,...
/SUL_gcFunctions.R
no_license
RoyalTS/ArcGIS_geocoding
R
false
false
5,983
r
################################## ## Single Line Geocode Function ## ################################## # The function takes: # - one address at a time as one string (SingleLine) # - token # - allow to return Postal codes if a full street address match cannot be found (default is TRUE) # # The function returns: # lon,...
#----------------------------------------------------------------------------- # S1 Tab tabItem(tabName = "s1_dow", fluidRow( # Include the line below in ui.R so you can send messages tags$head(tags$script(HTML('Shiny.addCustomMessageHandler("jsCode",function(message) {eval(message.value);})...
/shiny/ui/S1_dow_tab_ui.R
permissive
imagingearth/opensarkit
R
false
false
3,210
r
#----------------------------------------------------------------------------- # S1 Tab tabItem(tabName = "s1_dow", fluidRow( # Include the line below in ui.R so you can send messages tags$head(tags$script(HTML('Shiny.addCustomMessageHandler("jsCode",function(message) {eval(message.value);})...
if(!require("R.matlab")){ install.packages("R.matlab") stopifnot(require("R.matlab")) } extract_basis <- function(Es, k){ Matlab$startServer(port = 9999) matlab <- Matlab(port = 9999) open(matlab) setVariable(matlab, Es = Es) evaluate(matlab, "[Q,~] = qr(Es);") matlab_result <- getVariable(matlab, "Q")...
/sdp/extract_basis.R
no_license
HaroldSu/Overcomplete-ICA
R
false
false
554
r
if(!require("R.matlab")){ install.packages("R.matlab") stopifnot(require("R.matlab")) } extract_basis <- function(Es, k){ Matlab$startServer(port = 9999) matlab <- Matlab(port = 9999) open(matlab) setVariable(matlab, Es = Es) evaluate(matlab, "[Q,~] = qr(Es);") matlab_result <- getVariable(matlab, "Q")...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.R \name{plot} \alias{plot} \alias{plot.seq_marg_monitor} \alias{plot.CD} \alias{plot.seq_cond_monitor} \alias{plot.node_monitor} \alias{plot.influential_obs} \alias{plot.jeffreys} \alias{plot.kl} \alias{plot.final_node_monitor} \alias{pl...
/man/plot.Rd
no_license
manueleleonelli/bnmonitor
R
false
true
1,156
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.R \name{plot} \alias{plot} \alias{plot.seq_marg_monitor} \alias{plot.CD} \alias{plot.seq_cond_monitor} \alias{plot.node_monitor} \alias{plot.influential_obs} \alias{plot.jeffreys} \alias{plot.kl} \alias{plot.final_node_monitor} \alias{pl...
library(pAnalysis) ### Name: cap1 ### Title: cap1 ### Aliases: cap1 ### ** Examples uncappedtitle <- "this title" cappedtitle <- cap1(uncappedtitle)
/data/genthat_extracted_code/pAnalysis/examples/cap1.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
159
r
library(pAnalysis) ### Name: cap1 ### Title: cap1 ### Aliases: cap1 ### ** Examples uncappedtitle <- "this title" cappedtitle <- cap1(uncappedtitle)
\name{smooth.construct.mdcx.smooth.spec} %\Rdversion{1.0} \alias{smooth.construct.mdcx.smooth.spec} \alias{smooth.construct.mdcxBy.smooth.spec} %- Also NEED an '\alias' for EACH other topic documented here. \title{Constructor for monotone decreasing and convex P-splines in SCAMs } \description{This is a special ...
/man/smooth.construct.mdcx.smooth.spec.Rd
no_license
cran/scam
R
false
false
4,198
rd
\name{smooth.construct.mdcx.smooth.spec} %\Rdversion{1.0} \alias{smooth.construct.mdcx.smooth.spec} \alias{smooth.construct.mdcxBy.smooth.spec} %- Also NEED an '\alias' for EACH other topic documented here. \title{Constructor for monotone decreasing and convex P-splines in SCAMs } \description{This is a special ...
## "INFOF422 Statistical foundations of machine learning" course ## R package gbcode ## Author: G. Bontempi rm(list=ls()) library("quadprog") library("MASS") set.seed(0) normv<-function(x,p=2){ sum(x^p)^(1/p) } separable<-TRUE if (!separable){ gam<-0.05 } else { gam<-Inf } eps<-0.001 for ( rep in 1:1){ ...
/inst/scripts/Linear/svm.R
no_license
gbonte/gbcode
R
false
false
3,393
r
## "INFOF422 Statistical foundations of machine learning" course ## R package gbcode ## Author: G. Bontempi rm(list=ls()) library("quadprog") library("MASS") set.seed(0) normv<-function(x,p=2){ sum(x^p)^(1/p) } separable<-TRUE if (!separable){ gam<-0.05 } else { gam<-Inf } eps<-0.001 for ( rep in 1:1){ ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_inpe_data.R \name{inpe_station_data} \alias{inpe_station_data} \title{Get climate data from stations INPE} \usage{ inpe_station_data(station_id = 31973, start_date = "2005/01/01", end_date = "2005/02/02") } \arguments{ \item{station_id}...
/man/inpe_station_data.Rd
no_license
gustavobio/brclimate
R
false
true
592
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_inpe_data.R \name{inpe_station_data} \alias{inpe_station_data} \title{Get climate data from stations INPE} \usage{ inpe_station_data(station_id = 31973, start_date = "2005/01/01", end_date = "2005/02/02") } \arguments{ \item{station_id}...
#' @title Rounding of Null Imaginary Part of a Complex Number #' @description imaginary parts with values very close to 0 are 'zapped', i.e. treated as 0. #' Therefore, the number becomes real and changes its class from complex to numeric. #' @param x a scalar or vector, real or complex. #' @param tol a tolerance, ...
/R/Imzap.R
no_license
cran/complexplus
R
false
false
998
r
#' @title Rounding of Null Imaginary Part of a Complex Number #' @description imaginary parts with values very close to 0 are 'zapped', i.e. treated as 0. #' Therefore, the number becomes real and changes its class from complex to numeric. #' @param x a scalar or vector, real or complex. #' @param tol a tolerance, ...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/solr_all.r \name{solr_all} \alias{solr_all} \title{Solr search.} \usage{ solr_all(q = "*:*", sort = NULL, start = 0, rows = NULL, pageDoc = NULL, pageScore = NULL, fq = NULL, fl = NULL, defType = NULL, timeAllowed = NULL, qt = NUL...
/man/solr_all.Rd
permissive
cran/solr
R
false
false
3,833
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/solr_all.r \name{solr_all} \alias{solr_all} \title{Solr search.} \usage{ solr_all(q = "*:*", sort = NULL, start = 0, rows = NULL, pageDoc = NULL, pageScore = NULL, fq = NULL, fl = NULL, defType = NULL, timeAllowed = NULL, qt = NUL...
############################ #Step 0: configure parameters #Change the following parameters based on your onw machine #Also change the raw .xlsx file name because this name will be used among #the whole pipeline and for generating final results ############################ rm(list=ls()) #directory of raw .xlsx files ra...
/oscillation_pipeline.R
no_license
zijianni/RNA-oscillation-pipeline
R
false
false
10,319
r
############################ #Step 0: configure parameters #Change the following parameters based on your onw machine #Also change the raw .xlsx file name because this name will be used among #the whole pipeline and for generating final results ############################ rm(list=ls()) #directory of raw .xlsx files ra...
\name{mapPheWAStoExclusions} \alias{mapPheWAStoExclusions} \title{ Map PheWAS codes to their exclusions } \description{ This function maps phewas codes (optionally with ids for individuals) to a set of PheWAS code exclusions. } \usage{ mapPheWAStoExclusions(phewas.codes, ids=NA) } \arguments{ \item{phewas.codes}{ A v...
/man/mapPheWAStoExclusions.Rd
no_license
laurakwiley/PheWAS
R
false
false
818
rd
\name{mapPheWAStoExclusions} \alias{mapPheWAStoExclusions} \title{ Map PheWAS codes to their exclusions } \description{ This function maps phewas codes (optionally with ids for individuals) to a set of PheWAS code exclusions. } \usage{ mapPheWAStoExclusions(phewas.codes, ids=NA) } \arguments{ \item{phewas.codes}{ A v...
calculate_infectiousness = function(states,out, JOBID) { infectiousness_all <- vector("list", length = length(states)) all_data_out <- data.frame() for (i in 1:length(states)){ state <- states[[i]] N <- length(dates[[i]]) print(state) inf <- colMeans(out$infectiousness[,1:N,i]) inf_li <- colQu...
/usa/code/utils/calculate-infectiousness.r
permissive
fvalka/covid19model
R
false
false
1,547
r
calculate_infectiousness = function(states,out, JOBID) { infectiousness_all <- vector("list", length = length(states)) all_data_out <- data.frame() for (i in 1:length(states)){ state <- states[[i]] N <- length(dates[[i]]) print(state) inf <- colMeans(out$infectiousness[,1:N,i]) inf_li <- colQu...
library(shinydashboard) library(shinyjs) library(DT) header <- dashboardHeader( title = "Trabajo con imágenes", titleWidth = 250 ) sidebar <- dashboardSidebar( # Menú con las pestañas sidebarMenu( menuItem("Información de las mamografías", tabName = "info", icon = icon("table")), menuItem("Limpieza de...
/app/ui.R
permissive
data-and-code/trabajo_con_imagenes
R
false
false
7,524
r
library(shinydashboard) library(shinyjs) library(DT) header <- dashboardHeader( title = "Trabajo con imágenes", titleWidth = 250 ) sidebar <- dashboardSidebar( # Menú con las pestañas sidebarMenu( menuItem("Información de las mamografías", tabName = "info", icon = icon("table")), menuItem("Limpieza de...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Timing_general.R \name{CreateTimeunits} \alias{CreateTimeunits} \title{Creates time unit} \usage{ CreateTimeunits(starttime) } \description{ Creates time unit }
/man/CreateTimeunits.Rd
no_license
winggy/FluxnetLSM
R
false
true
240
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Timing_general.R \name{CreateTimeunits} \alias{CreateTimeunits} \title{Creates time unit} \usage{ CreateTimeunits(starttime) } \description{ Creates time unit }
library(targets) library(tarchetypes) future::plan(future::multisession) purrr::walk(fs::dir_ls("R"), source) tar_option_set(packages = c("tidyverse", "tidygraph", "ggraph")) list( tar_file(file_data, "data/data.xlsx"), tar_target(sheet_names, readxl::excel_sheets(file_data)), tar_target( data, read_data(...
/_targets.R
no_license
psychelzh/linguistic
R
false
false
1,586
r
library(targets) library(tarchetypes) future::plan(future::multisession) purrr::walk(fs::dir_ls("R"), source) tar_option_set(packages = c("tidyverse", "tidygraph", "ggraph")) list( tar_file(file_data, "data/data.xlsx"), tar_target(sheet_names, readxl::excel_sheets(file_data)), tar_target( data, read_data(...
#' @title The WeStCOMS mesh around a sample of elements in the Oban area #' @description An unstructured grid surrounding elements (i.e. based on nodes) for a subset of the WeStCOMS mesh in an area around Oban (see \code{\link[fvcom.tbx]{dat_area_boundaries}}). #' #' @format A SpatialPolygonsDataFrame (see \code{\link[...
/R/dat_mesh_around_elements.R
no_license
han-tun/fvcom.tbx
R
false
false
482
r
#' @title The WeStCOMS mesh around a sample of elements in the Oban area #' @description An unstructured grid surrounding elements (i.e. based on nodes) for a subset of the WeStCOMS mesh in an area around Oban (see \code{\link[fvcom.tbx]{dat_area_boundaries}}). #' #' @format A SpatialPolygonsDataFrame (see \code{\link[...
# fastmetrics: Performance metrics ported from scikit-learn # Copyright (C) 2013 Sean Whalen # 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 optio...
/R/fastmetrics.R
no_license
Web5design/fastmetrics
R
false
false
7,459
r
# fastmetrics: Performance metrics ported from scikit-learn # Copyright (C) 2013 Sean Whalen # 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 optio...
testlist <- list(A = structure(c(2.31584178474648e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0), .Dim = c(1L, 7L)), 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/1613112171-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
257
r
testlist <- list(A = structure(c(2.31584178474648e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0), .Dim = c(1L, 7L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
# # This is the user-interface definition of a Shiny web application. You can # run the application by clicking 'Run App' above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(shinythemes) library(SimSpin) library(shinycssloaders) library(plot3D...
/ui.R
no_license
kateharborne/SimSpin_app
R
false
false
12,834
r
# # This is the user-interface definition of a Shiny web application. You can # run the application by clicking 'Run App' above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(shinythemes) library(SimSpin) library(shinycssloaders) library(plot3D...
install.packages("data.table") library(data.table) DF = data.frame(x=rnorm(9)) help(rnorm)
/longgb/R/Learning/learning_01.R
no_license
longgb246/pythonstudy
R
false
false
94
r
install.packages("data.table") library(data.table) DF = data.frame(x=rnorm(9)) help(rnorm)
df = read.csv('data/repository_names_count_events_top1000.csv') dfs = read.csv('data/repository_names_count_events_top1000_sorted_by_name.csv.csv') dfs = read.csv('data/repository_names_count_events_top1000_sorted_by_name.csv') head(dfs) sum(dfs$aggregate_counts) dfs = read.csv('data/repository_names_count_events_top10...
/analysis/repo_name_imitation/clean_repo_names.r
no_license
metacommunities/metacommunities
R
false
false
3,343
r
df = read.csv('data/repository_names_count_events_top1000.csv') dfs = read.csv('data/repository_names_count_events_top1000_sorted_by_name.csv.csv') dfs = read.csv('data/repository_names_count_events_top1000_sorted_by_name.csv') head(dfs) sum(dfs$aggregate_counts) dfs = read.csv('data/repository_names_count_events_top10...
library(leaflet) dir() ct<- read.csv("data/cafe.csv") # Be sure to first set the working directory in R to where the file is listed address_waw <- c(52.2330251,20.9803086) m <- leaflet(ct) %>% addProviderTiles("CartoDB.Positron") %>% setView(address_waw[2], address_waw[1], zoom = 11) %>% addCircles(~lon, ~lat, po...
/R/visualize_sinlge_category.R
no_license
WawCode16/mdw-data-retrieval
R
false
false
427
r
library(leaflet) dir() ct<- read.csv("data/cafe.csv") # Be sure to first set the working directory in R to where the file is listed address_waw <- c(52.2330251,20.9803086) m <- leaflet(ct) %>% addProviderTiles("CartoDB.Positron") %>% setView(address_waw[2], address_waw[1], zoom = 11) %>% addCircles(~lon, ~lat, po...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/EvoTrees.R \name{best_iter.JuliaObject} \alias{best_iter.JuliaObject} \title{Get model best iter and eval metric} \usage{ best_iter.JuliaObject(model) } \description{ Get model best iter and eval metric }
/man/best_iter.JuliaObject.Rd
permissive
StatMixedML/EvoTrees
R
false
true
284
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/EvoTrees.R \name{best_iter.JuliaObject} \alias{best_iter.JuliaObject} \title{Get model best iter and eval metric} \usage{ best_iter.JuliaObject(model) } \description{ Get model best iter and eval metric }
shinyServer(function(input, output) { output$provincia.uisel<-renderUI({ provincia.list<-df %>% filter(CCAA==input$CCAA.sel) %>% select(Provincia) %>% distinct() provincia.list<-as.character(provincia.list[,1]) selectInput("provincia.sel", label ...
/server.R
no_license
BaltiBoix/shinyCORES
R
false
false
23,067
r
shinyServer(function(input, output) { output$provincia.uisel<-renderUI({ provincia.list<-df %>% filter(CCAA==input$CCAA.sel) %>% select(Provincia) %>% distinct() provincia.list<-as.character(provincia.list[,1]) selectInput("provincia.sel", label ...
#' Level 1 CAT decision tree generator #' #' Generates a list of nodes lists for the first level of the CAT decision tree #' #' @param bank matrix of the item bank. Rows represent items, and columns #' represent parameters. If the model is \code{"GRM"}, the first column #' represents the \code{alpha} parameters a...
/R/create_level_1.R
no_license
cran/cat.dt
R
false
false
2,453
r
#' Level 1 CAT decision tree generator #' #' Generates a list of nodes lists for the first level of the CAT decision tree #' #' @param bank matrix of the item bank. Rows represent items, and columns #' represent parameters. If the model is \code{"GRM"}, the first column #' represents the \code{alpha} parameters a...
\name{findVar} \alias{findVar} \title{Recursively explore a list} \usage{ findVar(object, pattern, ...) } \arguments{ \item{object}{A list.} \item{pattern}{a function (must return a logical).} \item{...}{Optional arguments to be passed to \code{grepl}.} } \value{ A list with the desired variable (\code{$var})...
/man/findVar.Rd
no_license
SESjo/SES
R
false
false
884
rd
\name{findVar} \alias{findVar} \title{Recursively explore a list} \usage{ findVar(object, pattern, ...) } \arguments{ \item{object}{A list.} \item{pattern}{a function (must return a logical).} \item{...}{Optional arguments to be passed to \code{grepl}.} } \value{ A list with the desired variable (\code{$var})...
library(shiny) shinyUI( fluidPage( titlePanel("Interactive Normal Distribution"), sidebarLayout( sidebarPanel( sliderInput("obs", "Select the number of observations", min = 1, max = 1000, val = 100), br(), sliderInput("mean", "Select the mean for the Normal Distribution", min = -10...
/InteractiveNormalDistribution/ui.r
permissive
melissavanbussel/shiny-apps
R
false
false
1,525
r
library(shiny) shinyUI( fluidPage( titlePanel("Interactive Normal Distribution"), sidebarLayout( sidebarPanel( sliderInput("obs", "Select the number of observations", min = 1, max = 1000, val = 100), br(), sliderInput("mean", "Select the mean for the Normal Distribution", min = -10...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/help_parameter_estimation_functions.R \name{load_trial_data} \alias{load_trial_data} \title{Function to load the file containing trial data and return it} \usage{ load_trial_data(file = NULL, sheet = NULL) } \arguments{ \item{file, }{name of ...
/man/load_trial_data.Rd
no_license
sheejamk/packDAMipd
R
false
true
618
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/help_parameter_estimation_functions.R \name{load_trial_data} \alias{load_trial_data} \title{Function to load the file containing trial data and return it} \usage{ load_trial_data(file = NULL, sheet = NULL) } \arguments{ \item{file, }{name of ...
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58574658665472e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704...
/myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615768303-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
1,803
r
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58574658665472e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wtd.rowMeans.R \name{wtd.rowMeans} \alias{wtd.rowMeans} \title{Weighted Mean of each Row - WORK IN PROGRESS} \usage{ wtd.rowMeans(x, wts = 1, na.rm = FALSE, dims = 1) } \arguments{ \item{x}{Data.frame or matrix, required.} \item{wts}{Weights...
/man/wtd.rowMeans.Rd
no_license
ejanalysis/analyze.stuff
R
false
true
1,767
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wtd.rowMeans.R \name{wtd.rowMeans} \alias{wtd.rowMeans} \title{Weighted Mean of each Row - WORK IN PROGRESS} \usage{ wtd.rowMeans(x, wts = 1, na.rm = FALSE, dims = 1) } \arguments{ \item{x}{Data.frame or matrix, required.} \item{wts}{Weights...
generate_figure2_plots <- function() { fig_dir <- "figs/paper_figs/fig2" if (!dir.exists(fig_dir)) { dir.create(fig_dir) } # fig 2c atlas_projection_tko_chimera() # fig 2d host_vs_ko_age(T) # fig 2e tko_barplot_ct_frequency(mat_nm = "tko_chim_wt10", ko_type = "KO", plot...
/scripts/paper_figures/fig2.R
no_license
tanaylab/tet-gastrulation
R
false
false
27,669
r
generate_figure2_plots <- function() { fig_dir <- "figs/paper_figs/fig2" if (!dir.exists(fig_dir)) { dir.create(fig_dir) } # fig 2c atlas_projection_tko_chimera() # fig 2d host_vs_ko_age(T) # fig 2e tko_barplot_ct_frequency(mat_nm = "tko_chim_wt10", ko_type = "KO", plot...
#' @title Provides the t-test and chi square's p value and statistic for binary targets and provides it in a dataframe for a set of columns or for a whole dataframe.In case of ANOVA provides all possible tests's summary #' @description 1.Provides the t-test and chi square's p value and statistic and provides it in a ...
/R/ANOVA_testing.R
no_license
Manistrikes23493/PackageHyptest
R
false
false
2,514
r
#' @title Provides the t-test and chi square's p value and statistic for binary targets and provides it in a dataframe for a set of columns or for a whole dataframe.In case of ANOVA provides all possible tests's summary #' @description 1.Provides the t-test and chi square's p value and statistic and provides it in a ...
context("canvasXpress Web Charts - Area") ifelse(interactive(), source("tests/cX-function.R"), source("../cX-function.R")) test_that("cXarea1", { result <- cXarea1() if (interactive()) { print(result) } expect_s3_class(result, "canvasXpress") expect_s3_class(result, "htmlwidget") }) test_that("c...
/tests/testthat/test-area.R
no_license
ginberg/canvasXpress
R
false
false
1,223
r
context("canvasXpress Web Charts - Area") ifelse(interactive(), source("tests/cX-function.R"), source("../cX-function.R")) test_that("cXarea1", { result <- cXarea1() if (interactive()) { print(result) } expect_s3_class(result, "canvasXpress") expect_s3_class(result, "htmlwidget") }) test_that("c...
# ------------------------------------------------ # The Separation of Between-Person and Within-Person Components # of Individual Change Over Time: A Latent Curve Model # With Structured Residuals # # Curran, Howard, Bainter, Lane, McGinley # # Journal of Consulting and Clinical Psychology 2014 # doi.org/10.1037/a00...
/curran2014-separation.R
no_license
cddesja/lavaan-reproducible
R
false
false
18,118
r
# ------------------------------------------------ # The Separation of Between-Person and Within-Person Components # of Individual Change Over Time: A Latent Curve Model # With Structured Residuals # # Curran, Howard, Bainter, Lane, McGinley # # Journal of Consulting and Clinical Psychology 2014 # doi.org/10.1037/a00...
setwd("your\\dir") rm(list = ls()) ## current data set name db <- "nr" switch (db, en = { cat("en data\n") flush.console() sd <- read.table("e_simmat_dc.txt") sd <- as.matrix(sd) st <- read.table("e_simmat_dg.txt") st <- as.matrix(st...
/KronRLSMKL/demo_kronRlsMKL.R
no_license
minghao2016/chemogenomicAlg4DTIpred
R
false
false
4,697
r
setwd("your\\dir") rm(list = ls()) ## current data set name db <- "nr" switch (db, en = { cat("en data\n") flush.console() sd <- read.table("e_simmat_dc.txt") sd <- as.matrix(sd) st <- read.table("e_simmat_dg.txt") st <- as.matrix(st...
library(plotly) library(dplyr) setwd('D:/Buren_files/MEGA/papersAle/Frank_etal_2016_rebuttal/IcelandCod') ## cod ---- icecod <- read.table('Cod_Iceland.txt', header = T, sep = ' ') icecod17 <- read.table('Cod_Iceland_2017.txt', header = T, sep = ' ') with(icecod, plot(year, SSB)) with(icecod17, plot(year, age4.bi...
/IcelandCod/Cod_Iceland_plot.r
no_license
adbpatagonia/Frank_etal_rebuttal
R
false
false
2,247
r
library(plotly) library(dplyr) setwd('D:/Buren_files/MEGA/papersAle/Frank_etal_2016_rebuttal/IcelandCod') ## cod ---- icecod <- read.table('Cod_Iceland.txt', header = T, sep = ' ') icecod17 <- read.table('Cod_Iceland_2017.txt', header = T, sep = ' ') with(icecod, plot(year, SSB)) with(icecod17, plot(year, age4.bi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scores_nbinom.R \name{scores_nbinom} \alias{scores_nbinom} \alias{crps_nbinom} \alias{logs_nbinom} \title{Calculating scores for the negative binomial distribution} \usage{ crps_nbinom(y, size, prob, mu) logs_nbinom(y, size, prob, mu) } \arg...
/man/scores_nbinom.Rd
no_license
thiyangt/scoringRules
R
false
true
934
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scores_nbinom.R \name{scores_nbinom} \alias{scores_nbinom} \alias{crps_nbinom} \alias{logs_nbinom} \title{Calculating scores for the negative binomial distribution} \usage{ crps_nbinom(y, size, prob, mu) logs_nbinom(y, size, prob, mu) } \arg...
#' @title Negative log-likelihood for potentially constrained von Bertalanffy growth model (typically used internally). #' #' @description \code{vb_bind_nll} returns the negative log-likelihood for the von Bertalanffy model. Equality constraints across sexes can be implemented for any combination of parameters using th...
/R/vb_bind_nll.R
no_license
mintoc/lhmixr
R
false
false
2,846
r
#' @title Negative log-likelihood for potentially constrained von Bertalanffy growth model (typically used internally). #' #' @description \code{vb_bind_nll} returns the negative log-likelihood for the von Bertalanffy model. Equality constraints across sexes can be implemented for any combination of parameters using th...
library(testthat) context("Tests for tracker") tcxfile <- system.file("extdata", "2013-06-08-090442.TCX", package = "trackeR") DataNonGarmin <- readContainer(tcxfile, cores = 2) ## Test trackeRdata object test_that("class of object from readContainer is trackeRdata", { expect_is(DataNonGarmin, "trackeRdata") }) ...
/trackeR/tests/testthat/tests_testthat.R
no_license
ingted/R-Examples
R
false
false
2,399
r
library(testthat) context("Tests for tracker") tcxfile <- system.file("extdata", "2013-06-08-090442.TCX", package = "trackeR") DataNonGarmin <- readContainer(tcxfile, cores = 2) ## Test trackeRdata object test_that("class of object from readContainer is trackeRdata", { expect_is(DataNonGarmin, "trackeRdata") }) ...
# If each ln = l, we have pn = (1-l)^(n-1) * l, which is the geometric distribution # on 1, 2, ... So, the geometric distribution corresponds to the case of a constant # hazard rate. n = 100000 l = 0.9 U <- runif(n) f <- c() j <- 1 Fj <- 1 while (sum(f) < n) { f[j] <- length(which(U >= Fj * (1 - l) & U < Fj)) j ...
/4.18-19.R
no_license
fengzenggithub/R-Simulation-by-Ross
R
false
false
1,654
r
# If each ln = l, we have pn = (1-l)^(n-1) * l, which is the geometric distribution # on 1, 2, ... So, the geometric distribution corresponds to the case of a constant # hazard rate. n = 100000 l = 0.9 U <- runif(n) f <- c() j <- 1 Fj <- 1 while (sum(f) < n) { f[j] <- length(which(U >= Fj * (1 - l) & U < Fj)) j ...
ResultTable <- read.csv("wResult.csv", head=T); summary(ResultTable) ori <- ResultTable$AvgFromReviews w1 <- ResultTable$wIDF w2 <- ResultTable$wAvg w3 <- ResultTable$wRM w4 <- ResultTable$wBase n <- length(ori) RMSE1 <- sqrt(sum((ori-w1)^2)/n) RMSE2 <- sqrt(sum((ori-w2)^2)/n) RMSE3 <- sqrt(sum((ori-w3)^2)/n) RMSE4...
/llh/计算商品和类别对应表/testResult.R
no_license
hustwcw/RecSys2013
R
false
false
347
r
ResultTable <- read.csv("wResult.csv", head=T); summary(ResultTable) ori <- ResultTable$AvgFromReviews w1 <- ResultTable$wIDF w2 <- ResultTable$wAvg w3 <- ResultTable$wRM w4 <- ResultTable$wBase n <- length(ori) RMSE1 <- sqrt(sum((ori-w1)^2)/n) RMSE2 <- sqrt(sum((ori-w2)^2)/n) RMSE3 <- sqrt(sum((ori-w3)^2)/n) RMSE4...
## File:- cachematrix.R ## This file contains a pair of functions - 'makeCacheMatrix' & ## 'cacheSolve' - implemented for 'Caching the Inverse of a Matrix'. ## The function 'makeCacheMatrix' creates a special "matrix" object ## that can cache its inverse. The function 'cacheSolve' computes the ## inverse of the sp...
/cachematrix.R
no_license
Veena-S/ProgrammingAssignment2
R
false
false
2,463
r
## File:- cachematrix.R ## This file contains a pair of functions - 'makeCacheMatrix' & ## 'cacheSolve' - implemented for 'Caching the Inverse of a Matrix'. ## The function 'makeCacheMatrix' creates a special "matrix" object ## that can cache its inverse. The function 'cacheSolve' computes the ## inverse of the sp...
plotData <- read.table("household_power_consumption.txt", header=T, sep=";", na.strings="?") ## set time variable finalData <- plotData[plotData$Date %in% c("1/2/2007","2/2/2007"),] SetTime <-strptime(paste(finalData$Date, finalData$Time, sep=" "),"%d/%m/%Y %H:%M:%S") finalData <- cbind(SetTime, finalData) ## ## Genera...
/Plot4.R
no_license
fmrigueiro/Exploratory-Data-Analysis
R
false
false
1,148
r
plotData <- read.table("household_power_consumption.txt", header=T, sep=";", na.strings="?") ## set time variable finalData <- plotData[plotData$Date %in% c("1/2/2007","2/2/2007"),] SetTime <-strptime(paste(finalData$Date, finalData$Time, sep=" "),"%d/%m/%Y %H:%M:%S") finalData <- cbind(SetTime, finalData) ## ## Genera...
#' Sequential Optimal Design #' #' Given a set of georeferenced measurements, this function finds the `add.pts` #' optimal locations for sampling. #' #' @param geodata A geodata object containing the initial sample #' @param add.pts Number of points to be added to the initial sample #' @param n Number of points in the...
/R/sod.R
no_license
GS-Ferreira/geodesign
R
false
false
24,338
r
#' Sequential Optimal Design #' #' Given a set of georeferenced measurements, this function finds the `add.pts` #' optimal locations for sampling. #' #' @param geodata A geodata object containing the initial sample #' @param add.pts Number of points to be added to the initial sample #' @param n Number of points in the...
library(lubridate) library(mailR) library(shiny) library(RMySQL) library(dplyr) library(plyr) library(DT) library(twitteR) library(shinythemes) Free_agent <- read.csv("FA.csv") team <- read.csv("team.csv") team$Team <- as.character(team$Team) setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_sec...
/app.R
no_license
ryuth/FA_app
R
false
false
52,228
r
library(lubridate) library(mailR) library(shiny) library(RMySQL) library(dplyr) library(plyr) library(DT) library(twitteR) library(shinythemes) Free_agent <- read.csv("FA.csv") team <- read.csv("team.csv") team$Team <- as.character(team$Team) setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_sec...
#' cum_usage_plot UI Function #' #' @description A shiny Module. #' #' @param id,input,output,session Internal parameters for {shiny}. #' #' @noRd #' #' @importFrom shiny NS tagList mod_cum_usage_plot_ui <- function(id){ ns <- NS(id) tagList( column(10, shinycssloaders::withSpinner(dygraphs::dygraphOutput...
/R/mod_cum_usage_plot.R
permissive
MHenderson/energy-use
R
false
false
5,316
r
#' cum_usage_plot UI Function #' #' @description A shiny Module. #' #' @param id,input,output,session Internal parameters for {shiny}. #' #' @noRd #' #' @importFrom shiny NS tagList mod_cum_usage_plot_ui <- function(id){ ns <- NS(id) tagList( column(10, shinycssloaders::withSpinner(dygraphs::dygraphOutput...
# install.packages("readxl") # install.packages("sf") # install.packages("stringr") # install.packages("dplyr") # install.packages("leaflet") # install.packages("janitor") # install.packages("leaflet.extras") # install.packages("htmlwidgets") # install.packages("htmltools") # install.packages("glue") # instal...
/bolton geographies map.R
no_license
shanwilkinson2/random_leafletmaps
R
false
false
14,161
r
# install.packages("readxl") # install.packages("sf") # install.packages("stringr") # install.packages("dplyr") # install.packages("leaflet") # install.packages("janitor") # install.packages("leaflet.extras") # install.packages("htmlwidgets") # install.packages("htmltools") # install.packages("glue") # instal...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/databasemigrationservice_operations.R \name{databasemigrationservice_modify_replication_instance} \alias{databasemigrationservice_modify_replication_instance} \title{Modifies the replication instance to apply new settings} \usage{ databasemig...
/cran/paws.migration/man/databasemigrationservice_modify_replication_instance.Rd
permissive
paws-r/paws
R
false
true
6,915
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/databasemigrationservice_operations.R \name{databasemigrationservice_modify_replication_instance} \alias{databasemigrationservice_modify_replication_instance} \title{Modifies the replication instance to apply new settings} \usage{ databasemig...
\name{multComb} \alias{multComb} \title{ Combinations of the first n integers in k groups } \description{ This is a function, used for generating the permutations used for the Exact distribution of many of the statistical procedures in Hollander, Wolfe, Chicken - Nonparametric Statistical Methods Third Edition, t...
/man/multComb.Rd
no_license
cran/NSM3
R
false
false
1,004
rd
\name{multComb} \alias{multComb} \title{ Combinations of the first n integers in k groups } \description{ This is a function, used for generating the permutations used for the Exact distribution of many of the statistical procedures in Hollander, Wolfe, Chicken - Nonparametric Statistical Methods Third Edition, t...
###################################################################### path="LncEvoDevo/" pathStringTie=paste(path,"results/stringtie_assembly/",sep="") pathEnsembl=paste(path, "data/ensembl_annotations/",sep="") pathUCSC=paste(path, "data/UCSC_sequences/",sep="") release=94 options(scipen=999) ## remove scientific ...
/ortho_genes/exon_projections/format.exon.blocks.bed.R
no_license
anecsulea/LncEvoDevo
R
false
false
1,810
r
###################################################################### path="LncEvoDevo/" pathStringTie=paste(path,"results/stringtie_assembly/",sep="") pathEnsembl=paste(path, "data/ensembl_annotations/",sep="") pathUCSC=paste(path, "data/UCSC_sequences/",sep="") release=94 options(scipen=999) ## remove scientific ...
# This is the server logic for a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) shinyServer(function(input, output) { output$contents <- renderTable({ # input$file1 will be NULL initially. After the user selects ...
/upload/server.R
no_license
divensambhwani/R-Shiny
R
false
false
1,013
r
# This is the server logic for a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) shinyServer(function(input, output) { output$contents <- renderTable({ # input$file1 will be NULL initially. After the user selects ...
#===================================================================================================================== # Analysis of A2058 response in PLX4720 #===================================================================================================================== # Set the working directory, read the file...
/LongTerm/A2058_PLX4720_Response.R
no_license
paudelbb/Paudel_et_al_2016
R
false
false
1,457
r
#===================================================================================================================== # Analysis of A2058 response in PLX4720 #===================================================================================================================== # Set the working directory, read the file...
library(shiny) library(dygraphs) library(shinydashboard) ###UI ui <- dashboardPage(skin = "purple", dashboardHeader(title = "Visualization of eddy-covariance data",titleWidth = 350), dashboardSidebar( tags$head( tags$script(type="text/javascript",'$(document).ready(function(){ $...
/ui.R
no_license
MarekBernhauser/ShinyMeteo
R
false
false
2,735
r
library(shiny) library(dygraphs) library(shinydashboard) ###UI ui <- dashboardPage(skin = "purple", dashboardHeader(title = "Visualization of eddy-covariance data",titleWidth = 350), dashboardSidebar( tags$head( tags$script(type="text/javascript",'$(document).ready(function(){ $...
#### 09-1 #### ## -------------------------------------------------------------------- ## install.packages("foreign") # foreign 패키지 설치 library(foreign) # SPSS 파일 로드 library(dplyr) # 전처리 library(ggplot2) # 시각화 library(readxl) # 엑셀 파일 불러오기 # 데이터 불러오기 raw_welfare <- r...
/Script_Part09.r
no_license
CheonYoonHan/BigData_R
R
false
false
11,400
r
#### 09-1 #### ## -------------------------------------------------------------------- ## install.packages("foreign") # foreign 패키지 설치 library(foreign) # SPSS 파일 로드 library(dplyr) # 전처리 library(ggplot2) # 시각화 library(readxl) # 엑셀 파일 불러오기 # 데이터 불러오기 raw_welfare <- r...
library(ape) library(phyloch) source("dstats.R") source("fastConc.R") setwd("/1_Aligns/1_raw") read.csv("Seqs_metadata.csv", stringsAsFactors = F) -> meta unique(meta[,c(2,3,7)]) -> clades in.dir <- "/1_Aligns/2_singles_aligned" out.dir <- "/1_Aligns/3_singles_filtered" ##################################...
/1 Concatenate.R
no_license
mreginato/Melastomataceae_dispersal_mode_scripts
R
false
false
6,891
r
library(ape) library(phyloch) source("dstats.R") source("fastConc.R") setwd("/1_Aligns/1_raw") read.csv("Seqs_metadata.csv", stringsAsFactors = F) -> meta unique(meta[,c(2,3,7)]) -> clades in.dir <- "/1_Aligns/2_singles_aligned" out.dir <- "/1_Aligns/3_singles_filtered" ##################################...
# Load packages needed_packages = c("dplyr", "data.table", "sf", "tibble") for (package in needed_packages) { if (!require(package, character.only=TRUE)) {install.packages(package, character.only=TRUE)} library(package, character.only=TRUE) } rm("needed_packages", "package") # Set working directory to th...
/SPL_Berlin_Districts_Neighbourhoods/berlin_districts_neighbourhoods.R
no_license
silvia-ventoruzzo/SPL-WISE-2018
R
false
false
2,157
r
# Load packages needed_packages = c("dplyr", "data.table", "sf", "tibble") for (package in needed_packages) { if (!require(package, character.only=TRUE)) {install.packages(package, character.only=TRUE)} library(package, character.only=TRUE) } rm("needed_packages", "package") # Set working directory to th...
# Source: PLS Path Modeling with R # by Gaston Sanchez # www.gastonsanchez.com # Chapter 7: Moderating Effects (조절변수) rm(list=ls()) setwd("~/R/Structural Equation Modeling") # Case Study: Simplified Customer Satisfaction # load package 'plspm' library("plspm") # Step 1: plspm 라이브러리를 열고 satisfaction 데이터...
/PLS04.R
no_license
Joshuariver/SEM
R
false
false
2,602
r
# Source: PLS Path Modeling with R # by Gaston Sanchez # www.gastonsanchez.com # Chapter 7: Moderating Effects (조절변수) rm(list=ls()) setwd("~/R/Structural Equation Modeling") # Case Study: Simplified Customer Satisfaction # load package 'plspm' library("plspm") # Step 1: plspm 라이브러리를 열고 satisfaction 데이터...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_formula.R \name{get_formula} \alias{get_formula} \title{Get formula of models.} \usage{ get_formula(x, ...) } \arguments{ \item{x}{Object.} \item{...}{Arguments passed to or from other methods.} } \description{ Get formula of models. Imp...
/man/get_formula.Rd
permissive
HugoNjb/psycho.R
R
false
true
710
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_formula.R \name{get_formula} \alias{get_formula} \title{Get formula of models.} \usage{ get_formula(x, ...) } \arguments{ \item{x}{Object.} \item{...}{Arguments passed to or from other methods.} } \description{ Get formula of models. Imp...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.r \docType{data} \name{howard7} \alias{howard7} \title{Production, imports, exports, and consumption of hardwood products, by major product, 1965-1999.} \format{A data frame with 56 observations on 31 variables: \describe{ \item{AllProdu...
/man/howard7.Rd
no_license
alanarnholt/WOODCARB3R
R
false
true
2,405
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.r \docType{data} \name{howard7} \alias{howard7} \title{Production, imports, exports, and consumption of hardwood products, by major product, 1965-1999.} \format{A data frame with 56 observations on 31 variables: \describe{ \item{AllProdu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stata.R \name{scale_linetype_stata} \alias{scale_linetype_stata} \title{Stata linetype palette (discrete)} \usage{ scale_linetype_stata(...) } \arguments{ \item{...}{Arguments passed on to \code{discrete_scale} \describe{ \item{breaks}{One ...
/man/scale_linetype_stata.Rd
no_license
Mababyak/ggthemes
R
false
true
2,733
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stata.R \name{scale_linetype_stata} \alias{scale_linetype_stata} \title{Stata linetype palette (discrete)} \usage{ scale_linetype_stata(...) } \arguments{ \item{...}{Arguments passed on to \code{discrete_scale} \describe{ \item{breaks}{One ...
this.dir <- dirname(parent.frame(2)$ofile) setwd(this.dir) #setwd('/Users/gzchen/Documents/GitHub/thesis') source('MyFuns.R') ########################## ######generate tree####### set.seed(1012) p <- 50 phy <- rtree(p) phy$tip.label <- 1:p ######Define clusters & plot tree######## #define the associated clusters by ...
/type1err.R
no_license
gz-chen/thesis
R
false
false
4,808
r
this.dir <- dirname(parent.frame(2)$ofile) setwd(this.dir) #setwd('/Users/gzchen/Documents/GitHub/thesis') source('MyFuns.R') ########################## ######generate tree####### set.seed(1012) p <- 50 phy <- rtree(p) phy$tip.label <- 1:p ######Define clusters & plot tree######## #define the associated clusters by ...
library(testthat) source("tools/TestsTools.R") test_that("Test Gramm_matrix(not_matrix)",{ expect_error(Gramm_matrix(c(NaN, NaN)), "Not appropriate input format") expect_error(Gramm_matrix(data.frame(NaN, NaN)), "Not appropriate input format") expect_error(Gramm_matrix(list(NaN, NaN)), "Not appropriate input fo...
/tests/test_MVCweights.R
no_license
h-dychko/zno_analysis
R
false
false
5,778
r
library(testthat) source("tools/TestsTools.R") test_that("Test Gramm_matrix(not_matrix)",{ expect_error(Gramm_matrix(c(NaN, NaN)), "Not appropriate input format") expect_error(Gramm_matrix(data.frame(NaN, NaN)), "Not appropriate input format") expect_error(Gramm_matrix(list(NaN, NaN)), "Not appropriate input fo...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/add_missing.R \name{add_missing} \alias{add_missing} \title{Add missing values to a vector given a MCAR, MAR, or MNAR scheme} \usage{ add_missing(y, fun = function(y, rate = 0.1, ...) rep(rate, length(y)), ...) } \arguments{ \item{y}{an input...
/man/add_missing.Rd
no_license
mattsigal/SimDesign
R
false
true
3,499
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/add_missing.R \name{add_missing} \alias{add_missing} \title{Add missing values to a vector given a MCAR, MAR, or MNAR scheme} \usage{ add_missing(y, fun = function(y, rate = 0.1, ...) rep(rate, length(y)), ...) } \arguments{ \item{y}{an input...
mdx_format = function(variant = "markdown_strict", preserve_yaml = TRUE, dev = 'png', df_print = "tibble", fig_width = 7, fig_height = 5){ args <- "" # add post_processor for yaml preservation post_proce...
/R/mdx_format.R
permissive
jdnudel/writeMDX
R
false
false
1,196
r
mdx_format = function(variant = "markdown_strict", preserve_yaml = TRUE, dev = 'png', df_print = "tibble", fig_width = 7, fig_height = 5){ args <- "" # add post_processor for yaml preservation post_proce...
#Programming assignment (Exploratory Data Analysis) data <- read.table('household_power_consumption.txt', sep = ';', check.names = TRUE, col.names = c('Date', 'Time', 'Global_active_power', 'Global_reactive_power', 'Voltage', 'Global_intensity', 'Sub_metering_1', 'Sub_metering_2', 'Sub_metering_3')) data = data[-1,...
/Plot4.R
no_license
TriinK/ExData_Plotting1
R
false
false
1,764
r
#Programming assignment (Exploratory Data Analysis) data <- read.table('household_power_consumption.txt', sep = ';', check.names = TRUE, col.names = c('Date', 'Time', 'Global_active_power', 'Global_reactive_power', 'Voltage', 'Global_intensity', 'Sub_metering_1', 'Sub_metering_2', 'Sub_metering_3')) data = data[-1,...
## Loading the original data set blogs <- readLines("./final/en_US/en_US.blogs.txt", encoding = "UTF-8", skipNul=TRUE) news <- readLines("./final/en_US/en_US.news.txt", encoding = "UTF-8", skipNul=TRUE) twitter <- readLines("./final/en_US/en_US.twitter.txt", encoding = "UTF-8", skipNul=TRUE) ## Generating a...
/testStuff/textSample.R
no_license
PavanYaswanth/capstone-project
R
false
false
587
r
## Loading the original data set blogs <- readLines("./final/en_US/en_US.blogs.txt", encoding = "UTF-8", skipNul=TRUE) news <- readLines("./final/en_US/en_US.news.txt", encoding = "UTF-8", skipNul=TRUE) twitter <- readLines("./final/en_US/en_US.twitter.txt", encoding = "UTF-8", skipNul=TRUE) ## Generating a...
# SELECTING BIOCLIMATIC VARIABLES FOR MODELLING ADAPTED# # using VIF analysis #................................................... #................................................... # Packages #### library("data.table") library("raster") library("dismo") library("BiodiversityR") library("car") #...........
/script/02.1_vif_analysis_variable_selection.R
no_license
EJEYZiE01/Macadamia-modelling
R
false
false
1,959
r
# SELECTING BIOCLIMATIC VARIABLES FOR MODELLING ADAPTED# # using VIF analysis #................................................... #................................................... # Packages #### library("data.table") library("raster") library("dismo") library("BiodiversityR") library("car") #...........
# SETUP ==== # load libraries ==== library(shiny) library(shinydashboard) library(shinyLP) library(shinythemes) library(plotly) library(ggplot2) library(data.table) library(circlize) library(dplyr) library(stringr) library(fs) library(rmarkdown) library(markdown) library(data.table) library(wesanderson) library(shinycs...
/app/ui.R
permissive
mattlee821/EpiViz
R
false
false
10,304
r
# SETUP ==== # load libraries ==== library(shiny) library(shinydashboard) library(shinyLP) library(shinythemes) library(plotly) library(ggplot2) library(data.table) library(circlize) library(dplyr) library(stringr) library(fs) library(rmarkdown) library(markdown) library(data.table) library(wesanderson) library(shinycs...
#' @title Construct a gpuVector #' @description Construct a gpuVector of a class that inherits #' from \code{gpuVector} #' @param data An object that is or can be converted to a #' \code{vector} #' @param length A non-negative integer specifying the desired length. #' @param type A character string specifying the type...
/R/gpuVector.R
no_license
bryant1410/gpuR
R
false
false
7,411
r
#' @title Construct a gpuVector #' @description Construct a gpuVector of a class that inherits #' from \code{gpuVector} #' @param data An object that is or can be converted to a #' \code{vector} #' @param length A non-negative integer specifying the desired length. #' @param type A character string specifying the type...