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
# Chi Square test Goodness of fit fruit <- c(32, 28, 16, 14, 10) chisq.test(fruit) -> res res res$p.value res$statistic res$parameter res$method res$data.name O <- res$observed E <- res$expected res$residuals res$stdres # manually chi.stat <- sum((O-E)^2/E) pchisq(chi.stat, df=4, lower.tail=F) # Retired executives ex...
/Topics/ChiGoodnessOfFitTest.R
no_license
statisticallyfit/RStatistics
R
false
false
516
r
# Chi Square test Goodness of fit fruit <- c(32, 28, 16, 14, 10) chisq.test(fruit) -> res res res$p.value res$statistic res$parameter res$method res$data.name O <- res$observed E <- res$expected res$residuals res$stdres # manually chi.stat <- sum((O-E)^2/E) pchisq(chi.stat, df=4, lower.tail=F) # Retired executives ex...
%% File Name: systime.Rd %% File Version: 0.14 \name{systime} \alias{systime} %- Also NEED an '\alias' for EACH other topic documented here. \title{ \R Utilities: Various Strings Representing System Time } \description{ This function generates system time strings in several formats. } \usage{ systime() } %- maybe also...
/man/systime.Rd
no_license
stefvanbuuren/miceadds
R
false
false
1,383
rd
%% File Name: systime.Rd %% File Version: 0.14 \name{systime} \alias{systime} %- Also NEED an '\alias' for EACH other topic documented here. \title{ \R Utilities: Various Strings Representing System Time } \description{ This function generates system time strings in several formats. } \usage{ systime() } %- maybe also...
libs <- c("dplyr", "tidyr", "ggplot2", "ggpubr", "ncdf4", "raster", "rgdal", "lubridate", "rgeos", "smoothr", "sf", "reshape", "tidyverse") install.libraries <- function(lib=NULL){ new <- lib[!(lib %in% installed.packages()[, "Package"])] if (length(n...
/Trigger_Rain_event_April.R
no_license
JackieOuzman/Seasonal_break
R
false
false
10,337
r
libs <- c("dplyr", "tidyr", "ggplot2", "ggpubr", "ncdf4", "raster", "rgdal", "lubridate", "rgeos", "smoothr", "sf", "reshape", "tidyverse") install.libraries <- function(lib=NULL){ new <- lib[!(lib %in% installed.packages()[, "Package"])] if (length(n...
# https://machinelearningmastery.com/machine-learning-in-r-step-by-step/ install.packages("caret") install.packages("caret", dependencies=c("Depends", "Suggests")) library(caret) # attach the iris dataset to the environment data(iris) # rename the dataset dataset <- iris head(dataset) # create a list of 80% ...
/multiple_model_evaluation in-class exercise.R
no_license
KehanWang/DataAnalyticsSpring2020
R
false
false
2,917
r
# https://machinelearningmastery.com/machine-learning-in-r-step-by-step/ install.packages("caret") install.packages("caret", dependencies=c("Depends", "Suggests")) library(caret) # attach the iris dataset to the environment data(iris) # rename the dataset dataset <- iris head(dataset) # create a list of 80% ...
shinyServer(function(input, output, session) { source("code/fineParticles.R", local=TRUE) source("code/ozone.R", local=TRUE) }) # end
/server.R
no_license
pssguy/bcGov
R
false
false
158
r
shinyServer(function(input, output, session) { source("code/fineParticles.R", local=TRUE) source("code/ozone.R", local=TRUE) }) # end
library(matlib) ### Name: pointOnLine ### Title: Position of a point along a line ### Aliases: pointOnLine ### ** Examples x1 <- c(0, 0) x2 <- c(1, 4) pointOnLine(x1, x2, 0.5) pointOnLine(x1, x2, 0.5, absolute=FALSE) pointOnLine(x1, x2, 1.1) y1 <- c(1, 2, 3) y2 <- c(3, 2, 1) pointOnLine(y1, y2, 0.5) pointOnLine(y1...
/data/genthat_extracted_code/matlib/examples/pointOnLine.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
350
r
library(matlib) ### Name: pointOnLine ### Title: Position of a point along a line ### Aliases: pointOnLine ### ** Examples x1 <- c(0, 0) x2 <- c(1, 4) pointOnLine(x1, x2, 0.5) pointOnLine(x1, x2, 0.5, absolute=FALSE) pointOnLine(x1, x2, 1.1) y1 <- c(1, 2, 3) y2 <- c(3, 2, 1) pointOnLine(y1, y2, 0.5) pointOnLine(y1...
cacheSolve <- function(x, ...) { m <- x$getsolve() if(!is.null(m)) { message("getting cached data") return(m) } data <- x$get() m <- solve(data, ...) x$setsolve(m) m }
/cacheSolve.R
no_license
lemabe/Data-science2016
R
false
false
211
r
cacheSolve <- function(x, ...) { m <- x$getsolve() if(!is.null(m)) { message("getting cached data") return(m) } data <- x$get() m <- solve(data, ...) x$setsolve(m) m }
本人在SpringMvc配置thymeleaf时,遇到html中输入th: 没有自动提示的现象,苦寻无果,后查找官网信息,要加载插件才行。 打开eclipse的插件安装,Help—>Installations new SoftWare—>add 插件地址为: http://www.thymeleaf.org/eclipse-plugin-update-site/ 一路next,最后重启Eclipse即可。 插件官方文档说明https://github.com/thymeleaf/thymeleaf-extras-eclipse-plugin<!-- Baidu Button BEGIN --> ...
/sts/demo/readme.rd
permissive
cheliangmin/myProject
R
false
false
997
rd
本人在SpringMvc配置thymeleaf时,遇到html中输入th: 没有自动提示的现象,苦寻无果,后查找官网信息,要加载插件才行。 打开eclipse的插件安装,Help—>Installations new SoftWare—>add 插件地址为: http://www.thymeleaf.org/eclipse-plugin-update-site/ 一路next,最后重启Eclipse即可。 插件官方文档说明https://github.com/thymeleaf/thymeleaf-extras-eclipse-plugin<!-- Baidu Button BEGIN --> ...
#' Enable bookmarking mode, using values from the URL, if present. #' #' @import shiny #' @export start_app <- function() { enableBookmarking("url") shinyApp(ui = ui, server = server) } .onAttach <- function(libname, pkgname) { packageStartupMessage("Run covidshiny::start_app() to launch the app") }
/R/global.R
permissive
karthik/CovidShinyModel
R
false
false
308
r
#' Enable bookmarking mode, using values from the URL, if present. #' #' @import shiny #' @export start_app <- function() { enableBookmarking("url") shinyApp(ui = ui, server = server) } .onAttach <- function(libname, pkgname) { packageStartupMessage("Run covidshiny::start_app() to launch the app") }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fusiontables_objects.R \name{Column} \alias{Column} \title{Column Object} \usage{ Column(Column.baseColumn = NULL, baseColumn = NULL, columnId = NULL, columnJsonSchema = NULL, columnPropertiesJson = NULL, description = NULL, formatPattern...
/googlefusiontablesv2.auto/man/Column.Rd
permissive
Phippsy/autoGoogleAPI
R
false
true
1,501
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fusiontables_objects.R \name{Column} \alias{Column} \title{Column Object} \usage{ Column(Column.baseColumn = NULL, baseColumn = NULL, columnId = NULL, columnJsonSchema = NULL, columnPropertiesJson = NULL, description = NULL, formatPattern...
#' International Trade Network Data #' #' Contains international trade data; value of exports from one country to another in a given year. #' #' @format A data frame with 114980 rows and 5 variables: #' \describe{ #' \item{ .row }{ integer: row number } #' \item{ country1 }{ character: country name of exporter } #' ...
/R/trade.R
no_license
Musaab-Farooqui/qss-package
R
false
false
946
r
#' International Trade Network Data #' #' Contains international trade data; value of exports from one country to another in a given year. #' #' @format A data frame with 114980 rows and 5 variables: #' \describe{ #' \item{ .row }{ integer: row number } #' \item{ country1 }{ character: country name of exporter } #' ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/app_utilities.R \name{prepPredictors} \alias{prepPredictors} \title{Prepare predictors based on inputs} \usage{ prepPredictors(preds = NULL) } \arguments{ \item{preds}{predictors, as input to the app} } \value{ prepared predictors...
/man/prepPredictors.Rd
permissive
ddalthorp/GenEst
R
false
true
439
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/app_utilities.R \name{prepPredictors} \alias{prepPredictors} \title{Prepare predictors based on inputs} \usage{ prepPredictors(preds = NULL) } \arguments{ \item{preds}{predictors, as input to the app} } \value{ prepared predictors...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PersonTests.R \name{createPersonTests} \alias{createPersonTests} \title{Run the person tests} \usage{ createPersonTests() } \description{ Run the person tests }
/man/CERNER/TEST CASES/CernerTesting/man/createPersonTests.Rd
permissive
OHDSI/ETL-CDMBuilder
R
false
true
239
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PersonTests.R \name{createPersonTests} \alias{createPersonTests} \title{Run the person tests} \usage{ createPersonTests() } \description{ Run the person tests }
tbl_features <- function(features){ function(...){ list(as_tibble(squash(map(features, function(.fn, ...) as.list(.fn(...)), ...)))) } } #' Extract features from a dataset #' #' @param .tbl A dataset #' @param .var,.vars The variable(s) to compute features on #' @param features A list of functions (or lambda e...
/R/features.R
no_license
Sprinterzzj/feasts
R
false
false
19,720
r
tbl_features <- function(features){ function(...){ list(as_tibble(squash(map(features, function(.fn, ...) as.list(.fn(...)), ...)))) } } #' Extract features from a dataset #' #' @param .tbl A dataset #' @param .var,.vars The variable(s) to compute features on #' @param features A list of functions (or lambda e...
library(proportion) ### Name: PlotpCOpBITW ### Title: Plots p-confidence and p-bias for base Wald-T method ### Aliases: PlotpCOpBITW ### ** Examples n=5; alp=0.05 PlotpCOpBITW(n,alp)
/data/genthat_extracted_code/proportion/examples/PlotpCOpBITW.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
190
r
library(proportion) ### Name: PlotpCOpBITW ### Title: Plots p-confidence and p-bias for base Wald-T method ### Aliases: PlotpCOpBITW ### ** Examples n=5; alp=0.05 PlotpCOpBITW(n,alp)
install.packages("tidyverse") #data manipulating install.packages('ggplot2') #visualisation install.packages('RColorBrewer') #Color palette install.packages('readr') #the read_csv function install.packages('ggfittext') install.packages('treemapify') install.packages("reshape2") #zmiana języka ...
/Kaggle_medaliści.R
no_license
Rafal-Pietrak/kaggle
R
false
false
8,125
r
install.packages("tidyverse") #data manipulating install.packages('ggplot2') #visualisation install.packages('RColorBrewer') #Color palette install.packages('readr') #the read_csv function install.packages('ggfittext') install.packages('treemapify') install.packages("reshape2") #zmiana języka ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/str_PM25.R \name{str_PM25} \alias{str_PM25} \title{str_PM25} \usage{ str_PM25( format = c("character", "utf8", "html", "TeX", "markdown"), verbose = getOption("verbose", default = FALSE) ) } \arguments{ \item{format}{choice of output form...
/man/str_PM25.Rd
no_license
BAAQMD/strtools
R
false
true
378
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/str_PM25.R \name{str_PM25} \alias{str_PM25} \title{str_PM25} \usage{ str_PM25( format = c("character", "utf8", "html", "TeX", "markdown"), verbose = getOption("verbose", default = FALSE) ) } \arguments{ \item{format}{choice of output form...
train.ratio = 0.9 spam <- read.csv("./data/spambase.data", header=FALSE) data <- spam[, -c(55, 56, 57)] set.seed(1) train.index <- sample(1:dim(data)[1], as.integer(train.ratio * dim(data)[1])) training <- data[train.index, ] testing <- data[-train.index, ] write.table(training, "./data/training", quote=FALSE, row....
/R/0_spam_data_prepare.R
no_license
kiendang/sparkr-naivebayes-example
R
false
false
436
r
train.ratio = 0.9 spam <- read.csv("./data/spambase.data", header=FALSE) data <- spam[, -c(55, 56, 57)] set.seed(1) train.index <- sample(1:dim(data)[1], as.integer(train.ratio * dim(data)[1])) training <- data[train.index, ] testing <- data[-train.index, ] write.table(training, "./data/training", quote=FALSE, row....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_npp_cbpm.R \name{get_npp_cbpm} \alias{get_npp_cbpm} \title{get_npp_cbpm} \usage{ get_npp_cbpm( file.path, grid.size = "low", time.span = "monthly", satellite = "MODIS", mindate, maxdate ) } \arguments{ \item{file.path}{The fol...
/man/get_npp_cbpm.Rd
no_license
chaoxv/nppr
R
false
true
1,439
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_npp_cbpm.R \name{get_npp_cbpm} \alias{get_npp_cbpm} \title{get_npp_cbpm} \usage{ get_npp_cbpm( file.path, grid.size = "low", time.span = "monthly", satellite = "MODIS", mindate, maxdate ) } \arguments{ \item{file.path}{The fol...
# 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_care/json/code/r/totPOP__health__adult_nosmok__.r
permissive
HHS-AHRQ/MEPS-summary-tables
R
false
false
1,704
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...
#' mathTport #' #' @param returns #' @param rf #' @param digits #' #' @return #' @export #' #' @examples mathTport = function(returns, rf = 0.01,digits = NULL) { mu <- apply(returns, 2, mean) C <- var(returns) one <- rep(1, nrow(C)) mu.e <- mu - rf * one # Compute excess returns z <- solve(C, ...
/R/mathTport.R
permissive
kecoli/PCRM
R
false
false
794
r
#' mathTport #' #' @param returns #' @param rf #' @param digits #' #' @return #' @export #' #' @examples mathTport = function(returns, rf = 0.01,digits = NULL) { mu <- apply(returns, 2, mean) C <- var(returns) one <- rep(1, nrow(C)) mu.e <- mu - rf * one # Compute excess returns z <- solve(C, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reporting.R \name{BridgeReport} \alias{BridgeReport} \title{Shinyapp reporting for drawing RNA decay curve.} \usage{ BridgeReport(inputFile, group = c("Control", "Knockdown"), hour = c(0, 1, 2, 4, 8, 12), comparisonFile = c("Control"...
/man/BridgeReport.Rd
no_license
cran/bridger2
R
false
true
3,248
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reporting.R \name{BridgeReport} \alias{BridgeReport} \title{Shinyapp reporting for drawing RNA decay curve.} \usage{ BridgeReport(inputFile, group = c("Control", "Knockdown"), hour = c(0, 1, 2, 4, 8, 12), comparisonFile = c("Control"...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 3.26959793156717e+296, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist) st...
/CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615784260-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
329
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 3.26959793156717e+296, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist) st...
# Exploratory Data Analysis - Course Assignment 2 - Plot2 # Dataset: # PM2.5 Emissions Data: # summarySCC_PM25: data frame with all of the PM2.5 emissions data for # 1999, 2002, 2005, and 2008. For each year, the table # contains number of tons ...
/Exploratory Data Analysis/assignment 2/plot2.R
no_license
Ads99/Coursera
R
false
false
2,465
r
# Exploratory Data Analysis - Course Assignment 2 - Plot2 # Dataset: # PM2.5 Emissions Data: # summarySCC_PM25: data frame with all of the PM2.5 emissions data for # 1999, 2002, 2005, and 2008. For each year, the table # contains number of tons ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rox_args_docs.R \name{idx_Param} \alias{idx_Param} \title{idx} \arguments{ \item{idx}{Numeric vector indicating the data indices (columns) to read. If \code{NULL} (default), read in all the data. Must be a subset of the indices present in the...
/man/idx_Param.Rd
no_license
mandymejia/ciftiTools
R
false
true
569
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rox_args_docs.R \name{idx_Param} \alias{idx_Param} \title{idx} \arguments{ \item{idx}{Numeric vector indicating the data indices (columns) to read. If \code{NULL} (default), read in all the data. Must be a subset of the indices present in the...
############################################################################### ## ## Create some test data for surround index ## Input format is neighborhood matrices: ## - In each matrix, rows correspond to a target ## - Matrices: ## * distances between target and neighbors ## * size of neighbors ## * species of n...
/surround/test/make-sample-data.R
no_license
nverno/neighborhoods
R
false
false
3,796
r
############################################################################### ## ## Create some test data for surround index ## Input format is neighborhood matrices: ## - In each matrix, rows correspond to a target ## - Matrices: ## * distances between target and neighbors ## * size of neighbors ## * species of n...
\name{lm.case} \alias{case} \alias{case.lm} %% \alias{lm.case} %% leaving this in case someone searches on the older name \alias{plot.case} \alias{panel.case} %- Also NEED an '\alias' for EACH other topic documented here. \title{ case statistics for regression analysis} \description{ Case statistics for reg...
/man/lm.case.Rd
no_license
DevGri/HH
R
false
false
6,884
rd
\name{lm.case} \alias{case} \alias{case.lm} %% \alias{lm.case} %% leaving this in case someone searches on the older name \alias{plot.case} \alias{panel.case} %- Also NEED an '\alias' for EACH other topic documented here. \title{ case statistics for regression analysis} \description{ Case statistics for reg...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/betapriors.R \name{CCH} \alias{CCH} \title{Generalized g-Prior Distribution for Coefficients in BMA Models} \usage{ CCH(alpha, beta, s = 0) } \arguments{ \item{alpha}{a scalar > 0, recommended alpha=.5 (betaprime) or 1 for CCH. The hyper.g(al...
/man/CCH.Rd
no_license
akashrajkn/BAS
R
false
true
1,347
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/betapriors.R \name{CCH} \alias{CCH} \title{Generalized g-Prior Distribution for Coefficients in BMA Models} \usage{ CCH(alpha, beta, s = 0) } \arguments{ \item{alpha}{a scalar > 0, recommended alpha=.5 (betaprime) or 1 for CCH. The hyper.g(al...
## ## Continuous scraping: Approach 2 ## # This script runs a single iteration, however, can be scheduled with tools # such as cron # Loading packages from library path library_directory <- "/home/ec2-user/r_libraries/" .libPaths(library_directory) library("DBI") library("rvest") library("lubridate") # Setting/crea...
/week11/scraping_example_to_schedule.R
no_license
lse-my472/lse-my472.github.io
R
false
false
1,809
r
## ## Continuous scraping: Approach 2 ## # This script runs a single iteration, however, can be scheduled with tools # such as cron # Loading packages from library path library_directory <- "/home/ec2-user/r_libraries/" .libPaths(library_directory) library("DBI") library("rvest") library("lubridate") # Setting/crea...
\name{disaggregate-methods} \docType{methods} \alias{disaggregate} \alias{disaggregate-methods} \alias{disaggregate,SpatialPolygons-method} \alias{disaggregate,SpatialPolygonsDataFrame-method} \alias{disaggregate,SpatialLines-method} \alias{disaggregate,SpatialLinesDataFrame-method} \title{ disaggregate SpatialLines, S...
/man/disaggregate.Rd
no_license
edzer/sp
R
false
false
1,760
rd
\name{disaggregate-methods} \docType{methods} \alias{disaggregate} \alias{disaggregate-methods} \alias{disaggregate,SpatialPolygons-method} \alias{disaggregate,SpatialPolygonsDataFrame-method} \alias{disaggregate,SpatialLines-method} \alias{disaggregate,SpatialLinesDataFrame-method} \title{ disaggregate SpatialLines, S...
library(yorkr) ### Name: getAllMatchesAllOpposition ### Title: Get data on all matches against all opposition ### Aliases: getAllMatchesAllOpposition ### ** Examples ## Not run: ##D # Get all matches for team India ##D getAllMatchesAllOpposition("India",dir="../data/",save=TRUE) ##D getAllMatchesAllOpposition("Aus...
/data/genthat_extracted_code/yorkr/examples/getAllMatchesAllOpposition.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
379
r
library(yorkr) ### Name: getAllMatchesAllOpposition ### Title: Get data on all matches against all opposition ### Aliases: getAllMatchesAllOpposition ### ** Examples ## Not run: ##D # Get all matches for team India ##D getAllMatchesAllOpposition("India",dir="../data/",save=TRUE) ##D getAllMatchesAllOpposition("Aus...
testlist <- list(iK = -28L) result <- do.call(eDMA:::PowerSet,testlist) str(result)
/eDMA/inst/testfiles/PowerSet/AFL_PowerSet/PowerSet_valgrind_files/1609870027-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
83
r
testlist <- list(iK = -28L) result <- do.call(eDMA:::PowerSet,testlist) str(result)
# Learn about API authentication here: {{BASE_URL}}/r/getting-started # Find your api_key here: {{BASE_URL}}/settings/api library(plotly) size <- 100 x <- seq(-2*pi, 2*pi, length=size) y <- seq(-2*pi, 2*pi, length=size) z <- matrix(0, size, size) for(i in 1:size) { for(j in 1:size) { r2 <- x[i]^2 + y[j]^2...
/auto-docs/executables/r/simple_contour.r
no_license
VukDukic/documentation
R
false
false
632
r
# Learn about API authentication here: {{BASE_URL}}/r/getting-started # Find your api_key here: {{BASE_URL}}/settings/api library(plotly) size <- 100 x <- seq(-2*pi, 2*pi, length=size) y <- seq(-2*pi, 2*pi, length=size) z <- matrix(0, size, size) for(i in 1:size) { for(j in 1:size) { r2 <- x[i]^2 + y[j]^2...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nmf_utils.R \name{nmf_estim_plot} \alias{nmf_estim_plot} \title{Generate individual plot for estimating K} \usage{ nmf_estim_plot(estim.r) } \arguments{ \item{res}{NMF run result} } \description{ This function allows you to express your love ...
/man/nmf_estim_plot.Rd
no_license
ishspsy/sake
R
false
true
390
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nmf_utils.R \name{nmf_estim_plot} \alias{nmf_estim_plot} \title{Generate individual plot for estimating K} \usage{ nmf_estim_plot(estim.r) } \arguments{ \item{res}{NMF run result} } \description{ This function allows you to express your love ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/paired_sine_model.R \name{squared_epsilon} \alias{squared_epsilon} \title{Paired-sine model squared error term} \usage{ squared_epsilon(psi, x1, x2) } \arguments{ \item{psi}{Phase shift between the gene expression of the two genes.} \item{x1...
/man/squared_epsilon.Rd
permissive
ramiromagno/oscillation
R
false
true
820
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/paired_sine_model.R \name{squared_epsilon} \alias{squared_epsilon} \title{Paired-sine model squared error term} \usage{ squared_epsilon(psi, x1, x2) } \arguments{ \item{psi}{Phase shift between the gene expression of the two genes.} \item{x1...
# DATS 6450 Bayesian Final Project Team 2 # Team Member: Hao Ning, Xi Zhang # Approach 1 by Hao Ning ############################################################################################################ # load packages library('dplyr') library('stringr') library('ggplot2') library('rjags') library('coda...
/Final Project Team 2 - Approach 1.R
no_license
hning87/Predicting-Football-Match-Results-of-Spanish-League-using-Bayesian-Hierarchical-Model
R
false
false
11,889
r
# DATS 6450 Bayesian Final Project Team 2 # Team Member: Hao Ning, Xi Zhang # Approach 1 by Hao Ning ############################################################################################################ # load packages library('dplyr') library('stringr') library('ggplot2') library('rjags') library('coda...
library(compositions) ### Name: print.acomp ### Title: Printing compositional data. ### Aliases: print.acomp print.rcomp print.rplus print.aplus ### Keywords: classes ### ** Examples data(SimulatedAmounts) mydata <- simulateMissings(sa.groups5,dl=0.01,knownlimit=TRUE, MAR=0.05,MNARprob=0.05,SZp...
/data/genthat_extracted_code/compositions/examples/print.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
470
r
library(compositions) ### Name: print.acomp ### Title: Printing compositional data. ### Aliases: print.acomp print.rcomp print.rplus print.aplus ### Keywords: classes ### ** Examples data(SimulatedAmounts) mydata <- simulateMissings(sa.groups5,dl=0.01,knownlimit=TRUE, MAR=0.05,MNARprob=0.05,SZp...
################################################### ### Dodatkowe materiały ################################################### # https://shiny.rstudio.com/tutorial/ (jest tutorial video) # https://shiny.rstudio.com/articles/reactivity-overview.html # install.packages('shiny') library(shiny) # Wyrażenia rekatywne t...
/05_shiny_05_reaktywnosc.R
no_license
MalgorzataS/podyplomowe_R
R
false
false
4,393
r
################################################### ### Dodatkowe materiały ################################################### # https://shiny.rstudio.com/tutorial/ (jest tutorial video) # https://shiny.rstudio.com/articles/reactivity-overview.html # install.packages('shiny') library(shiny) # Wyrażenia rekatywne t...
household_data <- read.table("household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?",stringsAsFactors=FALSE) household_data$DateTime <- paste(household_data$Date, household_data$Time) household_data$DateTime <- strptime(household_data$DateTime, "%d/%m/%Y %H:%M:%S") filtered_data <- household_data[hou...
/plot1.R
no_license
johnffarmer/ExData_Plotting1
R
false
false
525
r
household_data <- read.table("household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?",stringsAsFactors=FALSE) household_data$DateTime <- paste(household_data$Date, household_data$Time) household_data$DateTime <- strptime(household_data$DateTime, "%d/%m/%Y %H:%M:%S") filtered_data <- household_data[hou...
library(ggplot2) library(plotly) library(Rtsne) import::from(ape, "pcoa") import::from(dplyr, "bind_cols") import::from(htmlwidgets, "saveWidget") import::from(purrr, "map", "map_dfc", "pmap", "reduce") import::from(magrittr, "%>%") import::from(readr, "read_csv") import::from(stringr, "str_c") import::from(t...
/src/R/testing/test.R
permissive
DiDeoxy/wheat-pgda
R
false
false
2,686
r
library(ggplot2) library(plotly) library(Rtsne) import::from(ape, "pcoa") import::from(dplyr, "bind_cols") import::from(htmlwidgets, "saveWidget") import::from(purrr, "map", "map_dfc", "pmap", "reduce") import::from(magrittr, "%>%") import::from(readr, "read_csv") import::from(stringr, "str_c") import::from(t...
library(tidyverse) library(readr) library(readxl) irs <- read_csv('data/vector_control_ministry/IRS_mozambique_clean_final.csv') # Fix Matola irs$district[irs$district == 'M.Matola'] <- 'Matola' irs$province[irs$district == 'Matola'] <- 'Maputo' # Keep only gaza and maputo irs <- irs %>% filter(province %in% c('Ga...
/get_irs_itn_data.R
no_license
joebrew/maltem_cost_effectiveness
R
false
false
1,819
r
library(tidyverse) library(readr) library(readxl) irs <- read_csv('data/vector_control_ministry/IRS_mozambique_clean_final.csv') # Fix Matola irs$district[irs$district == 'M.Matola'] <- 'Matola' irs$province[irs$district == 'Matola'] <- 'Maputo' # Keep only gaza and maputo irs <- irs %>% filter(province %in% c('Ga...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/bfa-package.R \docType{package} \name{bfa-package} \alias{bfa-package} \title{Bayesian Factor Analysis} \description{ Bayesian Factor Analysis } \details{ \tabular{ll}{ Package: \tab bfa\cr Type: \tab Package\cr Version: \tab 0.4\cr D...
/man/bfa-package.Rd
no_license
david-dunson/gaussian-copula-factor-model
R
false
false
653
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/bfa-package.R \docType{package} \name{bfa-package} \alias{bfa-package} \title{Bayesian Factor Analysis} \description{ Bayesian Factor Analysis } \details{ \tabular{ll}{ Package: \tab bfa\cr Type: \tab Package\cr Version: \tab 0.4\cr D...
################################################################################################ # # MODELAGEM PREDITIVA - MBA Business Analytics e Big Data # Por: RICARDO REIS # # CASE - FRAMINGHAM HEART STUDY # # male: 0 = Female; 1 = Male # age: Age at exam time. # education: 1 = Some High School; 2 = High School or...
/model-logistic-regression.r
no_license
ricardobreis/Classification-Algorithms-Comparison-Framingham-Heart-Study
R
false
false
8,070
r
################################################################################################ # # MODELAGEM PREDITIVA - MBA Business Analytics e Big Data # Por: RICARDO REIS # # CASE - FRAMINGHAM HEART STUDY # # male: 0 = Female; 1 = Male # age: Age at exam time. # education: 1 = Some High School; 2 = High School or...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classes.R \docType{class} \name{eco.mctree-class} \alias{eco.mctree-class} \title{eco.mctree-class} \description{ eco.mctree-class } \section{Slots}{ \describe{ \item{\code{TREES}}{trees obtained} \item{\code{PREDICTIONS}}{predictions of th...
/man/eco.mctree-class.Rd
no_license
jcassiojr/EcoGenetics
R
false
true
553
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classes.R \docType{class} \name{eco.mctree-class} \alias{eco.mctree-class} \title{eco.mctree-class} \description{ eco.mctree-class } \section{Slots}{ \describe{ \item{\code{TREES}}{trees obtained} \item{\code{PREDICTIONS}}{predictions of th...
# advanced packageloading utility for the bioconductor ecosystem # as provided @ https://www.huber.embl.de/msmb/install_packages.R options(install.packages.check.source = "no") options(install.packages.compile.from.source = "never") Sys.setenv(R_REMOTES_UPGRADE = "never") ## Function to install packages one at a time...
/packageloader_bioc.R
no_license
benearnthof/geostatsBA
R
false
false
4,184
r
# advanced packageloading utility for the bioconductor ecosystem # as provided @ https://www.huber.embl.de/msmb/install_packages.R options(install.packages.check.source = "no") options(install.packages.compile.from.source = "never") Sys.setenv(R_REMOTES_UPGRADE = "never") ## Function to install packages one at a time...
### plot for diamond dataset ####
/poster plot /poster plot.R
no_license
wangy63/Leverage-Subsampling
R
false
false
34
r
### plot for diamond dataset ####
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 lm_iv_rcpp <- function(X, Y, Z) { .Call(tidymodelR_lm_iv_rcpp, X, Y, Z) } lm_rcpp <- function(X, y) { .Call(tidymodelR_lm_rcpp, X, y) }
/R/RcppExports.R
no_license
elben10/tidymodelR
R
false
false
273
r
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 lm_iv_rcpp <- function(X, Y, Z) { .Call(tidymodelR_lm_iv_rcpp, X, Y, Z) } lm_rcpp <- function(X, y) { .Call(tidymodelR_lm_rcpp, X, y) }
calculateBMI <- function(weight,height) weight/(height ^ 2) shinyServer( function(input, output) { output$inputValue1 <- renderPrint({input$weight}) output$inputValue2 <- renderPrint({input$height}) output$odate <- renderPrint({input$date}) output$prediction <- renderPrint({calculateBMI(input...
/shiny Application/server.R
no_license
nikhil-chandra/datasciencecoursera
R
false
false
351
r
calculateBMI <- function(weight,height) weight/(height ^ 2) shinyServer( function(input, output) { output$inputValue1 <- renderPrint({input$weight}) output$inputValue2 <- renderPrint({input$height}) output$odate <- renderPrint({input$date}) output$prediction <- renderPrint({calculateBMI(input...
fileUrl<-"https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(fileUrl,destfile="data.zip") ##Download the data file unzip("data.zip") ##unzip the data file setwd("UCI HAR Dataset")##set working directory to file #load the various data files ##extract second column of ...
/run_analysis.R
no_license
ccunha85/Getting_and_Cleaning_Data_Final_Project
R
false
false
2,617
r
fileUrl<-"https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(fileUrl,destfile="data.zip") ##Download the data file unzip("data.zip") ##unzip the data file setwd("UCI HAR Dataset")##set working directory to file #load the various data files ##extract second column of ...
niche.overlap.boot.pair <- function (vectorA, vectorB, method = c("levins","schoener","petraitis","pianka","czech","morisita"), times = 999, quant = c(0.025, 0.975)) { method <- match.arg(method) if(!length(vectorA)==length(vectorB)){ stop("Length of vectorA differs from lengths of vec...
/R/niche.overlap.boot.pair.R
no_license
SiyuHuang91/spaa
R
false
false
862
r
niche.overlap.boot.pair <- function (vectorA, vectorB, method = c("levins","schoener","petraitis","pianka","czech","morisita"), times = 999, quant = c(0.025, 0.975)) { method <- match.arg(method) if(!length(vectorA)==length(vectorB)){ stop("Length of vectorA differs from lengths of vec...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ## Pair of functions that cache the inverse of a matrix ## Usage: Pass the result of a makeCacheMatrix call to cacheSolve #' Util function that set the matrix and the inverse in an env...
/cachematrix.R
no_license
gokulakrishnan77/ProgrammingAssignment2
R
false
false
1,434
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ## Pair of functions that cache the inverse of a matrix ## Usage: Pass the result of a makeCacheMatrix call to cacheSolve #' Util function that set the matrix and the inverse in an env...
#' @title Create credentials database #' #' @description Create a SQLite database with credentials data protected by a password. #' #' @param credentials_data A \code{data.frame} with information about users, \code{user} and \code{password} are required. #' @param sqlite_path Path to the SQLite database. #' @param pas...
/R/credentials-db.R
no_license
abhik1368/shinymanager
R
false
false
7,308
r
#' @title Create credentials database #' #' @description Create a SQLite database with credentials data protected by a password. #' #' @param credentials_data A \code{data.frame} with information about users, \code{user} and \code{password} are required. #' @param sqlite_path Path to the SQLite database. #' @param pas...
library(tidyverse) #Zad 5-1 library(readr) movies <- read_csv("movies.csv") View(movies) #Zad 5-2 filter(movies, year == 2005, Comedy == 1) #Zad 5-3 select(movies, title, year, budget) %>% arrange(movies, desc(budget)) #Zad 5-4 filter(movies, year >= 1990 & year < 2000, Animation == 1) %>% a...
/zadania5.R
no_license
miriamkaminska/tipn_zad-kaminska
R
false
false
530
r
library(tidyverse) #Zad 5-1 library(readr) movies <- read_csv("movies.csv") View(movies) #Zad 5-2 filter(movies, year == 2005, Comedy == 1) #Zad 5-3 select(movies, title, year, budget) %>% arrange(movies, desc(budget)) #Zad 5-4 filter(movies, year >= 1990 & year < 2000, Animation == 1) %>% a...
context("rank") ntile_h <- function(x, n) { tibble(x = x) %>% mutate(y = ntile(x, n)) %>% pull(y) } ntile_h_dplyr <- function(x, n) { tibble(x = x) %>% mutate(y = dplyr::ntile(x, n)) %>% pull(y) } test_that("ntile ignores number of NAs", { x <- c(1:3, NA, NA, NA) expect_equal(ntile(x, 3), x) ...
/tests/testthat/test-rank.R
permissive
krlmlr/dplyr
R
false
false
1,356
r
context("rank") ntile_h <- function(x, n) { tibble(x = x) %>% mutate(y = ntile(x, n)) %>% pull(y) } ntile_h_dplyr <- function(x, n) { tibble(x = x) %>% mutate(y = dplyr::ntile(x, n)) %>% pull(y) } test_that("ntile ignores number of NAs", { x <- c(1:3, NA, NA, NA) expect_equal(ntile(x, 3), x) ...
library(tidyverse) library(httr) # GET("http://stapi.co/api/v1/rest/ship?") alcohol <- read_csv(here::here("data/open_units.csv"), col_names = c("Product", "Brand", "Category", "Style", "Quantity", "Quantity Units", "Volume", "Package", ...
/code/Exam-data-exploration.R
no_license
srvanderplas/unl-stat218-materials
R
false
false
1,770
r
library(tidyverse) library(httr) # GET("http://stapi.co/api/v1/rest/ship?") alcohol <- read_csv(here::here("data/open_units.csv"), col_names = c("Product", "Brand", "Category", "Style", "Quantity", "Quantity Units", "Volume", "Package", ...
.onLoad <- function(libname, pkgname) { opts <- options() my_opts <- list( addinexamples.clearAddin.nrow = 50 ) new_opts <- !(names(my_opts) %in% names(opts)) if (any(new_opts)) { options(my_opts[new_opts]) } invisible() }
/R/zzz.R
no_license
nathan-russell/addinexamples
R
false
false
282
r
.onLoad <- function(libname, pkgname) { opts <- options() my_opts <- list( addinexamples.clearAddin.nrow = 50 ) new_opts <- !(names(my_opts) %in% names(opts)) if (any(new_opts)) { options(my_opts[new_opts]) } invisible() }
#!/usr/bin/env Rscript #Auther: Shreeti Tuladhar #Date: 2nd October, 2015 #Version: 0.02 #creating a vector # SOME CHANGES MADE BY NATHAN ~~~~ #just for test for the Git #call the package ggplot2 #you can check if installed first with a condition before calling #the package ggplot2 library(ggplot2) #assume you have ...
/scripts/continents.R
no_license
shreeti248/exampleproject
R
false
false
1,005
r
#!/usr/bin/env Rscript #Auther: Shreeti Tuladhar #Date: 2nd October, 2015 #Version: 0.02 #creating a vector # SOME CHANGES MADE BY NATHAN ~~~~ #just for test for the Git #call the package ggplot2 #you can check if installed first with a condition before calling #the package ggplot2 library(ggplot2) #assume you have ...
# Copyright (C) 2016 Gen Kamita # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # any later version. # # This program is distributed in the hope that it wil...
/R/gp.likelihood.student_t.R
no_license
pbenner/gp.regression
R
false
false
2,931
r
# Copyright (C) 2016 Gen Kamita # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # any later version. # # This program is distributed in the hope that it wil...
library(shiny) ui <- fluidPage( textOutput("text"), verbatimTextOutput("code"), tableOutput("static"), dataTableOutput("dynamic"), plotOutput("plot", width="400px") ) server <- function(input, output, session){ output$text <- renderText("Hello friend!") output$code <- renderPrint(s...
/mastering-shiny/chapter_3/worked_example_output_app.R
permissive
AnkithMohan95/shiny_apps_dojo
R
false
false
547
r
library(shiny) ui <- fluidPage( textOutput("text"), verbatimTextOutput("code"), tableOutput("static"), dataTableOutput("dynamic"), plotOutput("plot", width="400px") ) server <- function(input, output, session){ output$text <- renderText("Hello friend!") output$code <- renderPrint(s...
det2<-function(Q) { e<-eigen(Q)$values e<-e[e>1e-10] loge<-sum(log(e)) rank<-length(e) return(list("logdet"=loge,"rank"=rank)) }
/R/det2.R
no_license
bioimaginggroup/BayGMRF
R
false
false
139
r
det2<-function(Q) { e<-eigen(Q)$values e<-e[e>1e-10] loge<-sum(log(e)) rank<-length(e) return(list("logdet"=loge,"rank"=rank)) }
#Compare emissions from motor vehicle sources in Baltimore City with #emissions from motor vehicle sources in Los Angeles County, California #(fips == "06037"). Which city has seen greater changes over time in motor vehicle #emissions? # # Load ggplot2 library(ggplot2) # Load data SCC <- readRDS("Source_Classificati...
/emissionsComparison.R
no_license
jayzuniga/R
R
false
false
1,534
r
#Compare emissions from motor vehicle sources in Baltimore City with #emissions from motor vehicle sources in Los Angeles County, California #(fips == "06037"). Which city has seen greater changes over time in motor vehicle #emissions? # # Load ggplot2 library(ggplot2) # Load data SCC <- readRDS("Source_Classificati...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/HighFreq.R \name{agg_regate} \alias{agg_regate} \title{Calculate the aggregation (weighted average) of a statistical estimator over a \emph{OHLC} time series.} \usage{ agg_regate(oh_lc, mo_ment = "run_variance", weight_ed = TRUE, ...) } \argu...
/man/agg_regate.Rd
no_license
IanMadlenya/HighFreq
R
false
true
1,412
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/HighFreq.R \name{agg_regate} \alias{agg_regate} \title{Calculate the aggregation (weighted average) of a statistical estimator over a \emph{OHLC} time series.} \usage{ agg_regate(oh_lc, mo_ment = "run_variance", weight_ed = TRUE, ...) } \argu...
## My function ## This function does 4 computations ## First, it stores the cached value as NULL ## Then it creates the matrix "y" in the working environment ## It gets the value of the matrix ## Uses solve to compute the inverse & store it in the cache ## And finally returns the functions to the working enviro...
/cachematrix.R
no_license
peteabbate/ProgrammingAssignment2
R
false
false
1,255
r
## My function ## This function does 4 computations ## First, it stores the cached value as NULL ## Then it creates the matrix "y" in the working environment ## It gets the value of the matrix ## Uses solve to compute the inverse & store it in the cache ## And finally returns the functions to the working enviro...
#' caretEnsemble: Make ensembles of caret models. #' #' Functions for creating ensembles of caret models: caretList and caretStack #' @docType package #' @name caretEnsemble #' @importFrom graphics plot #' @importFrom methods is #' @importFrom stats coef median model.frame model.response predict qnorm reshape resid res...
/R/caretEnsemble-package.R
permissive
zachmayer/caretEnsemble
R
false
false
1,819
r
#' caretEnsemble: Make ensembles of caret models. #' #' Functions for creating ensembles of caret models: caretList and caretStack #' @docType package #' @name caretEnsemble #' @importFrom graphics plot #' @importFrom methods is #' @importFrom stats coef median model.frame model.response predict qnorm reshape resid res...
### R code from vignette source 'adephylo.Rnw' ### Encoding: UTF-8 ################################################### ### code chunk number 1: adephylo.Rnw:105-106 (eval = FALSE) ################################################### ## vignette("phylobase") ################################################### ### code...
/adephylo/inst/doc/adephylo.R
no_license
ingted/R-Examples
R
false
false
8,809
r
### R code from vignette source 'adephylo.Rnw' ### Encoding: UTF-8 ################################################### ### code chunk number 1: adephylo.Rnw:105-106 (eval = FALSE) ################################################### ## vignette("phylobase") ################################################### ### code...
# This is the user-interface definition of a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) shinyUI(navbarPage( theme = "bootstrap.css", title = "tSVE", id = "tSVE", navbarMenu( title = "Input", tabPanel( ...
/inst/shinyApp/ui.R
permissive
lptolik/TVTB
R
false
false
28,842
r
# This is the user-interface definition of a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) shinyUI(navbarPage( theme = "bootstrap.css", title = "tSVE", id = "tSVE", navbarMenu( title = "Input", tabPanel( ...
library(readr) library(dplyr) library(sf) library(leaflet) library(htmltools) library(tidytransit) tracts <- st_read("data/tracts/cb_2019_36_tract_500k.shp") %>% filter(COUNTYFP %in% c("005", "047", "061", "081", "085")) %>% st_transform(st_crs("+proj=longlat +datum=WGS84 +no_defs")) subway <- st_read( "data/su...
/maps.R
no_license
mnbram/nyc-carless
R
false
false
4,632
r
library(readr) library(dplyr) library(sf) library(leaflet) library(htmltools) library(tidytransit) tracts <- st_read("data/tracts/cb_2019_36_tract_500k.shp") %>% filter(COUNTYFP %in% c("005", "047", "061", "081", "085")) %>% st_transform(st_crs("+proj=longlat +datum=WGS84 +no_defs")) subway <- st_read( "data/su...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/router.R \name{add_route} \alias{add_route} \alias{add_route.default} \alias{add_route.router} \title{add_route: add new route to a router} \usage{ add_route(router, method, endpoint, fun) \method{add_route}{default}(router, method, endpoint...
/man/add_route.Rd
no_license
gabaligeti/routeR
R
false
true
875
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/router.R \name{add_route} \alias{add_route} \alias{add_route.default} \alias{add_route.router} \title{add_route: add new route to a router} \usage{ add_route(router, method, endpoint, fun) \method{add_route}{default}(router, method, endpoint...
\name{mcmcNorm} \docType{methods} \alias{mcmcNorm} \alias{mcmcNorm.default} \alias{mcmcNorm.formula} \alias{mcmcNorm.norm} \title{ MCMC algorithm for incomplete multivariate normal data} \description{ Simulates parameters and missing values from a joint posterior distribution under a normal model using...
/man/mcmcNorm.Rd
no_license
cran/norm2
R
false
false
15,876
rd
\name{mcmcNorm} \docType{methods} \alias{mcmcNorm} \alias{mcmcNorm.default} \alias{mcmcNorm.formula} \alias{mcmcNorm.norm} \title{ MCMC algorithm for incomplete multivariate normal data} \description{ Simulates parameters and missing values from a joint posterior distribution under a normal model using...
rankall <- function(outcome, num = 1){ library(dplyr) data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") data <- arrange(data, State) state <- unique(data$State) if (num != "worst"){ hospital <- c() for (i in state){ data <- read.csv("outcome-of-care-measures.csv", col...
/script/rankall.R
no_license
JonathanRyanW/R_Programming_Quiz4
R
false
false
1,787
r
rankall <- function(outcome, num = 1){ library(dplyr) data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") data <- arrange(data, State) state <- unique(data$State) if (num != "worst"){ hospital <- c() for (i in state){ data <- read.csv("outcome-of-care-measures.csv", col...
# Function: maxdepth # # This function takes a cryostratigraphic dataset and returns the maximum depth for each unique borehole # # data: Cryostratigraphic dataset with top and bottom depth values for each interval # # Output: This function outputs the input dataframe with a "maxdepth" column indicating the maxim...
/src/maxdepth.R
permissive
arianecast/ExcessIceBetaRegression
R
false
false
573
r
# Function: maxdepth # # This function takes a cryostratigraphic dataset and returns the maximum depth for each unique borehole # # data: Cryostratigraphic dataset with top and bottom depth values for each interval # # Output: This function outputs the input dataframe with a "maxdepth" column indicating the maxim...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AuxDelaunay.R \name{rel.verts.tri} \alias{rel.verts.tri} \title{The indices of the vertex regions in a triangle that contains the points in a give data set} \usage{ rel.verts.tri(Xp, tri, M) } \arguments{ \item{Xp}{A set of 2D points represen...
/man/rel.verts.tri.Rd
no_license
elvanceyhan/pcds
R
false
true
3,314
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AuxDelaunay.R \name{rel.verts.tri} \alias{rel.verts.tri} \title{The indices of the vertex regions in a triangle that contains the points in a give data set} \usage{ rel.verts.tri(Xp, tri, M) } \arguments{ \item{Xp}{A set of 2D points represen...
#################################################################### #' Download Historical Currency Exchange Rate #' #' This function lets the user download historical currency exchange #' rate between two currencies #' #' @family Currency #' @param currency_pair Character. Which currency exchange do you #' wish to ...
/R/currency.R
no_license
alexandereric995/lares
R
false
false
2,050
r
#################################################################### #' Download Historical Currency Exchange Rate #' #' This function lets the user download historical currency exchange #' rate between two currencies #' #' @family Currency #' @param currency_pair Character. Which currency exchange do you #' wish to ...
library(ArchR) library(ggplot2) library(tidyverse) addArchRThreads(threads = 12) setwd('/project2/gca/aselewa/heart_atlas_project/') macs2 <- '/project2/gca/software/miniconda3/bin/macs2' source('R/analysis_utils.R') archr_project_path <- 'ArchR/ArchR_heart_latest_noAtrium/' projHeart <- loadArchRProject(archr_pro...
/R/peak_calling.R
no_license
sq-96/heart_atlas
R
false
false
1,588
r
library(ArchR) library(ggplot2) library(tidyverse) addArchRThreads(threads = 12) setwd('/project2/gca/aselewa/heart_atlas_project/') macs2 <- '/project2/gca/software/miniconda3/bin/macs2' source('R/analysis_utils.R') archr_project_path <- 'ArchR/ArchR_heart_latest_noAtrium/' projHeart <- loadArchRProject(archr_pro...
mydata <- InsectSprays install.packages("ggplot2", dependencies = TRUE) library(ggplot2) mydata <- ggplot2::diamonds mydata mydata [mydata$carat > 0.50 & mydata$color=="E",] mydata [mydata$carat > 0.50 | mydata$color=="E",] mydata1 <- subset(mydata , color="E") mydata1 mydata2 <- transform(mydata, carat= log(carat))...
/week4.R
no_license
mervecaglarer/StatisticalComputing
R
false
false
330
r
mydata <- InsectSprays install.packages("ggplot2", dependencies = TRUE) library(ggplot2) mydata <- ggplot2::diamonds mydata mydata [mydata$carat > 0.50 & mydata$color=="E",] mydata [mydata$carat > 0.50 | mydata$color=="E",] mydata1 <- subset(mydata , color="E") mydata1 mydata2 <- transform(mydata, carat= log(carat))...
\name{pSdat1} \alias{pSdat1} %- Also NEED an '\alias' for EACH other topic documented here. \title{ %% ~~function to do ... ~~ } \description{ %% ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ pSdat1(dat) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{dat}...
/man/pSdat1.Rd
no_license
Auburngrads/3pod
R
false
false
4,859
rd
\name{pSdat1} \alias{pSdat1} %- Also NEED an '\alias' for EACH other topic documented here. \title{ %% ~~function to do ... ~~ } \description{ %% ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ pSdat1(dat) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{dat}...
#' Run simulation wrapper #' @export do_sim <- function( user = NULL, input = list(), userData = NULL, userDetails = NULL, jobscheduler = FALSE, description = "No description", nPatients = 1, regimen = NULL, memsFile = NULL, drugNames = c()) { if(!is.null(userData)) { cat("Saving results to ...
/tbsim_app/R/do_sim.R
no_license
saviclab/TBsim
R
false
false
6,508
r
#' Run simulation wrapper #' @export do_sim <- function( user = NULL, input = list(), userData = NULL, userDetails = NULL, jobscheduler = FALSE, description = "No description", nPatients = 1, regimen = NULL, memsFile = NULL, drugNames = c()) { if(!is.null(userData)) { cat("Saving results to ...
library("MASS") getLdaError <- function(train, test){ lda.fit <- lda(crim ~ ., data = train) lda.pred <- predict(lda.fit, test) lda.error <- mean(lda.pred$class != test$crim) return(lda.error) } getQdaError <- function(train, test){ qda.fit <- qda(crim ~ ., data = train) qda.pred <- predict(qda.fit, tes...
/classification/classification_lab_13.R
no_license
AnatoliiStepaniuk/ISLR
R
false
false
1,980
r
library("MASS") getLdaError <- function(train, test){ lda.fit <- lda(crim ~ ., data = train) lda.pred <- predict(lda.fit, test) lda.error <- mean(lda.pred$class != test$crim) return(lda.error) } getQdaError <- function(train, test){ qda.fit <- qda(crim ~ ., data = train) qda.pred <- predict(qda.fit, tes...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/retain.R \name{retain} \alias{retain} \title{Decides if a file should be retiained or removed based on its status.} \usage{ retain( meta_files, make_decision = c("maxi", "mini", "unique"), Status = "Status", CellspML = "CellspML" ) } ...
/man/retain.Rd
no_license
fomotis/cyanoFilter
R
false
true
3,214
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/retain.R \name{retain} \alias{retain} \title{Decides if a file should be retiained or removed based on its status.} \usage{ retain( meta_files, make_decision = c("maxi", "mini", "unique"), Status = "Status", CellspML = "CellspML" ) } ...
mydata <- read.csv('2002to2016Annual_Summary.csv',header=TRUE,na.strings=c("","-",NA)) msubdata <- read.csv('msubdata.csv',row.names = 1) mysubdata <- as.matrix(msubdata) mset <- read.table('b.txt') myperiod <- read.table('subperiod.txt') data <- read.table('vitalchart.txt') names(data)[2] <- "Region" data...
/Global.R
no_license
XiusiMa/ShinyProject
R
false
false
1,607
r
mydata <- read.csv('2002to2016Annual_Summary.csv',header=TRUE,na.strings=c("","-",NA)) msubdata <- read.csv('msubdata.csv',row.names = 1) mysubdata <- as.matrix(msubdata) mset <- read.table('b.txt') myperiod <- read.table('subperiod.txt') data <- read.table('vitalchart.txt') names(data)[2] <- "Region" data...
################################################## ### Demo code for Unit 2 of Stat243, ### "Data input/output and webscraping" ### Chris Paciorek, August 2019 ################################################## ## @knitr ##################################################### # 2: Reading data from text files into R ##...
/units/unit2-dataTech.R
no_license
feihua813/stat243-fall-2020
R
false
false
11,536
r
################################################## ### Demo code for Unit 2 of Stat243, ### "Data input/output and webscraping" ### Chris Paciorek, August 2019 ################################################## ## @knitr ##################################################### # 2: Reading data from text files into R ##...
\alias{gtkOptionMenuGetHistory} \name{gtkOptionMenuGetHistory} \title{gtkOptionMenuGetHistory} \description{ Retrieves the index of the currently selected menu item. The menu items are numbered from top to bottom, starting with 0. \strong{WARNING: \code{gtk_option_menu_get_history} has been deprecated since version 2.4...
/man/gtkOptionMenuGetHistory.Rd
no_license
cran/RGtk2.10
R
false
false
700
rd
\alias{gtkOptionMenuGetHistory} \name{gtkOptionMenuGetHistory} \title{gtkOptionMenuGetHistory} \description{ Retrieves the index of the currently selected menu item. The menu items are numbered from top to bottom, starting with 0. \strong{WARNING: \code{gtk_option_menu_get_history} has been deprecated since version 2.4...
library(diversitree) phy <- read.tree("tree.tree") mydata2 <- read.csv ("mydata.csv") states <- as.character(mydata2$Species) names(states) <- mydata2$Area setdiff(phy$tip.label, states) setdiff(states,phy$tip.label) phy$tip.state <- names(states)[match(phy$tip.label,states)] names(phy$tip.state) <- states[match(phy$t...
/combpurebirthanalyses/run2/script2.R
no_license
amesclir/LinumDiversification
R
false
false
1,279
r
library(diversitree) phy <- read.tree("tree.tree") mydata2 <- read.csv ("mydata.csv") states <- as.character(mydata2$Species) names(states) <- mydata2$Area setdiff(phy$tip.label, states) setdiff(states,phy$tip.label) phy$tip.state <- names(states)[match(phy$tip.label,states)] names(phy$tip.state) <- states[match(phy$t...
library(animation) oopt = ani.options(interval = 0.05) if (require('rgl')) { ## ajust the view uM = matrix(c(-0.370919227600098, -0.513357102870941, -0.773877620697021, 0, -0.73050606250763, 0.675815105438232, -0.0981751680374146, 0, 0.573396027088165, 0.52890640497207...
/demo/pollen.R
no_license
snowdj/animation
R
false
false
851
r
library(animation) oopt = ani.options(interval = 0.05) if (require('rgl')) { ## ajust the view uM = matrix(c(-0.370919227600098, -0.513357102870941, -0.773877620697021, 0, -0.73050606250763, 0.675815105438232, -0.0981751680374146, 0, 0.573396027088165, 0.52890640497207...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/generics.R \name{leaf-attr} \alias{leaf-attr} \alias{is_pos} \alias{is_neg} \title{Attributes of an Expression Leaf} \usage{ is_pos(object) is_neg(object) } \arguments{ \item{object}{A \linkS4class{Leaf} object.} } \value{ A logical value. }...
/CVXR/man/leaf-attr.Rd
no_license
akhikolla/TestedPackages-NoIssues
R
false
true
389
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/generics.R \name{leaf-attr} \alias{leaf-attr} \alias{is_pos} \alias{is_neg} \title{Attributes of an Expression Leaf} \usage{ is_pos(object) is_neg(object) } \arguments{ \item{object}{A \linkS4class{Leaf} object.} } \value{ A logical value. }...
# pull in data from the usda db # help site: https://ndb.nal.usda.gov/ndb/doc/index# library(httr) library(tidyverse) library(jsonlite) library(tidyjson) source("./other/api/key.R") # get all foods # max per request is 1500, default is 50 so specify 1500 # use offset to specify beginning row # set subset to 1 so g...
/other/api/connect.R
no_license
aedobbyn/menu-builder
R
false
false
2,294
r
# pull in data from the usda db # help site: https://ndb.nal.usda.gov/ndb/doc/index# library(httr) library(tidyverse) library(jsonlite) library(tidyjson) source("./other/api/key.R") # get all foods # max per request is 1500, default is 50 so specify 1500 # use offset to specify beginning row # set subset to 1 so g...
#intall packages install.packages("data.table") install.packages("dplyr") install.packages("tidyr") install.packages("ggplot2") install.packages("stringr") install.packages("DT") install.packages("knitr") install.packages("grid") install.packages("gridExtra") install.packages("corrplot") install.packages("...
/sprint_1.R
no_license
skamto/Sprint_1
R
false
false
9,880
r
#intall packages install.packages("data.table") install.packages("dplyr") install.packages("tidyr") install.packages("ggplot2") install.packages("stringr") install.packages("DT") install.packages("knitr") install.packages("grid") install.packages("gridExtra") install.packages("corrplot") install.packages("...
#' @param path The location where Miniconda is (or should be) installed. Note #' that the Miniconda installer does not support paths containing spaces. See #' [miniconda_path] for more details on the default path used by `reticulate`. #' #' @title miniconda-params #' @keywords internal #' @name miniconda-params NU...
/R/miniconda.R
permissive
chainsawriot/reticulate
R
false
false
10,555
r
#' @param path The location where Miniconda is (or should be) installed. Note #' that the Miniconda installer does not support paths containing spaces. See #' [miniconda_path] for more details on the default path used by `reticulate`. #' #' @title miniconda-params #' @keywords internal #' @name miniconda-params NU...
## ----setup, message = FALSE---------------------------------------------- library(nycflights13) library(tidyverse) options(tibble.width = Inf) ## ---- eval=FALSE--------------------------------------------------------- ## install.packages("tidyverse") ## ------------------------------------------------------------...
/Session3_r4ds_transform/Session3_transform_report.R
no_license
karaesmen/WorkshopMaterials_May2019
R
false
false
11,803
r
## ----setup, message = FALSE---------------------------------------------- library(nycflights13) library(tidyverse) options(tibble.width = Inf) ## ---- eval=FALSE--------------------------------------------------------- ## install.packages("tidyverse") ## ------------------------------------------------------------...
library(tidyverse) library(likert) library(readxl) setwd("F://Metodos 2//Trabalho") BD = read_excel("F:/Metodos 2/Trabalho/BD.xlsx") BD2= BD %>% select(6:15) BD2 = mutate_at(BD2,vars(1:3),function(x)factor(x,levels =1:5,labels=c("Muito Ruim","Ruim","Regular","Bom","Ótimo"))) BD2 = mutate_at(BD2,vars(4:10),function(x...
/Script e BD/Script.R
no_license
Lyncoln/slides-para-a-semext
R
false
false
649
r
library(tidyverse) library(likert) library(readxl) setwd("F://Metodos 2//Trabalho") BD = read_excel("F:/Metodos 2/Trabalho/BD.xlsx") BD2= BD %>% select(6:15) BD2 = mutate_at(BD2,vars(1:3),function(x)factor(x,levels =1:5,labels=c("Muito Ruim","Ruim","Regular","Bom","Ótimo"))) BD2 = mutate_at(BD2,vars(4:10),function(x...
`dLRs` <- function(x) { return(IQR(diff(na.omit(x))) / (4 * qnorm((1 + 0.5) / 2) / sqrt(2))) }
/R/dLRs.R
no_license
tf2/CNsolidate
R
false
false
96
r
`dLRs` <- function(x) { return(IQR(diff(na.omit(x))) / (4 * qnorm((1 + 0.5) / 2) / sqrt(2))) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/myf2.R \name{myf2} \alias{myf2} \title{myf2} \usage{ myf2(x, xk, xk2, coef) } \arguments{ \item{x}{points on the curve} \item{xk}{the first x knot} \item{xk2}{the second k knot} \item{coef}{linear model coefficients} } \value{ coefficients...
/man/myf2.Rd
permissive
cil0834/MATH4773CLAG
R
false
true
520
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/myf2.R \name{myf2} \alias{myf2} \title{myf2} \usage{ myf2(x, xk, xk2, coef) } \arguments{ \item{x}{points on the curve} \item{xk}{the first x knot} \item{xk2}{the second k knot} \item{coef}{linear model coefficients} } \value{ coefficients...
#' @title Update user details #' @description Function to Update user details on pipedrive. #' @param id ID of the user #' @param active_flag Whether the user is active or not. 0 = Not activated, 1 = Activated This field has the following domains: (0; 1) #' @param api_token To validate your requests, you'll need yo...
/R/users.update.R
no_license
cran/Rpipedrive
R
false
false
1,864
r
#' @title Update user details #' @description Function to Update user details on pipedrive. #' @param id ID of the user #' @param active_flag Whether the user is active or not. 0 = Not activated, 1 = Activated This field has the following domains: (0; 1) #' @param api_token To validate your requests, you'll need yo...
\name{plotbasemap} \alias{plotbasemap} \title{ Plot land area on a map with colored polygons} \description{ Plots a map within given rectangular region showing land areas as colored polygons. Requires the mapping utility GMT. } \usage{ plotbasemap(lon1, lon2, lat1, lat2, grid=FALSE, zoom=FALSE, landcolor="...
/deprecated/trackit/trackit/man/plotbasemap.Rd
no_license
positioning/kalmanfilter
R
false
false
1,286
rd
\name{plotbasemap} \alias{plotbasemap} \title{ Plot land area on a map with colored polygons} \description{ Plots a map within given rectangular region showing land areas as colored polygons. Requires the mapping utility GMT. } \usage{ plotbasemap(lon1, lon2, lat1, lat2, grid=FALSE, zoom=FALSE, landcolor="...
## ---------------------- Setup and Configuration nodename = Sys.info()['nodename'] #Get OS name for dynamic working directory setting if (grepl('SKYLLA', nodename)){ Sys.setlocale("LC_TIME", "C") #LOCALE ISSUES WITH DATETIME ON WINDOWS setwd("G:/Dev/DataScience/TSA-Finance/data") #Pascal Desktop } else if (grepl(...
/analyze.R
no_license
highproformas/TSA-Finance
R
false
false
7,304
r
## ---------------------- Setup and Configuration nodename = Sys.info()['nodename'] #Get OS name for dynamic working directory setting if (grepl('SKYLLA', nodename)){ Sys.setlocale("LC_TIME", "C") #LOCALE ISSUES WITH DATETIME ON WINDOWS setwd("G:/Dev/DataScience/TSA-Finance/data") #Pascal Desktop } else if (grepl(...
# Created on # Course work: # @author: # Source: # the factor function stores distinct values of a vector colours <- c("red","red","orange","green","blue","green","green") factor_colours = factor(colours) print(factor_colours) # accessing factor elements print(factor_colours[2]) # printing the number of levels ...
/chaaya/factor_function.r
no_license
tactlabs/r-samples
R
false
false
514
r
# Created on # Course work: # @author: # Source: # the factor function stores distinct values of a vector colours <- c("red","red","orange","green","blue","green","green") factor_colours = factor(colours) print(factor_colours) # accessing factor elements print(factor_colours[2]) # printing the number of levels ...
library(dplyr) soil_df <- read.csv("Modeling/Recommendation Models/Soil_Nutrient_Summarized.csv") weather_df <- read.csv("Modeling/Recommendation Models/SummarizedTidyWeather2012_2017.csv") water_df <- read.csv("Modeling/Recommendation Models/Summarized_Water_Depth.csv") crop_df <- read.csv("Modeling/Recommendation ...
/Modeling/Recommendation Models/Data Joining/Data_Combining_Gram.R
no_license
abhisheksinha08/DataDrivenAgriculture
R
false
false
1,245
r
library(dplyr) soil_df <- read.csv("Modeling/Recommendation Models/Soil_Nutrient_Summarized.csv") weather_df <- read.csv("Modeling/Recommendation Models/SummarizedTidyWeather2012_2017.csv") water_df <- read.csv("Modeling/Recommendation Models/Summarized_Water_Depth.csv") crop_df <- read.csv("Modeling/Recommendation ...
testthat::context("Testing Group Consecutive Claims Function") testthat::test_that("Checking if correct data frame is being returned for threshold 10", { data_df <- data.frame( UPIN = c("A", "A", "A", "A"), min_ssd = c('2015-01-01', '2015-01-06', '2015-01-12', '2015-01-31'), max_ssd = c('2015-01-08', '20...
/tests/testthat/test-group-consecutive-claims.R
no_license
jfontestad/hospital-readmission
R
false
false
1,494
r
testthat::context("Testing Group Consecutive Claims Function") testthat::test_that("Checking if correct data frame is being returned for threshold 10", { data_df <- data.frame( UPIN = c("A", "A", "A", "A"), min_ssd = c('2015-01-01', '2015-01-06', '2015-01-12', '2015-01-31'), max_ssd = c('2015-01-08', '20...
library(ape) testtree <- read.tree("2652_13.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="2652_13_unrooted.txt")
/codeml_files/newick_trees_processed/2652_13/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
137
r
library(ape) testtree <- read.tree("2652_13.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="2652_13_unrooted.txt")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/list_sites.R \name{list_sites} \alias{list_sites} \title{Get a list of the sites on ScienceBase} \arguments{ \item{with_var_src}{character vector of data variables (i.e., 1+ of those listed in get_var_src_codes(out='var_src'))} \item{logic}...
/man/list_sites.Rd
permissive
ehstanley/powstreams
R
false
true
998
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/list_sites.R \name{list_sites} \alias{list_sites} \title{Get a list of the sites on ScienceBase} \arguments{ \item{with_var_src}{character vector of data variables (i.e., 1+ of those listed in get_var_src_codes(out='var_src'))} \item{logic}...