content
large_stringlengths
0
6.46M
path
large_stringlengths
3
331
license_type
large_stringclasses
2 values
repo_name
large_stringlengths
5
125
language
large_stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
4
6.46M
extension
large_stringclasses
75 values
text
stringlengths
0
6.46M
library("xts") library("quantmod") library("RSQLite") library("RMySQL") library("DBI") library("config") getSymbolsDB <- function (Symbols, FilterToday=FALSE, FilterAge=NULL, env = .GlobalEnv) { db.fields = c("date", "day_open", "day_high", "day_low", "day_close", "volume") if(FilterToday) { query <- sprint...
/R/dbInterface.R
no_license
strategist922/TraderBot
R
false
false
11,069
r
library("xts") library("quantmod") library("RSQLite") library("RMySQL") library("DBI") library("config") getSymbolsDB <- function (Symbols, FilterToday=FALSE, FilterAge=NULL, env = .GlobalEnv) { db.fields = c("date", "day_open", "day_high", "day_low", "day_close", "volume") if(FilterToday) { query <- sprint...
#' Add surface cover observation records #' #' Adds surface cover observation records to a VegX object from a data frame where rows are cover observations. #' #' @param target The initial object of class \code{\linkS4class{VegX}} to be modified #' @param x A data frame where each row corresponds to one surface cover ob...
/R/addSurfaceCoverObservations.R
no_license
Heterocephalus/VegX
R
false
false
15,899
r
#' Add surface cover observation records #' #' Adds surface cover observation records to a VegX object from a data frame where rows are cover observations. #' #' @param target The initial object of class \code{\linkS4class{VegX}} to be modified #' @param x A data frame where each row corresponds to one surface cover ob...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/textstem-package.R \docType{data} \name{sam_i_am} \alias{sam_i_am} \title{Sam I Am Text} \format{A character vector with 169 elements} \usage{ data(sam_i_am) } \description{ A dataset containing a character vector of the text from ...
/man/sam_i_am.Rd
no_license
cran/textstem
R
false
true
421
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/textstem-package.R \docType{data} \name{sam_i_am} \alias{sam_i_am} \title{Sam I Am Text} \format{A character vector with 169 elements} \usage{ data(sam_i_am) } \description{ A dataset containing a character vector of the text from ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stat_mds.R \name{stat_mds} \alias{stat_mds} \title{Stat MDS} \usage{ stat_mds(mapping = NULL, data = NULL, geom = "point", position = "identity", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, mds_method = "pca", tsne_perplexity = 3...
/man/stat_mds.Rd
permissive
bdilday/grcdr
R
false
true
2,167
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stat_mds.R \name{stat_mds} \alias{stat_mds} \title{Stat MDS} \usage{ stat_mds(mapping = NULL, data = NULL, geom = "point", position = "identity", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, mds_method = "pca", tsne_perplexity = 3...
#Terecalls uses 4 centers around the globe to process customer order forms.They audit certain % #of the customer order forms. Any error in order form renders is defective and has to be reworked #before processing. the manager wants to check whether the defective % varies by centers.please #analyse the data at 5% si...
/hypothesis4.R
no_license
Smitag2526/Data-Science
R
false
false
2,469
r
#Terecalls uses 4 centers around the globe to process customer order forms.They audit certain % #of the customer order forms. Any error in order form renders is defective and has to be reworked #before processing. the manager wants to check whether the defective % varies by centers.please #analyse the data at 5% si...
curve(pnorm(x,0,1), xlim=c(-5,5),ylim=c(0,1), type="l", col="red", main="Cumulative distribution function", xlab='X', ylab=' ') curve(pt(x,1), col="maroon4", add=TRUE) curve(pt(x,3), col="olivedrab4", add=TRUE) curve(pt(x,5), col="orange3", add=TRUE) curve(pt(x,10), col="turquoise3", add=TRUE) curve(pt(x,100), col...
/Report 2/ex1.r
no_license
msklodia/TFALDS
R
false
false
509
r
curve(pnorm(x,0,1), xlim=c(-5,5),ylim=c(0,1), type="l", col="red", main="Cumulative distribution function", xlab='X', ylab=' ') curve(pt(x,1), col="maroon4", add=TRUE) curve(pt(x,3), col="olivedrab4", add=TRUE) curve(pt(x,5), col="orange3", add=TRUE) curve(pt(x,10), col="turquoise3", add=TRUE) curve(pt(x,100), col...
# Install and load packages package_names <- c("survey","dplyr","foreign","devtools") lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x)) lapply(package_names, require, character.only=T) install_github("e-mitchell/meps_r_pkg/MEPS") library(MEPS) options(survey.lonely.ps...
/mepstrends/hc_use/json/code/r/pctEXP__education__insurance__.r
permissive
HHS-AHRQ/MEPS-summary-tables
R
false
false
3,327
r
# Install and load packages package_names <- c("survey","dplyr","foreign","devtools") lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x)) lapply(package_names, require, character.only=T) install_github("e-mitchell/meps_r_pkg/MEPS") library(MEPS) options(survey.lonely.ps...
# LOAD PACKAGES library(tidytext) library(dplyr) library(ggplot2) library(lubridate) library(tidyverse) library(stringr) library(ggplot2) library(scales) library(zoo) library(yaml) library(twitteR) library(tm) library(wordcloud) library (Hmisc) #-----------------------------------------------------------...
/ANALYSIS.R
no_license
Rzuchowski/Text_Mining_Project
R
false
false
5,191
r
# LOAD PACKAGES library(tidytext) library(dplyr) library(ggplot2) library(lubridate) library(tidyverse) library(stringr) library(ggplot2) library(scales) library(zoo) library(yaml) library(twitteR) library(tm) library(wordcloud) library (Hmisc) #-----------------------------------------------------------...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/taxclean.R \name{rm_typos} \alias{rm_typos} \title{Remove typos Remove all unnecessary characters and punctuation from the species name.} \usage{ rm_typos(sp, parallel = FALSE, n_cores = 6) } \arguments{ \item{sp}{species name.} \item{parall...
/man/rm_typos.Rd
no_license
emilio-berti/taxclean
R
false
true
757
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/taxclean.R \name{rm_typos} \alias{rm_typos} \title{Remove typos Remove all unnecessary characters and punctuation from the species name.} \usage{ rm_typos(sp, parallel = FALSE, n_cores = 6) } \arguments{ \item{sp}{species name.} \item{parall...
################################################################## # R code for Armillotta, Luati and Lupparelli # Observation driven models for discrete-valued time series ################################################################## #################################################################### ## ...
/model selection binomial.R
no_license
mirkoarmillotta/observation_driven
R
false
false
16,188
r
################################################################## # R code for Armillotta, Luati and Lupparelli # Observation driven models for discrete-valued time series ################################################################## #################################################################### ## ...
# 1. Read all the needed file to R x_test <- read.table("X_test.txt") y_test <- read.table("y_test.txt") x_train <- read.table("X_train.txt") y_train <- read.table("y_train.txt") sub_test <- read.table("subject_test.txt") sub_train <- read.table("subject_train.txt") feature <- read.table("features.txt") #2.Bind all t...
/run_analysis.R
no_license
llkongs/tidydataset
R
false
false
2,910
r
# 1. Read all the needed file to R x_test <- read.table("X_test.txt") y_test <- read.table("y_test.txt") x_train <- read.table("X_train.txt") y_train <- read.table("y_train.txt") sub_test <- read.table("subject_test.txt") sub_train <- read.table("subject_train.txt") feature <- read.table("features.txt") #2.Bind all t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/list_plotter.R \name{list_plotter} \alias{list_plotter} \title{Function to plot palette within a list} \usage{ list_plotter(color_list, names, package_name) } \arguments{ \item{package_name}{} } \value{ } \description{ Function to plot palet...
/man/list_plotter.Rd
permissive
JBLecomte/JBUtilities
R
false
true
339
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/list_plotter.R \name{list_plotter} \alias{list_plotter} \title{Function to plot palette within a list} \usage{ list_plotter(color_list, names, package_name) } \arguments{ \item{package_name}{} } \value{ } \description{ Function to plot palet...
library(mlr) listLearners()$class library(tidyverse) data(diabetes, package = "mclust") diabetesTib <- as_tibble(diabetes) diabetesTask <- makeClassifTask(data = diabetesTib, target = "class") inner <- makeResampleDesc("CV") outer <- makeResampleDesc("RepCV", folds = 10, reps = 5) knnParamSpace <- makeP...
/knn.R
no_license
sncamie/R-practice
R
false
false
652
r
library(mlr) listLearners()$class library(tidyverse) data(diabetes, package = "mclust") diabetesTib <- as_tibble(diabetes) diabetesTask <- makeClassifTask(data = diabetesTib, target = "class") inner <- makeResampleDesc("CV") outer <- makeResampleDesc("RepCV", folds = 10, reps = 5) knnParamSpace <- makeP...
library(readxl) titanic <- read_excel("data/chapter_01/Titanic.xlsx") # depending on 'Sex' set 'Sex.num' to 0 (female) or 1 (male) titanic$Sex.num <- ifelse(test = titanic$Sex == "female", yes = 0, no = 1) # subset of first class passengers titanic.FirstClass <- su...
/ch_01_getting_started.R
no_license
qualityland/Myers_Stats_Intro
R
false
false
561
r
library(readxl) titanic <- read_excel("data/chapter_01/Titanic.xlsx") # depending on 'Sex' set 'Sex.num' to 0 (female) or 1 (male) titanic$Sex.num <- ifelse(test = titanic$Sex == "female", yes = 0, no = 1) # subset of first class passengers titanic.FirstClass <- su...
context("tests get_dependencies") test_that("test get_dependencies",{ with_dir(pkg,{ test <- get_dependencies() expect_equal(test, c("shiny","golem")) test2 <- capture_output(get_dependencies(dput = TRUE)) expect_equal(test2,"c(\"shiny\", \"golem\")") }) })
/tests/testthat/test-aaadependencies.R
permissive
rpodcast/golem
R
false
false
279
r
context("tests get_dependencies") test_that("test get_dependencies",{ with_dir(pkg,{ test <- get_dependencies() expect_equal(test, c("shiny","golem")) test2 <- capture_output(get_dependencies(dput = TRUE)) expect_equal(test2,"c(\"shiny\", \"golem\")") }) })
CFB2019 <- read.csv("~/OneDrive - SectorShield Inc/2020 Summer/CFB2019-v2.csv") View(CFB2019) attach(CFB2019) RankVars <- c("Def.Rank", "First.Down.Def.Rank", "Kickoff.Return.Def.Rank","Kickoff.Return.Rank","Off.Rank","Pass.Def.Rank","Penalty.Rank","Punt.Return.Def.Rank","Punt.Return.Rank","Redzone.Def.Rank","Redzone....
/exam1question2--CFBranklogit.R
no_license
lizerlfunk/categoricaldatacollegefootball
R
false
false
2,612
r
CFB2019 <- read.csv("~/OneDrive - SectorShield Inc/2020 Summer/CFB2019-v2.csv") View(CFB2019) attach(CFB2019) RankVars <- c("Def.Rank", "First.Down.Def.Rank", "Kickoff.Return.Def.Rank","Kickoff.Return.Rank","Off.Rank","Pass.Def.Rank","Penalty.Rank","Punt.Return.Def.Rank","Punt.Return.Rank","Redzone.Def.Rank","Redzone....
## ----------------------------------------------------------------------------- c(0, .3, 0.91, 0.95, .99, .999, .9999, .99999, 1) %>% enframe() %>% mutate(time_weight = as.character(value) , tw = map(value, ~get_time_weights(1:100, time_weight = .x) %>% enframe)) %>% select(time...
/vignettes/autoforecast.R
no_license
DrRoad/fdk
R
false
false
465
r
## ----------------------------------------------------------------------------- c(0, .3, 0.91, 0.95, .99, .999, .9999, .99999, 1) %>% enframe() %>% mutate(time_weight = as.character(value) , tw = map(value, ~get_time_weights(1:100, time_weight = .x) %>% enframe)) %>% select(time...
# Load Required Packages library(stringr) # Load in DFS Data for Draft Kings data <- read.csv("~/dfs_project/dfs_all_weeks.csv", stringsAsFactors = FALSE) # Create a New Player Name for(i in 1:nrow(data)){ data$full_name[i] <- paste(data$Name2[i], data$Name1[i]) data$full_name[i] <- str_trim(data$full_name[i], si...
/data_manipulation.R
no_license
pierceaw/dfs_project
R
false
false
4,060
r
# Load Required Packages library(stringr) # Load in DFS Data for Draft Kings data <- read.csv("~/dfs_project/dfs_all_weeks.csv", stringsAsFactors = FALSE) # Create a New Player Name for(i in 1:nrow(data)){ data$full_name[i] <- paste(data$Name2[i], data$Name1[i]) data$full_name[i] <- str_trim(data$full_name[i], si...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/engine_xgboost.R \name{fit_xgboost_es} \alias{fit_xgboost_es} \title{FitParamSpecs Class Constructor for xgboost Engine} \usage{ fit_xgboost_es(data, eval, task_type, ...) } \arguments{ \item{data}{A training data of \code{\link[xgboost]{xgb....
/man/fit_xgboost_es.Rd
permissive
five-dots/ml4e
R
false
true
760
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/engine_xgboost.R \name{fit_xgboost_es} \alias{fit_xgboost_es} \title{FitParamSpecs Class Constructor for xgboost Engine} \usage{ fit_xgboost_es(data, eval, task_type, ...) } \arguments{ \item{data}{A training data of \code{\link[xgboost]{xgb....
# d.UMAP.R # ::rtemis:: # 2019 Efstathios D. Gennatas egenn.github.io #' Uniform Manifold Approximation and Projection #' #' Calculates UMAP and projections using github package \code{jlmelville/uwot} #' #' @param x Input matrix #' @param x.test Optional test set matrix. Will be projected on to UMAP bases #' @param k...
/R/d.UMAP.R
no_license
bakaibaiazbekov/rtemis
R
false
false
3,488
r
# d.UMAP.R # ::rtemis:: # 2019 Efstathios D. Gennatas egenn.github.io #' Uniform Manifold Approximation and Projection #' #' Calculates UMAP and projections using github package \code{jlmelville/uwot} #' #' @param x Input matrix #' @param x.test Optional test set matrix. Will be projected on to UMAP bases #' @param k...
library(RCurl) library(jsonlite) library(Rfast) library(ggmap) library(tidyverse) library(stringr) CleanerSeattle = function(df){ # Recode Event Number and Offense Number to factor df$CAD.Event.Number = as.factor(df$CAD.Event.Number) df$General.Offense.Number = as.factor(df$General.Offense.Number) # Convert...
/weather_time_code.R
no_license
mreyers/Case-Study-2
R
false
false
3,886
r
library(RCurl) library(jsonlite) library(Rfast) library(ggmap) library(tidyverse) library(stringr) CleanerSeattle = function(df){ # Recode Event Number and Offense Number to factor df$CAD.Event.Number = as.factor(df$CAD.Event.Number) df$General.Offense.Number = as.factor(df$General.Offense.Number) # Convert...
# Prevents under and overflow when calculating mean log likelihoods. log_sum_exp <- function(x) { max(x) + log(sum(exp(x - max(x)))) } # stan's chain merger combine_stan_chains <- function(files) { rstan::sflist2stanfit(lapply(files, readRDS)) } # sub function to compile chains for our workflow compile_chains <-...
/R/process_output.R
no_license
traitecoevo/stan_crossval_demo
R
false
false
3,558
r
# Prevents under and overflow when calculating mean log likelihoods. log_sum_exp <- function(x) { max(x) + log(sum(exp(x - max(x)))) } # stan's chain merger combine_stan_chains <- function(files) { rstan::sflist2stanfit(lapply(files, readRDS)) } # sub function to compile chains for our workflow compile_chains <-...
## ----setup, include=FALSE---------------------------------------------------------------------------------------------------------------------------------------- knitr::opts_chunk$set(echo = TRUE) ## --------------------------------------------------------------------------------------------------------------------...
/Extracted_code.R
no_license
pratik187/Stochastic-process-project
R
false
false
18,502
r
## ----setup, include=FALSE---------------------------------------------------------------------------------------------------------------------------------------- knitr::opts_chunk$set(echo = TRUE) ## --------------------------------------------------------------------------------------------------------------------...
# Support Vector Machine (SVM) #Setting working directory getwd() setwd('E:/Support Vector Machine( SVM)') #Importing the dataset dataset = read.csv('Social_Network_Ads.csv') #Exploring the dataset head(dataset) tail(dataset) nrow(dataset) ncol(dataset) str(dataset) summary(dataset) #Removing unnec...
/Classification/Support Vector Machine(SVM)/SupportVectorMachine.R
no_license
PranavBhandari97/Machine-Learning-Algorithms
R
false
false
2,952
r
# Support Vector Machine (SVM) #Setting working directory getwd() setwd('E:/Support Vector Machine( SVM)') #Importing the dataset dataset = read.csv('Social_Network_Ads.csv') #Exploring the dataset head(dataset) tail(dataset) nrow(dataset) ncol(dataset) str(dataset) summary(dataset) #Removing unnec...
#!/usr/bin/env Rscript suppressPackageStartupMessages(library(connectir)) library(tools) # Read in arg args <- commandArgs(trailingOnly = TRUE) if (length(args) != 3) { msg <- paste( "usage: 42_smooth_data.R strategy resolution fwhm", "strategy: compcor or global", "resolution: integer ...
/nki/03_post-process/42_smooth_data.R
no_license
vishalmeeni/cwas-paper
R
false
false
2,363
r
#!/usr/bin/env Rscript suppressPackageStartupMessages(library(connectir)) library(tools) # Read in arg args <- commandArgs(trailingOnly = TRUE) if (length(args) != 3) { msg <- paste( "usage: 42_smooth_data.R strategy resolution fwhm", "strategy: compcor or global", "resolution: integer ...
#' @title GSVA functions #' #' #' #' @description GSVA function #' @param data expression matrix or data.frame with row in genes and column in cells #' @param gSets gene sets in list format #' @return gsva score matrix #' @import data.table #' @importFrom stats na.omit #' @export #' calGsva = function(data, ...
/R/gsva.R
no_license
jjlea/testSctpa
R
false
false
1,575
r
#' @title GSVA functions #' #' #' #' @description GSVA function #' @param data expression matrix or data.frame with row in genes and column in cells #' @param gSets gene sets in list format #' @return gsva score matrix #' @import data.table #' @importFrom stats na.omit #' @export #' calGsva = function(data, ...
#' Student's t-Test #' #' Performs one and two sample t-tests. #' The mosaic \code{t.test} provides wrapper functions around the function #' of the same name in \pkg{stats}. #' These wrappers provide an extended interface that allows for a more systematic #' use of the formula interface. #' #' @rdname ttest #' #'...
/R/ttest.R
no_license
kenjimyzk/mosaic
R
false
false
2,679
r
#' Student's t-Test #' #' Performs one and two sample t-tests. #' The mosaic \code{t.test} provides wrapper functions around the function #' of the same name in \pkg{stats}. #' These wrappers provide an extended interface that allows for a more systematic #' use of the formula interface. #' #' @rdname ttest #' #'...
context("QZ decomposition") test_that("Hansen RBC", { A <- structure( c(0, 0.33, 1.01010101010101, 0, 0, 1, 0.100306091215182, 0.95, 0, -0.82676426385235, 0.067205081114172, 0, -1.01010101010101, -1, -0.0773060912151821, 0), .Dim = c(4L, 4L)) E <- structure( c(-0.0221776767676768, 0, 1, 0, ...
/tests/testthat/test-qz.R
no_license
kenjisato/lrem
R
false
false
803
r
context("QZ decomposition") test_that("Hansen RBC", { A <- structure( c(0, 0.33, 1.01010101010101, 0, 0, 1, 0.100306091215182, 0.95, 0, -0.82676426385235, 0.067205081114172, 0, -1.01010101010101, -1, -0.0773060912151821, 0), .Dim = c(4L, 4L)) E <- structure( c(-0.0221776767676768, 0, 1, 0, ...
#' ls.objects #' @export ls.objects <- function ( pattern, pos = 1, order.by="Size", decreasing=TRUE) { napply <- function(names, fn) sapply(names, function(x) fn(get(x, pos = pos))) names <- ls(pos = pos, pattern = pattern) if (length(names)==0) { message("Empty workspace") invisible(NULL) ...
/R/rstudio_tools.R
no_license
rocalabern/h2otools
R
false
false
2,058
r
#' ls.objects #' @export ls.objects <- function ( pattern, pos = 1, order.by="Size", decreasing=TRUE) { napply <- function(names, fn) sapply(names, function(x) fn(get(x, pos = pos))) names <- ls(pos = pos, pattern = pattern) if (length(names)==0) { message("Empty workspace") invisible(NULL) ...
#Bootstrap - first steps
/README.rd
no_license
ArkadiuszKalka/bootstrap
R
false
false
24
rd
#Bootstrap - first steps
print("Exports intercepts from samples *.RData file.") source(file="../base/config.R") args = commandArgs(trailingOnly = TRUE) if (length(args)<2) { stop("Two args expected: input .RData file with samples, output tsv file") } input = ifelse (length(args)>=1, args[[1]], "???") output = ifelse (length(args)>=2,...
/src/postprocessing/samples2intercepts.R
no_license
tkusmierczyk/multiple_regression_lda
R
false
false
806
r
print("Exports intercepts from samples *.RData file.") source(file="../base/config.R") args = commandArgs(trailingOnly = TRUE) if (length(args)<2) { stop("Two args expected: input .RData file with samples, output tsv file") } input = ifelse (length(args)>=1, args[[1]], "???") output = ifelse (length(args)>=2,...
#' @import shiny #' @importFrom shinyAce aceEditor #' @importFrom plotly plotlyOutput renderPlotly #' @importFrom plyr ddply #' @import dplyr #' @import ggplot2 #' @importFrom grDevices png pdf #' @importFrom stats as.formula #' @importFrom rlang UQ syms cimdo_gadget<-function(obj, plotHeight = 8...
/R/cimdo_gadget.R
no_license
yonicd/CIMDO
R
false
false
20,781
r
#' @import shiny #' @importFrom shinyAce aceEditor #' @importFrom plotly plotlyOutput renderPlotly #' @importFrom plyr ddply #' @import dplyr #' @import ggplot2 #' @importFrom grDevices png pdf #' @importFrom stats as.formula #' @importFrom rlang UQ syms cimdo_gadget<-function(obj, plotHeight = 8...
basics_update_model_specifics <- function(model_specifics){ # Check required arguments check_argument_in_model_specifics("model_formula", model_specifics) check_argument_in_model_specifics("family", model_specifics) check_argument_in_model_specifics("caller", model_specifics) # Set default arguments model...
/R/basics_update_model_specifics.R
permissive
bbolker/cvms
R
false
false
1,930
r
basics_update_model_specifics <- function(model_specifics){ # Check required arguments check_argument_in_model_specifics("model_formula", model_specifics) check_argument_in_model_specifics("family", model_specifics) check_argument_in_model_specifics("caller", model_specifics) # Set default arguments model...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/performance.R \name{contr_bench_IDX} \alias{contr_bench_IDX} \title{contribution by benchmark for the Index-based positions} \usage{ contr_bench_IDX(start_date, end_date, eq_ret = composites$bench_rets_IDX_EQ[i], fi_ret = composites$bench...
/man/contr_bench_IDX.Rd
no_license
cquigley/rPerfFunc
R
false
true
567
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/performance.R \name{contr_bench_IDX} \alias{contr_bench_IDX} \title{contribution by benchmark for the Index-based positions} \usage{ contr_bench_IDX(start_date, end_date, eq_ret = composites$bench_rets_IDX_EQ[i], fi_ret = composites$bench...
library(gWidgets) ### Name: gtree ### Title: Constructor for widget to display heirarchical dta ### Aliases: gtree ### Keywords: interface ### ** Examples ## Not run: ##D ## function to find offspring ##D offspring <- function(path, offspring.data=NULL) { ##D if(length(path) > 0) ##D directo...
/data/genthat_extracted_code/gWidgets/examples/gtree.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
2,680
r
library(gWidgets) ### Name: gtree ### Title: Constructor for widget to display heirarchical dta ### Aliases: gtree ### Keywords: interface ### ** Examples ## Not run: ##D ## function to find offspring ##D offspring <- function(path, offspring.data=NULL) { ##D if(length(path) > 0) ##D directo...
# A GUI for building histograms. BuildHistogram <- function(d, var.names=NULL, var.default=1L, parent=NULL) { ## Additional functions # Calculate and plot histogram CalcHist <- function(draw.plot=TRUE) { tclServiceMode(FALSE) on.exit(tclServiceMode(TRUE)) idx <- as.integer(tcl(frame1....
/RSurvey/R/BuildHistogram.R
no_license
ingted/R-Examples
R
false
false
13,262
r
# A GUI for building histograms. BuildHistogram <- function(d, var.names=NULL, var.default=1L, parent=NULL) { ## Additional functions # Calculate and plot histogram CalcHist <- function(draw.plot=TRUE) { tclServiceMode(FALSE) on.exit(tclServiceMode(TRUE)) idx <- as.integer(tcl(frame1....
# packages ---------------------------------------------------------------- library(tidyverse) # description ------------------------------------------------------------- # sometimes you want to fit a bunch of models with slightly different formulae, but also against a nested column of tibbles # example -------------...
/modeling/many_formulae_many_dataframes.R
no_license
katbeescience/R_snippets
R
false
false
993
r
# packages ---------------------------------------------------------------- library(tidyverse) # description ------------------------------------------------------------- # sometimes you want to fit a bunch of models with slightly different formulae, but also against a nested column of tibbles # example -------------...
library(jsonlite) library(ggplot2) require(gridExtra) library(plyr) setwd("~/GitHub/causal_markov/Experiments/relative_judgments/data") expt_folder = "pilot2.1" comments = c() N_part = 0 for (fn in dir(path = expt_folder)){ N_part = N_part + 1 x = read.csv(paste(expt_folder, '/', fn, sep = '')) # print(fn) #...
/Experiments/relative_judgments/data/view_comments.R
no_license
ishita-dg/causal_markov
R
false
false
395
r
library(jsonlite) library(ggplot2) require(gridExtra) library(plyr) setwd("~/GitHub/causal_markov/Experiments/relative_judgments/data") expt_folder = "pilot2.1" comments = c() N_part = 0 for (fn in dir(path = expt_folder)){ N_part = N_part + 1 x = read.csv(paste(expt_folder, '/', fn, sep = '')) # print(fn) #...
\name{dat1m} \alias{dat1m} \docType{data} \title{ Serialized lm model file } \description{ A character string for a serialized lm model } \usage{data("dat1m")} \format{ A character string } \details{ Example lm model based on dat1 } \source{ The source of this function is in the } \references{ There are no refe...
/PLMplusPMMLpkg.Rcheck/00_pkg_src/PLMplusPMMLpkg/man/dat1m.Rd
no_license
KinkyDesign/PLMpkg
R
false
false
414
rd
\name{dat1m} \alias{dat1m} \docType{data} \title{ Serialized lm model file } \description{ A character string for a serialized lm model } \usage{data("dat1m")} \format{ A character string } \details{ Example lm model based on dat1 } \source{ The source of this function is in the } \references{ There are no refe...
library(tidyverse) load("rda/murders.rda") 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
VasilissaLix/murders
R
false
false
222
r
library(tidyverse) load("rda/murders.rda") 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")
\name{hsi} \docType{data} \alias{hsi} \alias{hsi.df} \title{ Hang Seng Stock Market Index } \description{ The \code{hsi} timeSeries dataset provides the daily closing value for the Hanh Seng Index from January 1994 to March 2004. In addition, the data set is also made available as a \code{data.frame}. } \us...
/man/hsi.Rd
no_license
StephanKalika/QRM
R
false
false
407
rd
\name{hsi} \docType{data} \alias{hsi} \alias{hsi.df} \title{ Hang Seng Stock Market Index } \description{ The \code{hsi} timeSeries dataset provides the daily closing value for the Hanh Seng Index from January 1994 to March 2004. In addition, the data set is also made available as a \code{data.frame}. } \us...
library(ape) source("./macroevolve.R") readnjoin<-function(location,seq_amount,print.every=0){ ##read sequences and then use neighbor-joining to infer trees. Then save trees - will make new folder for trees ##Reads in sets of sequences and set them as DNAbin objects trees<-list() for(i in 1:seq_amount){ seqs...
/Rscripts/neighbor_join.R
no_license
coleoguy/hbmacronet
R
false
false
1,518
r
library(ape) source("./macroevolve.R") readnjoin<-function(location,seq_amount,print.every=0){ ##read sequences and then use neighbor-joining to infer trees. Then save trees - will make new folder for trees ##Reads in sets of sequences and set them as DNAbin objects trees<-list() for(i in 1:seq_amount){ seqs...
library(tidyverse) library(tidylog) load("./data/20220531/20220531_data.Rdata") # 1. Make an overview of the number of observations in each WBE and call it *table1* (recap of last class; use group_by and summarize). table1 <- partridge %>% group_by(wbe) %>% summarize(nobs = n()) %>% ungroup() # 2. Add province, ...
/src/20220531/20220531_challenges_solutions.R
permissive
inbo/coding-club
R
false
false
4,421
r
library(tidyverse) library(tidylog) load("./data/20220531/20220531_data.Rdata") # 1. Make an overview of the number of observations in each WBE and call it *table1* (recap of last class; use group_by and summarize). table1 <- partridge %>% group_by(wbe) %>% summarize(nobs = n()) %>% ungroup() # 2. Add province, ...
myiconv <- function(s, encoding) { iconv(s, from = "UTF-8", to = encoding, toRaw = TRUE)[[1]] }
/tests/testthat/helper.R
permissive
randy3k/ustring
R
false
false
100
r
myiconv <- function(s, encoding) { iconv(s, from = "UTF-8", to = encoding, toRaw = TRUE)[[1]] }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_splitwo.R \docType{data} \name{splitwo} \alias{splitwo} \title{splitwo} \format{An object of class \code{list} of length 1643.} \usage{ splitwo } \description{ A list of 1643 patent documents for use in testing earliest_priority. } \keyw...
/man/splitwo.Rd
no_license
poldham/oldhammisc
R
false
true
334
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_splitwo.R \docType{data} \name{splitwo} \alias{splitwo} \title{splitwo} \format{An object of class \code{list} of length 1643.} \usage{ splitwo } \description{ A list of 1643 patent documents for use in testing earliest_priority. } \keyw...
#' Filter data frame when filter can be `NULL` #' #' For use inside `dplyr::filter()` operations where sometimes it is desired to #' filter nothing. #' #' @param x A string or vector of strings with the column name(s) to apply the #' filter on. #' @param filter_value A value (or vector when `filter_how == "in"`) to...
/R/tidy_filter_null.R
permissive
CDU-data-science-team/experienceAnalysis
R
false
false
2,084
r
#' Filter data frame when filter can be `NULL` #' #' For use inside `dplyr::filter()` operations where sometimes it is desired to #' filter nothing. #' #' @param x A string or vector of strings with the column name(s) to apply the #' filter on. #' @param filter_value A value (or vector when `filter_how == "in"`) to...
########################## Affymetrix.Exon.QC.R ########################## # # This function reads in txt files from APT for quality control # of Exon Arrays # # Parms: # qcPath = path where input data is stored (created by APT) # FileListing = txt file with a list of CEL files to be imported # imagePat...
/R_src/Affymetrix.Exon.QC.R
no_license
TabakoffLab/PhenoGen
R
false
false
5,918
r
########################## Affymetrix.Exon.QC.R ########################## # # This function reads in txt files from APT for quality control # of Exon Arrays # # Parms: # qcPath = path where input data is stored (created by APT) # FileListing = txt file with a list of CEL files to be imported # imagePat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/optim_vmpf.R \name{predict_front} \alias{predict_front} \title{Predicted Pareto front} \usage{ predict_front(model, lower, upper, control = NULL, modelcontrol = NULL) } \arguments{ \item{model}{Object of class \code{\link{mkm}}.} \item{lower...
/man/predict_front.Rd
no_license
coldfir3/moko
R
false
true
1,680
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/optim_vmpf.R \name{predict_front} \alias{predict_front} \title{Predicted Pareto front} \usage{ predict_front(model, lower, upper, control = NULL, modelcontrol = NULL) } \arguments{ \item{model}{Object of class \code{\link{mkm}}.} \item{lower...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reporter-check.R \name{CheckReporter} \alias{CheckReporter} \title{Check reporter: 13 line summary of problems} \description{ \verb{R CMD check} displays only the last 13 lines of the result, so this report is designed to ensure that you see ...
/man/CheckReporter.Rd
permissive
r-lib/testthat
R
false
true
836
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reporter-check.R \name{CheckReporter} \alias{CheckReporter} \title{Check reporter: 13 line summary of problems} \description{ \verb{R CMD check} displays only the last 13 lines of the result, so this report is designed to ensure that you see ...
#Functions and Repetitions library("nycflights13") library("tidyverse") #generating a function in order to calculate the amplitude amplitude <- function(x) { #subtracting the maximum and the minimum of a variable resultado <- max(x,na.rm=T) - min(x,na.rm=T) return(resultado) } #e.g. flights %>% pull(departur...
/Repetition.R
no_license
aviola98/data_analysis_4_social_science
R
false
false
5,693
r
#Functions and Repetitions library("nycflights13") library("tidyverse") #generating a function in order to calculate the amplitude amplitude <- function(x) { #subtracting the maximum and the minimum of a variable resultado <- max(x,na.rm=T) - min(x,na.rm=T) return(resultado) } #e.g. flights %>% pull(departur...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/BIOM-class.R \docType{methods} \name{biom_shape} \alias{biom_shape} \alias{biom_shape,biom-method} \title{The matrix dimensions of a \code{\link{biom-class}} object.} \usage{ biom_shape(x) \S4method{biom_shape}{biom}(x) } \arguments{ \item{x...
/man/biom_shape-methods.Rd
no_license
pooranis/biomformat
R
false
true
854
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/BIOM-class.R \docType{methods} \name{biom_shape} \alias{biom_shape} \alias{biom_shape,biom-method} \title{The matrix dimensions of a \code{\link{biom-class}} object.} \usage{ biom_shape(x) \S4method{biom_shape}{biom}(x) } \arguments{ \item{x...
library(rtweet) ### Name: tweets_data ### Title: Extracts tweets data from users data object. ### Aliases: tweets_data tweet_data data_tweet data_tweets ### ** Examples ## Not run: ##D ## get twitter user data ##D jack <- lookup_users("jack") ##D ##D ## get data on most recent tweet from user(s) ##D tweets_data(j...
/data/genthat_extracted_code/rtweet/examples/tweets_data.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
563
r
library(rtweet) ### Name: tweets_data ### Title: Extracts tweets data from users data object. ### Aliases: tweets_data tweet_data data_tweet data_tweets ### ** Examples ## Not run: ##D ## get twitter user data ##D jack <- lookup_users("jack") ##D ##D ## get data on most recent tweet from user(s) ##D tweets_data(j...
## Creates a matrix that can cache its inverse makeCacheMatrix <- function( z = matrix() ) { iz <- NULL ## Set the matrix set <- function( matrix ) { z <<- matrix iz <<- NULL } ## Get the matrix get <- function() { ## Return the matrix z } ## Inv...
/cachematrix.R
no_license
SoniB/ProgrammingAssignment2
R
false
false
1,054
r
## Creates a matrix that can cache its inverse makeCacheMatrix <- function( z = matrix() ) { iz <- NULL ## Set the matrix set <- function( matrix ) { z <<- matrix iz <<- NULL } ## Get the matrix get <- function() { ## Return the matrix z } ## Inv...
#df file for demo 2 library(dplyr) library(lubridate) library(rgdal) library(tidyr) ############################################# ## Load the shape file to a Spatial Polygon Data Frame (SPDF) using the readOGR() function geo_data = readOGR(dsn="data", layer="TM_WORLD_BORDERS_SIMPL-0.3") ...
/demo_vista_2/maps_tigo_ver_df.R
no_license
malvarocastro/maps_development
R
false
false
2,442
r
#df file for demo 2 library(dplyr) library(lubridate) library(rgdal) library(tidyr) ############################################# ## Load the shape file to a Spatial Polygon Data Frame (SPDF) using the readOGR() function geo_data = readOGR(dsn="data", layer="TM_WORLD_BORDERS_SIMPL-0.3") ...
##function makeCacheMatrix has one argument which must be a square matrix ##4 functions are created: get(), set(), setinv(), getinv() ##note that cached inverse must be set by user makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { ##creates set function which will input new...
/cachematrix.R
no_license
edrake07/ProgrammingAssignment2
R
false
false
1,249
r
##function makeCacheMatrix has one argument which must be a square matrix ##4 functions are created: get(), set(), setinv(), getinv() ##note that cached inverse must be set by user makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { ##creates set function which will input new...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getGlist.R \name{getGlist} \alias{getGlist} \title{getGlist} \usage{ getGlist(popFreq, fst = 0, refKlist = NULL, refRlist = NULL, ibd = c(1, 0, 0)) } \arguments{ \item{popFreq}{A list of allele frequencies for a given population. Each named...
/euroformix_2.3.0/man/getGlist.Rd
no_license
oyvble/euroformixArchive
R
false
true
1,081
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getGlist.R \name{getGlist} \alias{getGlist} \title{getGlist} \usage{ getGlist(popFreq, fst = 0, refKlist = NULL, refRlist = NULL, ibd = c(1, 0, 0)) } \arguments{ \item{popFreq}{A list of allele frequencies for a given population. Each named...
library(mclust) library(dplyr) library(kernlab) library(speccalt) library(kknn) library(fcd) ################################################################################ ### Read in and Format data #################################################### #######################################################...
/Fall_2018/DataMiningII/Homework 6/Hwk6_#2.R
no_license
matt-isaac/Graduate
R
false
false
7,048
r
library(mclust) library(dplyr) library(kernlab) library(speccalt) library(kknn) library(fcd) ################################################################################ ### Read in and Format data #################################################### #######################################################...
usethis::use_package('magrittr') usethis::use_package('stats') usethis::use_package('questionr') usethis::use_package('ggplot2') usethis::use_package('ggpubr') usethis::use_package('dplyr') usethis::use_package('readxl') usethis::use_package('ggradar') usethis::use_package('scales') usethis::use_package('tibble') useth...
/devtools_history.R
no_license
CCCelestine/siseanalytics
R
false
false
1,106
r
usethis::use_package('magrittr') usethis::use_package('stats') usethis::use_package('questionr') usethis::use_package('ggplot2') usethis::use_package('ggpubr') usethis::use_package('dplyr') usethis::use_package('readxl') usethis::use_package('ggradar') usethis::use_package('scales') usethis::use_package('tibble') useth...
#' Poisson regression via mixed models #' #' The `"glmer"` engine estimates fixed and random effect regression parameters #' using maximum likelihood (or restricted maximum likelihood) estimation. #' #' @includeRmd man/rmd/poisson_reg_glmer.md details #' #' @name details_poisson_reg_glmer #' @keywords internal NULL # ...
/R/poisson_reg_glmer.R
permissive
tidymodels/parsnip
R
false
false
395
r
#' Poisson regression via mixed models #' #' The `"glmer"` engine estimates fixed and random effect regression parameters #' using maximum likelihood (or restricted maximum likelihood) estimation. #' #' @includeRmd man/rmd/poisson_reg_glmer.md details #' #' @name details_poisson_reg_glmer #' @keywords internal NULL # ...
\name{tmle} \Rdversion{1.3.0-2} \alias{tmle} %- Also NEED an '\alias' for EACH other topic documented here. \title{Targeted Maximum Likelihood Estimation} \description{ Targeted maximum likelihood estimation of parameters of a marginal structural model, and of marginal treatment effects of a binary point treatment on a...
/man/tmle.Rd
no_license
pzivich/tmle
R
false
false
11,228
rd
\name{tmle} \Rdversion{1.3.0-2} \alias{tmle} %- Also NEED an '\alias' for EACH other topic documented here. \title{Targeted Maximum Likelihood Estimation} \description{ Targeted maximum likelihood estimation of parameters of a marginal structural model, and of marginal treatment effects of a binary point treatment on a...
## ----setup, include=FALSE------------------------------------------------ knitr::opts_chunk$set(echo = TRUE) install.packages("factoextra",dependencies = TRUE) ## ------------------------------------------------------------------------ library(tidyverse) # data manipulation library(cluster) # clustering algo...
/Clustering Tutorial Part 3 - US Arrests k-Means.R
no_license
kxnxchukwu/Data-and-Web-Mining
R
false
false
3,964
r
## ----setup, include=FALSE------------------------------------------------ knitr::opts_chunk$set(echo = TRUE) install.packages("factoextra",dependencies = TRUE) ## ------------------------------------------------------------------------ library(tidyverse) # data manipulation library(cluster) # clustering algo...
#' Check if Gitbook is installed. #' #' If Gitbook is not installed it will try to do so. If the installion fails or #' Node.js is not installed, an error will be thrown. #' #' @param quiet logical indicating whether messages should be printed. #' @export checkForGitbook <- function(quiet=FALSE) { if(!quiet) cat("ch...
/R/checkForGitbook.R
no_license
uribo/Rgitbook
R
false
false
715
r
#' Check if Gitbook is installed. #' #' If Gitbook is not installed it will try to do so. If the installion fails or #' Node.js is not installed, an error will be thrown. #' #' @param quiet logical indicating whether messages should be printed. #' @export checkForGitbook <- function(quiet=FALSE) { if(!quiet) cat("ch...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/feature_categories.R \name{cn_burden} \alias{cn_burden} \title{something} \usage{ cn_burden(seg = seg, log_ratio_threshold = 0.2) } \arguments{ \item{log_ratio_threshold}{} } \value{ copy number burden of samples from selected cancer types } ...
/man/cn_burden.Rd
no_license
bergerm1/GenomeDerivedDiagnosis
R
false
true
355
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/feature_categories.R \name{cn_burden} \alias{cn_burden} \title{something} \usage{ cn_burden(seg = seg, log_ratio_threshold = 0.2) } \arguments{ \item{log_ratio_threshold}{} } \value{ copy number burden of samples from selected cancer types } ...
\name{optimr} \alias{optimr} \encoding{UTF-8} \title{General-purpose optimization} \concept{minimization} \concept{maximization} \description{ General-purpose optimization wrapper function that calls other R tools for optimization, including the existing optim() function. \code{optimr} also tries to unify the cal...
/man/optimr.Rd
no_license
cran/optimx
R
false
false
8,850
rd
\name{optimr} \alias{optimr} \encoding{UTF-8} \title{General-purpose optimization} \concept{minimization} \concept{maximization} \description{ General-purpose optimization wrapper function that calls other R tools for optimization, including the existing optim() function. \code{optimr} also tries to unify the cal...
`m1` <- c(0.185576718814894, 0.185524476216824, 0.185634720316347, 0.185799816055646, 0.185568962510881, 0.186136109521630, 0.185568153396675, 0.185561323394898, 0.185392373375200, 0.185518036513983, 0.185506813472442, 0.185634845512072, 0.185553152502376, 0.185435856035718, 0.185450579283086, 0.185484849099389, 0....
/R/Ch08/m1m2.R
no_license
robertandrewstevens/ASDAwR2
R
false
false
5,975
r
`m1` <- c(0.185576718814894, 0.185524476216824, 0.185634720316347, 0.185799816055646, 0.185568962510881, 0.186136109521630, 0.185568153396675, 0.185561323394898, 0.185392373375200, 0.185518036513983, 0.185506813472442, 0.185634845512072, 0.185553152502376, 0.185435856035718, 0.185450579283086, 0.185484849099389, 0....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/github_functions.R \name{find_github_folder} \alias{find_github_folder} \title{Find github folder} \usage{ find_github_folder( github_folder_name = jap::default_github_folder(), home_dir = jap::default_home_dir() ) } \arguments{ \item{git...
/man/find_github_folder.Rd
no_license
Giappo/jap
R
false
true
569
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/github_functions.R \name{find_github_folder} \alias{find_github_folder} \title{Find github folder} \usage{ find_github_folder( github_folder_name = jap::default_github_folder(), home_dir = jap::default_home_dir() ) } \arguments{ \item{git...
library(plyr) library(testit) distanceFiles <- list.files(path="/home/alina/Documents/Universität/2016W/Multimedia Search and Retrieval/Project/MMSearch-Retrieval_2016_MainProject/MMSR_Project_ImagerRetrieval/src/scripts/diverseimages", pattern="distances*", full.names=TRUE, recursive=FALSE) dirs...
/MMSR_Project_ImagerRetrieval/src/scripts/diverseimages/R/retrieveRelevantImages.R
no_license
ntsmwk/MMSearch-Retrieval_2016_MainProject
R
false
false
2,527
r
library(plyr) library(testit) distanceFiles <- list.files(path="/home/alina/Documents/Universität/2016W/Multimedia Search and Retrieval/Project/MMSearch-Retrieval_2016_MainProject/MMSR_Project_ImagerRetrieval/src/scripts/diverseimages", pattern="distances*", full.names=TRUE, recursive=FALSE) dirs...
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-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/1615767927-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.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704...
\name{regress} \docType{methods} \alias{regress} \alias{regress,SpatRaster,SpatRaster-method} \alias{regress,SpatRaster,numeric-method} \title{Cell level regression} \description{ Run a regression model for each cell of a SpatRaster. The independent variable can either be defined by a vector, or another ...
/man/regress.Rd
no_license
cran/terra
R
false
false
1,442
rd
\name{regress} \docType{methods} \alias{regress} \alias{regress,SpatRaster,SpatRaster-method} \alias{regress,SpatRaster,numeric-method} \title{Cell level regression} \description{ Run a regression model for each cell of a SpatRaster. The independent variable can either be defined by a vector, or another ...
# Data for NEI & SCC NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") library(ggplot2) # NEI vehicle data vehicles <- grepl("vehicle", SCC$SCC.Level.Two, ignore.case=TRUE) vehiclesSCC <- SCC[vehicles,]$SCC vehiclesNEI <- NEI[NEI$SCC %in% vehiclesSCC,] vehiclesBaltimoreNEI <- vehic...
/plot6.R
no_license
Anushak2011/EDAProject2
R
false
false
1,046
r
# Data for NEI & SCC NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") library(ggplot2) # NEI vehicle data vehicles <- grepl("vehicle", SCC$SCC.Level.Two, ignore.case=TRUE) vehiclesSCC <- SCC[vehicles,]$SCC vehiclesNEI <- NEI[NEI$SCC %in% vehiclesSCC,] vehiclesBaltimoreNEI <- vehic...
\name{PRECASTObj} \alias{PRECASTObj} \title{A simple PRECASTObj for example} \description{ A simple PRECASTObj for example. } \details{ This PRECASTObj include the basic slots in PRECAST object; see \link{PRECASTObj-class} for more details. }
/man/PObj.Rd
no_license
feiyoung/PRECAST
R
false
false
248
rd
\name{PRECASTObj} \alias{PRECASTObj} \title{A simple PRECASTObj for example} \description{ A simple PRECASTObj for example. } \details{ This PRECASTObj include the basic slots in PRECAST object; see \link{PRECASTObj-class} for more details. }
#' @title The class to represent a collection of splines #' @description The main class in the \code{splinets}-package used for representing a collection of splines. #' @slot knots numeric \code{n+2} vector, a vector of n+2 knot locations presented in the increasing order and without ties. #' @slot smorder non-negative...
/R/class_Splinets.R
no_license
jolars/Splinets
R
false
false
6,272
r
#' @title The class to represent a collection of splines #' @description The main class in the \code{splinets}-package used for representing a collection of splines. #' @slot knots numeric \code{n+2} vector, a vector of n+2 knot locations presented in the increasing order and without ties. #' @slot smorder non-negative...
# making table data sets library(dplyr) library(tidyr) library(MorpheusData) #############benchmark 44 dat <- read.table(text= " Day HL.Average D.Average LL.Average noHKB.Average HL.SD D.SD LL.SD noHKB.SD 1 0.00000 8760 8900 10000 8030 2337.844 924.2742 1120.785 1592.646 2 1....
/R43.R
permissive
boyland-pf/MorpheusData
R
false
false
1,696
r
# making table data sets library(dplyr) library(tidyr) library(MorpheusData) #############benchmark 44 dat <- read.table(text= " Day HL.Average D.Average LL.Average noHKB.Average HL.SD D.SD LL.SD noHKB.SD 1 0.00000 8760 8900 10000 8030 2337.844 924.2742 1120.785 1592.646 2 1....
#' shinyWidgets: Custom inputs widgets for Shiny. #' #' The shinyWidgets package provides several custom widgets to extend those available in package shiny #' #' @examples #' \dontrun{ #' if (interactive()) { #' shinyWidgets::shinyWidgetsGallery() #' } #' } #' #' @docType package #' @name shinyWidgets NU...
/R/shinyWidgets.R
permissive
aghozlane/shinyWidgets
R
false
false
324
r
#' shinyWidgets: Custom inputs widgets for Shiny. #' #' The shinyWidgets package provides several custom widgets to extend those available in package shiny #' #' @examples #' \dontrun{ #' if (interactive()) { #' shinyWidgets::shinyWidgetsGallery() #' } #' } #' #' @docType package #' @name shinyWidgets NU...
library(ggplot2) this_base <- "fig04-23_mountain-height-data-by-mountain" my_data <- data.frame( cont = c("Asia", "S.America", "N.America", "Africa", "Antarctica", "Europe", "Austrailia"), height = c(29029, 22838, 20322, 19341, 16050, 16024, 7310), mountain = c("Everest", "Aconcagua", "McKinley", "Ki...
/B_analysts_sources_github/jennybc/r-graph-catalog/fig04-23_mountain-height-data-by-mountain.R
no_license
Irbis3/crantasticScrapper
R
false
false
1,058
r
library(ggplot2) this_base <- "fig04-23_mountain-height-data-by-mountain" my_data <- data.frame( cont = c("Asia", "S.America", "N.America", "Africa", "Antarctica", "Europe", "Austrailia"), height = c(29029, 22838, 20322, 19341, 16050, 16024, 7310), mountain = c("Everest", "Aconcagua", "McKinley", "Ki...
library(testthat) library(bunchr) test_check("bunchr")
/tests/testthat.R
no_license
trilnick/bunchr
R
false
false
56
r
library(testthat) library(bunchr) test_check("bunchr")
library(shiny) library(shinyjs) share <- list( title = "ggMarginal (from ggExtra package)", url = "http://daattali.com/shiny/ggExtra-ggMarginal-demo/", image = "http://daattali.com/shiny/img/ggmarginal.png", description = "Add marginal plots to ggplot2.", twitter_user = "daattali" ) shinyUI(fluidPage( tit...
/inst/examples/ggMarginal/ui.R
permissive
honestypugh/ggExtra
R
false
false
3,691
r
library(shiny) library(shinyjs) share <- list( title = "ggMarginal (from ggExtra package)", url = "http://daattali.com/shiny/ggExtra-ggMarginal-demo/", image = "http://daattali.com/shiny/img/ggmarginal.png", description = "Add marginal plots to ggplot2.", twitter_user = "daattali" ) shinyUI(fluidPage( tit...
OF<- function(h, soilpar,slope){ qq=(soilpar$cn/soilpar$Mn)*h^(5/3)*slope^(1/2) return(qq) }
/Runoff.R
no_license
WillemVervoort/GWSaltVegComp
R
false
false
104
r
OF<- function(h, soilpar,slope){ qq=(soilpar$cn/soilpar$Mn)*h^(5/3)*slope^(1/2) return(qq) }
if (!is.loaded("BayesLogit.so")) { dyn.load("BayesLogit.so") } else { dyn.unload("BayesLogit.so"); dyn.load("BayesLogit.so"); } source("../R/LogitWrapper.R", local=TRUE); out.D = rpg.devroye(100, 1.0, 0.0); source("../R/PG.R"); source("../R/logit-MCMC.R"); source("../R/logit-EM.R"); source("../R/MultLogitPG.R"); # ...
/Code/C/LogitTest.R
no_license
lawmurray/BayesLogit
R
false
false
4,668
r
if (!is.loaded("BayesLogit.so")) { dyn.load("BayesLogit.so") } else { dyn.unload("BayesLogit.so"); dyn.load("BayesLogit.so"); } source("../R/LogitWrapper.R", local=TRUE); out.D = rpg.devroye(100, 1.0, 0.0); source("../R/PG.R"); source("../R/logit-MCMC.R"); source("../R/logit-EM.R"); source("../R/MultLogitPG.R"); # ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data-documentation.R \docType{data} \name{osd} \alias{osd} \title{Example Output from soilDB::fetchOSD()} \format{ A \code{SoilProfileCollection} } \usage{ data(osd) } \description{ An example \code{SoilProfileCollection} object ...
/man/osd.Rd
no_license
cran/aqp
R
false
true
457
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data-documentation.R \docType{data} \name{osd} \alias{osd} \title{Example Output from soilDB::fetchOSD()} \format{ A \code{SoilProfileCollection} } \usage{ data(osd) } \description{ An example \code{SoilProfileCollection} object ...
library(zipfR) ### Name: vec2xxx ### Title: Type-Token Statistics for Samples and Empirical Data (zipfR) ### Aliases: vec2tfl vec2spc vec2vgc ### Keywords: manip ### ** Examples ## type-token statistics for random samples from a LNRE distribution model <- lnre("fzm", alpha=.5, A=1e-6, B=.05) x <- rlnre(model, 100...
/data/genthat_extracted_code/zipfR/examples/vec2xxx.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,106
r
library(zipfR) ### Name: vec2xxx ### Title: Type-Token Statistics for Samples and Empirical Data (zipfR) ### Aliases: vec2tfl vec2spc vec2vgc ### Keywords: manip ### ** Examples ## type-token statistics for random samples from a LNRE distribution model <- lnre("fzm", alpha=.5, A=1e-6, B=.05) x <- rlnre(model, 100...
/function_dynamic_correlation.r
no_license
pietrsimon/EFRP_R_Nagy_Simon
R
false
false
1,291
r
#' SEC Company Search #' #' Provides access to the SEC Company Name Search from #' \href{https://www.sec.gov/edgar/searchedgar/companysearch.html}{here} #' using a company's formal name rather than its common name. #' #' \emph{Note On 'Fast Search'} -- #' The SEC #' \href{https://www.sec.gov/edgar/searchedgar/companyse...
/R/company_search.R
permissive
Feihelan/edgarWebR
R
false
false
5,270
r
#' SEC Company Search #' #' Provides access to the SEC Company Name Search from #' \href{https://www.sec.gov/edgar/searchedgar/companysearch.html}{here} #' using a company's formal name rather than its common name. #' #' \emph{Note On 'Fast Search'} -- #' The SEC #' \href{https://www.sec.gov/edgar/searchedgar/companyse...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/trace_calls.R \name{new_counter} \alias{new_counter} \title{initialize a new counter} \usage{ new_counter(key) } \arguments{ \item{key}{generated with \code{\link{key}}} } \description{ initialize a new counter }
/man/new_counter.Rd
no_license
kirillseva/covr
R
false
false
300
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/trace_calls.R \name{new_counter} \alias{new_counter} \title{initialize a new counter} \usage{ new_counter(key) } \arguments{ \item{key}{generated with \code{\link{key}}} } \description{ initialize a new counter }
pollutantmean <- function(directory, pollutant, id = 1:332) { ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files ## 'pollutant' is a character vector of length 1 indicating ## the name of the pollutant for which we will calculate the ## mean; either "sulfate" or "n...
/pollutantmean.R
no_license
brianmy/ProgrammingAssignment1
R
false
false
1,125
r
pollutantmean <- function(directory, pollutant, id = 1:332) { ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files ## 'pollutant' is a character vector of length 1 indicating ## the name of the pollutant for which we will calculate the ## mean; either "sulfate" or "n...
plotAnnoTrack <- function(gr, annoTrack) { ## check may need to be modified if(!all(sapply(annoTrack, function(xx) is(xx, "GRanges")))) stop("all elements in 'annoTrack' needs to be 'GRanges'") plot(start(gr), 1, type = "n", xaxt = "n", yaxt = "n", bty = "n", ylim = c(0.5, length(annoTrack)...
/R/plotting.R
no_license
hjanime/bsseq
R
false
false
12,477
r
plotAnnoTrack <- function(gr, annoTrack) { ## check may need to be modified if(!all(sapply(annoTrack, function(xx) is(xx, "GRanges")))) stop("all elements in 'annoTrack' needs to be 'GRanges'") plot(start(gr), 1, type = "n", xaxt = "n", yaxt = "n", bty = "n", ylim = c(0.5, length(annoTrack)...
#required packages install.packages('e1071') library(e1071) install.packages('ElemStatLearn') library(ElemStatLearn) install.packages("mice") library(mice) #read data train <- read.csv("data/cs-training.csv", header = T, sep = ",", dec = ".") #exclude ids train <- train[-c(1)] test <- read.csv("data/cs-test.csv", head...
/svm_kaggle_backup.R
permissive
inderaum/kaggle_svm
R
false
false
1,561
r
#required packages install.packages('e1071') library(e1071) install.packages('ElemStatLearn') library(ElemStatLearn) install.packages("mice") library(mice) #read data train <- read.csv("data/cs-training.csv", header = T, sep = ",", dec = ".") #exclude ids train <- train[-c(1)] test <- read.csv("data/cs-test.csv", head...
#!/usr/bin/env Rscript library(ggplot2) csv_file="results/stat_viral_protein/domain_peptides_stat_Viruses.csv" output_dir = "results/figures/" name= 'barplot_peptide_includs_domains.png' data_o = read.csv(file = csv_file, sep = '\t', header = T, stringsAsFactors = TRUE) data = data_o[data_o$polyprotein_outline == 'Tr...
/scripts/R_scripts/domain_peptide_plots.R
no_license
rnaimehaom/viral_polyprotein_annotation
R
false
false
2,543
r
#!/usr/bin/env Rscript library(ggplot2) csv_file="results/stat_viral_protein/domain_peptides_stat_Viruses.csv" output_dir = "results/figures/" name= 'barplot_peptide_includs_domains.png' data_o = read.csv(file = csv_file, sep = '\t', header = T, stringsAsFactors = TRUE) data = data_o[data_o$polyprotein_outline == 'Tr...
"s.groups" <- function (dfxy, classvec, wt = rep(1, length(classvec)), xax = 1, yax = 2, cstar = 1, cellipse = 1.5, axesell = TRUE, label = levels(classvec), slabel = row.names(dfxy), clabel = 1, cpoint = 1, pch = 20, col = rep(1, length(levels(classvec))), xlim = NULL, ylim = NULL, grid = TRUE, addaxes...
/R/s.groups.R
no_license
SamGG/made4
R
false
false
2,588
r
"s.groups" <- function (dfxy, classvec, wt = rep(1, length(classvec)), xax = 1, yax = 2, cstar = 1, cellipse = 1.5, axesell = TRUE, label = levels(classvec), slabel = row.names(dfxy), clabel = 1, cpoint = 1, pch = 20, col = rep(1, length(levels(classvec))), xlim = NULL, ylim = NULL, grid = TRUE, addaxes...
# this file runs rm(list=ls(all=TRUE)); source("synth_applyAllEstimators.R"); source("plotAllFigures.R"); qqq = new.env(); setwd(".."); PATH_PROJ=getwd(); environment( synth_applyAllEstimators ) = qqq; environment( plotAllFigures ) = qqq; # setting up the parameters # define parameters of the run sampleSize=seq(3...
/synthetic/compute_dist075_p5.R
no_license
danik0411/optimum-rlda
R
false
false
1,269
r
# this file runs rm(list=ls(all=TRUE)); source("synth_applyAllEstimators.R"); source("plotAllFigures.R"); qqq = new.env(); setwd(".."); PATH_PROJ=getwd(); environment( synth_applyAllEstimators ) = qqq; environment( plotAllFigures ) = qqq; # setting up the parameters # define parameters of the run sampleSize=seq(3...
library(msgpack) ### Name: msgConnection ### Title: Read and write msgpack formatted messages over R connections. ### Aliases: msgConnection close.msgConnection partial ### partial.msgConnection readMsgs status status.msgConnection ### seek.msgConnection readMsg writeMsg writeMsgs ### ** Examples out <- rawConn...
/data/genthat_extracted_code/msgpack/examples/msgConnection.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
530
r
library(msgpack) ### Name: msgConnection ### Title: Read and write msgpack formatted messages over R connections. ### Aliases: msgConnection close.msgConnection partial ### partial.msgConnection readMsgs status status.msgConnection ### seek.msgConnection readMsg writeMsg writeMsgs ### ** Examples out <- rawConn...
#' Plot timeseries of estimates from multiple sraplus models #' #' @param ... any number of sraplus models #' @param fontsize font size for plots #' @param years the years that the model fit applies to #' @param plotvars variables to plot #' #' @return a ggplot object #' @export #' plot_sraplus <- function(..., fontsiz...
/R/plot-sraplus.R
permissive
laurieKell/sraplus
R
false
false
1,870
r
#' Plot timeseries of estimates from multiple sraplus models #' #' @param ... any number of sraplus models #' @param fontsize font size for plots #' @param years the years that the model fit applies to #' @param plotvars variables to plot #' #' @return a ggplot object #' @export #' plot_sraplus <- function(..., fontsiz...
# scRNA-seq analysis for 4 SOSRSs at 1-month old with HTO on 1.2.2021 by Qianyi # cluster for demultiplexed 4 SOSRSs at 1-month old load(file="HTO20kcell_6kcell_hashtag.Robj") # Cluster and visualize cells using the usual scRNA-seq workflow, and examine for the potential presence of batch effects. # Extract the sing...
/R/1moSOSRS4_3.Cluster.R
no_license
qianqianshao/SOSRS
R
false
false
33,669
r
# scRNA-seq analysis for 4 SOSRSs at 1-month old with HTO on 1.2.2021 by Qianyi # cluster for demultiplexed 4 SOSRSs at 1-month old load(file="HTO20kcell_6kcell_hashtag.Robj") # Cluster and visualize cells using the usual scRNA-seq workflow, and examine for the potential presence of batch effects. # Extract the sing...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Sql.R \name{lowLevelQuerySql} \alias{lowLevelQuerySql} \title{Low level function for retrieving data to a data frame} \usage{ lowLevelQuerySql(connection, query = "", datesAsString = FALSE) } \arguments{ \item{connection}{The connection to th...
/man/lowLevelQuerySql.Rd
permissive
CristianPachacama/DatabaseConnector
R
false
true
863
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Sql.R \name{lowLevelQuerySql} \alias{lowLevelQuerySql} \title{Low level function for retrieving data to a data frame} \usage{ lowLevelQuerySql(connection, query = "", datesAsString = FALSE) } \arguments{ \item{connection}{The connection to th...
##################################################################### # Business Intelligence with R # Dwight Barry # Chapter 5 Code: Effect Sizes # # https://github.com/Rmadillo/business_intelligence_with_r/blob/master/manuscript/code/BIWR_Chapter_5_Code.R # ############################################################...
/manuscript/code/BIWR_Chapter_5_Code.R
no_license
RedCobbler/business_intelligence_with_r
R
false
false
10,091
r
##################################################################### # Business Intelligence with R # Dwight Barry # Chapter 5 Code: Effect Sizes # # https://github.com/Rmadillo/business_intelligence_with_r/blob/master/manuscript/code/BIWR_Chapter_5_Code.R # ############################################################...
# just visualize about model accuracy results library(dplyr) library(extrafont) # font_import() loadfonts(device = "pdf") library (ggplot2) library(scales) library(reshape2) setwd("/Users/Sanjay/dev/EAGER/data/orgs/about/") # load data in.res <- read.csv("about_model_training_results_toR2.csv", header = TRUE, string...
/code/analysis/Webpage classification viz_v2.R
no_license
euphonic/EAGER
R
false
false
2,730
r
# just visualize about model accuracy results library(dplyr) library(extrafont) # font_import() loadfonts(device = "pdf") library (ggplot2) library(scales) library(reshape2) setwd("/Users/Sanjay/dev/EAGER/data/orgs/about/") # load data in.res <- read.csv("about_model_training_results_toR2.csv", header = TRUE, string...
##FIX: rewrite so that you can call one legislator and get the maps ##FIX: is it writing out the code for the google maps? ## produces the kml file for google maps for each candidate ## to start we get those with bioids library(ggplot2) rf <- function(x=NULL) { if (.Platform$OS.type!="unix") { run.from <- "C:/r...
/R/getkml.R
no_license
rafaeldjacome/CongressoAberto
R
false
false
11,009
r
##FIX: rewrite so that you can call one legislator and get the maps ##FIX: is it writing out the code for the google maps? ## produces the kml file for google maps for each candidate ## to start we get those with bioids library(ggplot2) rf <- function(x=NULL) { if (.Platform$OS.type!="unix") { run.from <- "C:/r...
#--------------------------------------- # Log file | #---------------------------------------/ writeLines(c(""), "log.txt") wlog("Starting simulations") wlog("Cluster intialized successfully!") #---------------------------------------| #--------------------------------------- # Global l...
/real_data/spam/body.R
no_license
jlaria/s2net-paper
R
false
false
1,878
r
#--------------------------------------- # Log file | #---------------------------------------/ writeLines(c(""), "log.txt") wlog("Starting simulations") wlog("Cluster intialized successfully!") #---------------------------------------| #--------------------------------------- # Global l...
testlist <- list(lambda = numeric(0), logq = c(-3.68380079148118e+279, -3.68713756756042e+279, -3.68380079148118e+279, -3.68380079148118e+279, 5.30449018428107e-312, 0), nu = numeric(0), p = numeric(0), tol = 0) result <- do.call(COMPoissonReg:::qzicmp_cpp,testlist) str(result)
/COMPoissonReg/inst/testfiles/qzicmp_cpp/libFuzzer_qzicmp_cpp/qzicmp_cpp_valgrind_files/1612729094-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
280
r
testlist <- list(lambda = numeric(0), logq = c(-3.68380079148118e+279, -3.68713756756042e+279, -3.68380079148118e+279, -3.68380079148118e+279, 5.30449018428107e-312, 0), nu = numeric(0), p = numeric(0), tol = 0) result <- do.call(COMPoissonReg:::qzicmp_cpp,testlist) str(result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/L1_deconvolution.R \name{L1_deconvolution} \alias{L1_deconvolution} \title{L1 deconconvolution function} \usage{ L1_deconvolution(y, d) } \arguments{ \item{y}{: a vector containing the raw observations.} \item{d}{: number of bins} } \value{...
/man/L1_deconvolution.Rd
no_license
omadrid1/RRDecon
R
false
true
590
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/L1_deconvolution.R \name{L1_deconvolution} \alias{L1_deconvolution} \title{L1 deconconvolution function} \usage{ L1_deconvolution(y, d) } \arguments{ \item{y}{: a vector containing the raw observations.} \item{d}{: number of bins} } \value{...