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(astsa) library(readxl) library(gamlss.data) library (depmixS4) ## Exercise P8 num = length(unemp) A = cbind(1,1,0,0,0,0,0,0,0,0,0,0) Linn =function(para){ Phi = diag(0,12) Phi[1,1] = para[1] Phi[2,]=c(0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1) Phi[3,]=c(0,1,0,0,0,0,0,0,0,0,0,0) Phi[4,]=c(0,0,1,0,0,0,0,0,0...
/Homework/Homework_2/Homework_2BEFD.r
no_license
mac40/BEFD
R
false
false
8,259
r
library(astsa) library(readxl) library(gamlss.data) library (depmixS4) ## Exercise P8 num = length(unemp) A = cbind(1,1,0,0,0,0,0,0,0,0,0,0) Linn =function(para){ Phi = diag(0,12) Phi[1,1] = para[1] Phi[2,]=c(0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1) Phi[3,]=c(0,1,0,0,0,0,0,0,0,0,0,0) Phi[4,]=c(0,0,1,0,0,0,0,0,0...
## Exploratory Data Analysis with R - Course Project ## Plot 4 # This script reads data from the Electric power consumption dataset from the # UC Irvine Machine Learning Repository and creates 4 plots regarding # power consumption from Feb 1, 2007 and Feb 2, 2007 # Check if data exists in wd if(!exists("HPC_filtered...
/plot4.R
no_license
santiagomariscal/ExData_Plotting1
R
false
false
3,056
r
## Exploratory Data Analysis with R - Course Project ## Plot 4 # This script reads data from the Electric power consumption dataset from the # UC Irvine Machine Learning Repository and creates 4 plots regarding # power consumption from Feb 1, 2007 and Feb 2, 2007 # Check if data exists in wd if(!exists("HPC_filtered...
library(readr) library(dplyr) library(ggplot2) library(ComplexHeatmap) library(RColorBrewer) library(reshape2) library(rtracklayer) library(trackViewer) data_dir <- file.path("data", "subgenome") out_dir <- file.path("analysis", "subgenome") if (!dir.exists(out_dir)) dir.create(out_dir) chrom_size <- 29891 fl_cutof...
/workflow/subgenome/nanopore_long_JS.R
no_license
guanguiwensy/cov2sg
R
false
false
14,436
r
library(readr) library(dplyr) library(ggplot2) library(ComplexHeatmap) library(RColorBrewer) library(reshape2) library(rtracklayer) library(trackViewer) data_dir <- file.path("data", "subgenome") out_dir <- file.path("analysis", "subgenome") if (!dir.exists(out_dir)) dir.create(out_dir) chrom_size <- 29891 fl_cutof...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/read_data.R \name{read_test_data} \alias{read_test_data} \title{read_test_data} \usage{ read_test_data(file) } \arguments{ \item{file}{input test file} } \value{ a data.frame } \description{ read_test_data }
/muchachos/man/read_test_data.Rd
no_license
yannig29/santander
R
false
true
286
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/read_data.R \name{read_test_data} \alias{read_test_data} \title{read_test_data} \usage{ read_test_data(file) } \arguments{ \item{file}{input test file} } \value{ a data.frame } \description{ read_test_data }
#' user_interaction.R arguments #' #' @param tag The tag being analysed. #' @param detections The detections data.frame for a specific tag. #' @param force Logical: If TRUE, the user is moved directly to indicating which movements should be invalidated. #' @param trigger The message/warning that triggered the inte...
/R/user_interaction.R
no_license
cran/actel
R
false
false
35,485
r
#' user_interaction.R arguments #' #' @param tag The tag being analysed. #' @param detections The detections data.frame for a specific tag. #' @param force Logical: If TRUE, the user is moved directly to indicating which movements should be invalidated. #' @param trigger The message/warning that triggered the inte...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.r \docType{data} \name{tt_alzh_BA44} \alias{tt_alzh_BA44} \title{Example table of differential expression (Alzheimer's BA44)} \format{An object of class \code{data.frame} with 21745 rows and 7 columns.} \source{ The table was determined ...
/man/tt_alzh_BA44.Rd
no_license
KristinaSalontaji/EWCE
R
false
true
528
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.r \docType{data} \name{tt_alzh_BA44} \alias{tt_alzh_BA44} \title{Example table of differential expression (Alzheimer's BA44)} \format{An object of class \code{data.frame} with 21745 rows and 7 columns.} \source{ The table was determined ...
#' @title Set Nice Startup Options #' #' Sets nicer options. All arguments are passed to the \code{options} function. #' This function also sets \code{ipck = TRUE} in \code{rc.settings}. #' @param digits Default \code{4} #' @param show.signif.stars Default \code{FALSE} #' @param useFancyQuotes Default \code{FALSE} #' @...
/R/startup-options.R
no_license
laasousa/rprofile
R
false
false
3,902
r
#' @title Set Nice Startup Options #' #' Sets nicer options. All arguments are passed to the \code{options} function. #' This function also sets \code{ipck = TRUE} in \code{rc.settings}. #' @param digits Default \code{4} #' @param show.signif.stars Default \code{FALSE} #' @param useFancyQuotes Default \code{FALSE} #' @...
# Code for QC of CSV files generated from GIA Server # QC of Nation-CL3 Rx Trends Tab at Nation and RM Level ## Author : Abhinav dp <- "H:\\01. GIP BAI\\MBR\\Automation\\Automation" dpv <- "" dpv[1]<- "H:\\01. GIP BAI\\MBR\\Automation\\Automation\\RA\\CL3_Nation" dpv[2]<- "H:\\01. GIP BAI\\MBR\\Au...
/R-Codes/RA Codes/RA CL3 QC Code.R
no_license
namann1209/pehla_account
R
false
false
2,588
r
# Code for QC of CSV files generated from GIA Server # QC of Nation-CL3 Rx Trends Tab at Nation and RM Level ## Author : Abhinav dp <- "H:\\01. GIP BAI\\MBR\\Automation\\Automation" dpv <- "" dpv[1]<- "H:\\01. GIP BAI\\MBR\\Automation\\Automation\\RA\\CL3_Nation" dpv[2]<- "H:\\01. GIP BAI\\MBR\\Au...
\name{diffExp} \alias{diffExp} \title{Compute differential expression} \description{ Compute differential expression for case vs control samples. Will produce the file \code{computedEmpGenes.csv} listing empiricaly differentially expressed genes used for RNA-Seq normalization. } \usage{ diffExp(case_id='',control_i...
/man/diffExp.Rd
no_license
Lionir/OCTAD
R
false
false
3,088
rd
\name{diffExp} \alias{diffExp} \title{Compute differential expression} \description{ Compute differential expression for case vs control samples. Will produce the file \code{computedEmpGenes.csv} listing empiricaly differentially expressed genes used for RNA-Seq normalization. } \usage{ diffExp(case_id='',control_i...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/permutation.R \name{summarize_partitions} \alias{summarize_partitions} \alias{map_permutations} \title{Summarize and map partitions and permutations} \usage{ summarize_partitions(.partition, .information) map_permutations( .data, partiti...
/man/mapping_helpers.Rd
permissive
hadley/partition
R
false
true
1,164
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/permutation.R \name{summarize_partitions} \alias{summarize_partitions} \alias{map_permutations} \title{Summarize and map partitions and permutations} \usage{ summarize_partitions(.partition, .information) map_permutations( .data, partiti...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/leqtar_create_manhattan_plots.R \name{leqtar_create_manhattan_plots} \alias{leqtar_create_manhattan_plots} \title{leqtar_create_manhattan_plots} \usage{ leqtar_create_manhattan_plots(arguments) } \arguments{ \item{arguments}{the processed inp...
/man/leqtar_create_manhattan_plots.Rd
no_license
ErikSchutte/leqtar
R
false
true
641
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/leqtar_create_manhattan_plots.R \name{leqtar_create_manhattan_plots} \alias{leqtar_create_manhattan_plots} \title{leqtar_create_manhattan_plots} \usage{ leqtar_create_manhattan_plots(arguments) } \arguments{ \item{arguments}{the processed inp...
sd_section( "Main functions", "Essential functionality", c("inverse.predict", "calplot") ) sd_section( "LOD and LOQ", "Limit of detection and limit of quantification", c("lod", "loq") ) sd_section( "Datasets", "Example data", c("din32645", "massart97ex1", "massart97ex2") )
/chemCal/inst/staticdocs/index.r
no_license
ingted/R-Examples
R
false
false
304
r
sd_section( "Main functions", "Essential functionality", c("inverse.predict", "calplot") ) sd_section( "LOD and LOQ", "Limit of detection and limit of quantification", c("lod", "loq") ) sd_section( "Datasets", "Example data", c("din32645", "massart97ex1", "massart97ex2") )
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/install_user_app.R \name{install_user_app} \alias{install_user_app} \title{Install shiny app package and dependencies} \usage{ install_user_app( library_path = NULL, repo_location = "github", repo = "chasemc/IDBacApp", repos = cran_li...
/man/install_user_app.Rd
permissive
JoshuaQChurch/electricShine
R
false
true
1,676
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/install_user_app.R \name{install_user_app} \alias{install_user_app} \title{Install shiny app package and dependencies} \usage{ install_user_app( library_path = NULL, repo_location = "github", repo = "chasemc/IDBacApp", repos = cran_li...
################################################################################ # File: plot1.R # Author: Milen Angelov # Date: 9th of July, 2015 # # Overall goal here is simply to examine how household energy usage varies over # a 2-day period in February, 2007. # Script construct the plot and save it to a PNG file ...
/plot1.R
no_license
pimpf/ExData_Plotting1
R
false
false
2,520
r
################################################################################ # File: plot1.R # Author: Milen Angelov # Date: 9th of July, 2015 # # Overall goal here is simply to examine how household energy usage varies over # a 2-day period in February, 2007. # Script construct the plot and save it to a PNG file ...
#Loading library library(data.table) library(dplyr) #Getting files ready url = "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(url,"./project.zip") unzip("project.zip") #Read all files XTest <- read.table("UCI HAR Dataset/test/X_test.txt") YTest <- rea...
/run_analysis.R
no_license
JasonXie666/ProgrammingAssignment3
R
false
false
1,492
r
#Loading library library(data.table) library(dplyr) #Getting files ready url = "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(url,"./project.zip") unzip("project.zip") #Read all files XTest <- read.table("UCI HAR Dataset/test/X_test.txt") YTest <- rea...
library(ggplot2) data(diamonds) # Let's consider the price of a diamond and it's carat weight. # Create a scatterplot of price (y) vs carat weight (x). # Limit the x-axis and y-axis to omit the top 1% of values. ggplot(diamonds, aes(x=carat, y=price)) + geom_point(color="orange") + stat_smooth(method="lm"...
/Data-Analysis-with-R/EDA_Lesson6_Notes.R
no_license
FrankRuns/Udacity
R
false
false
3,544
r
library(ggplot2) data(diamonds) # Let's consider the price of a diamond and it's carat weight. # Create a scatterplot of price (y) vs carat weight (x). # Limit the x-axis and y-axis to omit the top 1% of values. ggplot(diamonds, aes(x=carat, y=price)) + geom_point(color="orange") + stat_smooth(method="lm"...
library(checkmate) library(raster) context("rFillNA") test_that("output has class RasterLayer", { input <- rtRasters$continuous patches <- rPatches(rBinarise(input, thresh = 30)) output <- rFillNA(patches) expect_class(output, "RasterLayer") }) test_that("output is named", { input <- rtRasters$continuous ...
/tests/testthat/test_rFillNA.R
no_license
yangxhcaf/rasterTools
R
false
false
1,593
r
library(checkmate) library(raster) context("rFillNA") test_that("output has class RasterLayer", { input <- rtRasters$continuous patches <- rPatches(rBinarise(input, thresh = 30)) output <- rFillNA(patches) expect_class(output, "RasterLayer") }) test_that("output is named", { input <- rtRasters$continuous ...
## @knitr h3-hexagon-layer-layer h3_cells <- system.file("sample-data/h3-cells.csv", package = "deckgl") %>% read.csv() properties <- list( getHexagon = ~h3_index, getFillColor =JS("d => [255, (1 - d.count / 500) * 255, 0]"), getElevation = ~count, elevationScale = 20, getTooltip = JS("object => `${object....
/inst/examples/deckgl-api-reference/h3-hexagon-layer.R
permissive
xytczh/deckgl
R
false
false
512
r
## @knitr h3-hexagon-layer-layer h3_cells <- system.file("sample-data/h3-cells.csv", package = "deckgl") %>% read.csv() properties <- list( getHexagon = ~h3_index, getFillColor =JS("d => [255, (1 - d.count / 500) * 255, 0]"), getElevation = ~count, elevationScale = 20, getTooltip = JS("object => `${object....
library(gbm) library(randomForest) library(lubridate) # Load Training data train = read.csv("train.csv") test = read.csv("test.csv") ################################################### ## Step 1: Data Cleaning and Tiding ################################################### # set categorical variables ####...
/othersWork/bike_sharing_gbm.R
no_license
feelosophy13/bike_sharing_demand
R
false
false
2,412
r
library(gbm) library(randomForest) library(lubridate) # Load Training data train = read.csv("train.csv") test = read.csv("test.csv") ################################################### ## Step 1: Data Cleaning and Tiding ################################################### # set categorical variables ####...
#' This function returns the default controls and other useful variables. #' Control is a list of the settings: #' @param bounds list. Internal objects are vectors names "lower" and "upper". #' @param dependence vector. default is rep(NA, length(bounds$lower)) #' @param label vector. default is 1:length(bounds$lower) ...
/R/SCGA-CreateFeature.R
no_license
LorenzoGentile/SCGA
R
false
false
5,528
r
#' This function returns the default controls and other useful variables. #' Control is a list of the settings: #' @param bounds list. Internal objects are vectors names "lower" and "upper". #' @param dependence vector. default is rep(NA, length(bounds$lower)) #' @param label vector. default is 1:length(bounds$lower) ...
library(RTextTools) ### Name: cross_validate ### Title: used for cross-validation of various algorithms. ### Aliases: cross_validate ### Keywords: method ### ** Examples library(RTextTools) data(NYTimes) data <- NYTimes[sample(1:3100,size=100,replace=FALSE),] matrix <- create_matrix(cbind(data["Title"],data["Subjec...
/data/genthat_extracted_code/RTextTools/examples/cross_validate.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
623
r
library(RTextTools) ### Name: cross_validate ### Title: used for cross-validation of various algorithms. ### Aliases: cross_validate ### Keywords: method ### ** Examples library(RTextTools) data(NYTimes) data <- NYTimes[sample(1:3100,size=100,replace=FALSE),] matrix <- create_matrix(cbind(data["Title"],data["Subjec...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/load_taxa.R \docType{data} \name{fishbase} \alias{fishbase} \title{A table of all the the species found in FishBase, including taxonomic classification and the Species Code (SpecCode) by which the species is identified in FishBase.} \...
/man/fishbase.Rd
no_license
amroco/rfishbase
R
false
false
602
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/load_taxa.R \docType{data} \name{fishbase} \alias{fishbase} \title{A table of all the the species found in FishBase, including taxonomic classification and the Species Code (SpecCode) by which the species is identified in FishBase.} \...
library(ape) testtree <- read.tree("7060_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="7060_0_unrooted.txt")
/codeml_files/newick_trees_processed/7060_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("7060_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="7060_0_unrooted.txt")
mydata <- read.csv("airquality.csv", header=TRUE, sep=",") mydata dim(mydata) lapply(mydata, class) is.na(mydata) mydata$Ozone[is.na(mydata$Ozone)] <- mean(mydata$Ozone, na.rm = TRUE) mydata x <- na.omit(mydata) x
/16.R
no_license
bossman100/R
R
false
false
231
r
mydata <- read.csv("airquality.csv", header=TRUE, sep=",") mydata dim(mydata) lapply(mydata, class) is.na(mydata) mydata$Ozone[is.na(mydata$Ozone)] <- mean(mydata$Ozone, na.rm = TRUE) mydata x <- na.omit(mydata) x
# testthat package library('testthat') test_dir('rstatistics', reporter = 'Summary')
/test/run_tests.R
permissive
cesine/ToolsForFieldLinguistics
R
false
false
85
r
# testthat package library('testthat') test_dir('rstatistics', reporter = 'Summary')
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/glue_operations.R \name{glue_create_user_defined_function} \alias{glue_create_user_defined_function} \title{Creates a new function definition in the Data Catalog} \usage{ glue_create_user_defined_function( CatalogId = NULL, DatabaseName, ...
/cran/paws.analytics/man/glue_create_user_defined_function.Rd
permissive
paws-r/paws
R
false
true
920
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/glue_operations.R \name{glue_create_user_defined_function} \alias{glue_create_user_defined_function} \title{Creates a new function definition in the Data Catalog} \usage{ glue_create_user_defined_function( CatalogId = NULL, DatabaseName, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppQuaternions.R \name{fromQuaternion} \alias{fromQuaternion} \title{Rotation matrix from quaternion} \usage{ fromQuaternion(q) } \arguments{ \item{q}{quaternion} } \value{ The rotation matrix corresponding to \code{q}. } \description{ Rotat...
/man/fromQuaternion.Rd
no_license
stla/RcppQuaternions
R
false
true
426
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppQuaternions.R \name{fromQuaternion} \alias{fromQuaternion} \title{Rotation matrix from quaternion} \usage{ fromQuaternion(q) } \arguments{ \item{q}{quaternion} } \value{ The rotation matrix corresponding to \code{q}. } \description{ Rotat...
\name{description} \alias{description} \title{Date and User Information} \description{ Returns data and user string. } \usage{ description() } \examples{ ## description: description() } \keyword{programming}
/man/description.Rd
no_license
cran/fUtilities
R
false
false
234
rd
\name{description} \alias{description} \title{Date and User Information} \description{ Returns data and user string. } \usage{ description() } \examples{ ## description: description() } \keyword{programming}
da <- read.csv("./UIP.csv", header=TRUE, na.strings = NA) # VIX quantiles---------------------------------------------- summary(da$VIX) quantile(da$VIX, 0.9) quantile(da$VIX, 0.6) #Create VIX chart-------------------------------------------- require(zoo) da$DATE <- as.Date(da$DATE, format = "%d/%m/%Y") daz <- as.zoo(da...
/VIX.R
no_license
RobHayward/UIPdoc
R
false
false
882
r
da <- read.csv("./UIP.csv", header=TRUE, na.strings = NA) # VIX quantiles---------------------------------------------- summary(da$VIX) quantile(da$VIX, 0.9) quantile(da$VIX, 0.6) #Create VIX chart-------------------------------------------- require(zoo) da$DATE <- as.Date(da$DATE, format = "%d/%m/%Y") daz <- as.zoo(da...
# Scape Data and Construct Data Sets # UPDATE date value date <- lubridate::mdy("05-13-2020") # dependencies library(dplyr) library(lubridate) library(purrr) library(readr) library(sf) library(tigris) library(zoo) # functions source("source/functions/get_data.R") source("source/functions/historic_expand.R") # workf...
/source/_build_am.R
permissive
kdhayes/covid_daily_viz
R
false
false
765
r
# Scape Data and Construct Data Sets # UPDATE date value date <- lubridate::mdy("05-13-2020") # dependencies library(dplyr) library(lubridate) library(purrr) library(readr) library(sf) library(tigris) library(zoo) # functions source("source/functions/get_data.R") source("source/functions/historic_expand.R") # workf...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/sonar.R \name{TargetStrengthPlateAnyShape} \alias{TargetStrengthPlateAnyShape} \title{target strength Plate of any shape} \usage{ TargetStrengthPlateAnyShape(A, lambda) } \arguments{ \item{A}{area (meters)} \item{lambda}{wavelength}...
/man/TargetStrengthPlateAnyShape.Rd
no_license
ctdClub/sonar
R
false
false
600
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/sonar.R \name{TargetStrengthPlateAnyShape} \alias{TargetStrengthPlateAnyShape} \title{target strength Plate of any shape} \usage{ TargetStrengthPlateAnyShape(A, lambda) } \arguments{ \item{A}{area (meters)} \item{lambda}{wavelength}...
# Repository of all the functions # Gompertz fit.gompertz <- function(group, df){ # df = df.raw # group = unique(df.raw$GROUP1)[1] # group='Brookhaven College_ACCT-2301_DL_FALL 1ST 8 WEEK' # df.raw$GROUP1 # Filtering the data for the group df.1 <- df[df$GROUP1 == group,] # creating a null data f...
/curve_fitting_functions.R
no_license
sahiil/predictive-enrolment
R
false
false
12,643
r
# Repository of all the functions # Gompertz fit.gompertz <- function(group, df){ # df = df.raw # group = unique(df.raw$GROUP1)[1] # group='Brookhaven College_ACCT-2301_DL_FALL 1ST 8 WEEK' # df.raw$GROUP1 # Filtering the data for the group df.1 <- df[df$GROUP1 == group,] # creating a null data f...
omni = read.csv(file.choose()) omni head(omni) mlr1 = lm(formula = sqty ~ price, data=omni) #sales depend on price mlr2 = lm(formula = sqty ~ promotion, data=omni) # sales depend on promotion mlr3 = lm(formula = sqty ~ price + promotion, data=omni) summary(mlr1) summary(mlr2) summary(mlr3) residuals(mlr3) plot(omni$sq...
/sales_case.R
no_license
akshaydave550/analytics1
R
false
false
501
r
omni = read.csv(file.choose()) omni head(omni) mlr1 = lm(formula = sqty ~ price, data=omni) #sales depend on price mlr2 = lm(formula = sqty ~ promotion, data=omni) # sales depend on promotion mlr3 = lm(formula = sqty ~ price + promotion, data=omni) summary(mlr1) summary(mlr2) summary(mlr3) residuals(mlr3) plot(omni$sq...
# This file needs to be run everytime the R session is restarted source("./packages.R") # Load all function files sapply(list.files("./R", full.names = TRUE), source) # _drake.R must end with a call to drake_config(). drake_config(plan)
/inst/templates/_drake.R
no_license
tagteam/heaven
R
false
false
238
r
# This file needs to be run everytime the R session is restarted source("./packages.R") # Load all function files sapply(list.files("./R", full.names = TRUE), source) # _drake.R must end with a call to drake_config(). drake_config(plan)
library(compareGroups) ### Name: radiograph ### Title: Lists the values in the data set. ### Aliases: radiograph ### Keywords: utilities ### ** Examples ## Not run: ##D ##D require(compareGroups) ##D ##D # read example data of regicor in plain text format with variables separated by '\t'. ##D datafile <- system...
/data/genthat_extracted_code/compareGroups/examples/radiograph.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
423
r
library(compareGroups) ### Name: radiograph ### Title: Lists the values in the data set. ### Aliases: radiograph ### Keywords: utilities ### ** Examples ## Not run: ##D ##D require(compareGroups) ##D ##D # read example data of regicor in plain text format with variables separated by '\t'. ##D datafile <- system...
setwd("~/Documents/Experiments/mb_discovery_IJAR/") for (model in c("insurance")) { dag = readRDS(paste0(model, "/dag/", model, ".rds")) vars = bnlearn::nodes(dag) nvars = length(vars) mbt = lapply(vars, bnlearn::mb, x = dag) amb = mean(sapply(mbt, length)) m = matrix(0, 3, 15) m[, 1] = model m[, 2] = ...
/RStudioProjects/local2global/mb_discovery_IJAR_scripts/evaluate accuracy on real models.R
no_license
kelvinyangli/PhDProjects
R
false
false
2,194
r
setwd("~/Documents/Experiments/mb_discovery_IJAR/") for (model in c("insurance")) { dag = readRDS(paste0(model, "/dag/", model, ".rds")) vars = bnlearn::nodes(dag) nvars = length(vars) mbt = lapply(vars, bnlearn::mb, x = dag) amb = mean(sapply(mbt, length)) m = matrix(0, 3, 15) m[, 1] = model m[, 2] = ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/vector_parameters.R \docType{data} \name{arab_params} \alias{arab_params} \title{Preset parameters for the An. arabiensis vector} \format{ An object of class \code{list} of length 7. } \usage{ arab_params } \description{ Preset parameters for...
/man/arab_params.Rd
permissive
mrc-ide/malariasimulation
R
false
true
607
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/vector_parameters.R \docType{data} \name{arab_params} \alias{arab_params} \title{Preset parameters for the An. arabiensis vector} \format{ An object of class \code{list} of length 7. } \usage{ arab_params } \description{ Preset parameters for...
testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358520212L, -128659642L, -14914341L, 1092032927L, 1837701012L, 1632068659L), pts = c(1758370433L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,...
/IntervalSurgeon/inst/testfiles/rcpp_pile/AFL_rcpp_pile/rcpp_pile_valgrind_files/1609873828-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
729
r
testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358520212L, -128659642L, -14914341L, 1092032927L, 1837701012L, 1632068659L), pts = c(1758370433L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,...
#' Create an OAuth token #' #' Creates a S3 object of class <httr2_token> representing an OAuth token #' returned from the access token endpoint. #' #' @param access_token The access token used to authenticate request #' @param token_type Type of token; only `"bearer"` is currently supported. #' @param expires_in Numbe...
/R/oauth-token.R
permissive
isabella232/httr2
R
false
false
2,275
r
#' Create an OAuth token #' #' Creates a S3 object of class <httr2_token> representing an OAuth token #' returned from the access token endpoint. #' #' @param access_token The access token used to authenticate request #' @param token_type Type of token; only `"bearer"` is currently supported. #' @param expires_in Numbe...
testlist <- list(rates = numeric(0), thresholds = numeric(0), x = c(-2.1777163424008e-42, 7.19826208358537e+164, 0, 0, 0)) result <- do.call(grattan::IncomeTax,testlist) str(result)
/grattan/inst/testfiles/IncomeTax/libFuzzer_IncomeTax/IncomeTax_valgrind_files/1610382510-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
182
r
testlist <- list(rates = numeric(0), thresholds = numeric(0), x = c(-2.1777163424008e-42, 7.19826208358537e+164, 0, 0, 0)) result <- do.call(grattan::IncomeTax,testlist) str(result)
library(ggplot2) library(dplyr) # Zad 5-1 library(readr) movies <- read_csv("movies.csv") View(movies) # Zad 5-2 filter(movies, year == 2005) # Zad 5-3 movies %>% select(title, year, budget) %>% arrange(desc(budget)) # Zad 5-4 filter(movies, Animation == 1, year >=1990 & year < 2000) %>% arrange(desc(rat...
/zadania5.R
no_license
paulinarybacka/tipn_zad_rybacka
R
false
false
508
r
library(ggplot2) library(dplyr) # Zad 5-1 library(readr) movies <- read_csv("movies.csv") View(movies) # Zad 5-2 filter(movies, year == 2005) # Zad 5-3 movies %>% select(title, year, budget) %>% arrange(desc(budget)) # Zad 5-4 filter(movies, Animation == 1, year >=1990 & year < 2000) %>% arrange(desc(rat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mypvalue.R \name{mypvalue} \alias{mypvalue} \title{My pvalue function} \usage{ mypvalue(t0, xmax = 4, n = 20, alpha = 0.05) } \arguments{ \item{t0}{the t value} \item{xmax}{the maximum x value} \item{n}{the size of data} \item{alpha}{the a...
/man/mypvalue.Rd
no_license
fordchastain/Math-4753-R-Package
R
false
true
660
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mypvalue.R \name{mypvalue} \alias{mypvalue} \title{My pvalue function} \usage{ mypvalue(t0, xmax = 4, n = 20, alpha = 0.05) } \arguments{ \item{t0}{the t value} \item{xmax}{the maximum x value} \item{n}{the size of data} \item{alpha}{the a...
### Statistical summaries library(tidyverse) # geom_bar() ggplot( data = mpg, mapping = aes(x = class) ) + geom_bar()
/script/14-stat.R
no_license
J-Brito/vistransrep-proj
R
false
false
126
r
### Statistical summaries library(tidyverse) # geom_bar() ggplot( data = mpg, mapping = aes(x = class) ) + geom_bar()
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utile.R \name{infosDonnees} \alias{infosDonnees} \title{Recherche ligne d'informations dans liste_donnees} \usage{ infosDonnees(donnees, date = NULL) } \arguments{ \item{donnees}{le nom court des données que l'on souhaite télécharger sur le s...
/man/infosDonnees.Rd
permissive
jdlom/DoReMIFaSol
R
false
true
1,185
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utile.R \name{infosDonnees} \alias{infosDonnees} \title{Recherche ligne d'informations dans liste_donnees} \usage{ infosDonnees(donnees, date = NULL) } \arguments{ \item{donnees}{le nom court des données que l'on souhaite télécharger sur le s...
# Add arbitrary SVG attributes to a grob garnishGrob <- function(x, ...) { cl <- class(x) # Should check that attributes are valid # Will need to be generic check with per-grob-type versions x$attributes <- list(...) class(x) <- c("svg.grob", cl) x } grid.garnish <- function(path, ..., redraw=TRUE) { g...
/packages/gridsvg_0.7-0r66/R/attrib.R
no_license
sjp/honours-report
R
false
false
477
r
# Add arbitrary SVG attributes to a grob garnishGrob <- function(x, ...) { cl <- class(x) # Should check that attributes are valid # Will need to be generic check with per-grob-type versions x$attributes <- list(...) class(x) <- c("svg.grob", cl) x } grid.garnish <- function(path, ..., redraw=TRUE) { g...
\name{throat.otu.tab} \alias{throat.otu.tab} \docType{data} \title{ OTU count table from 16S sequencing of the throat microbiome samples } \description{ This data set contains 60 subjects with 28 smokers and 32 nonsmokers. Microbiome data were collected from right and left nasopharynx and oropharynx region to fo...
/man/throat.otu.tab.Rd
no_license
teyden/MiRKC
R
false
false
747
rd
\name{throat.otu.tab} \alias{throat.otu.tab} \docType{data} \title{ OTU count table from 16S sequencing of the throat microbiome samples } \description{ This data set contains 60 subjects with 28 smokers and 32 nonsmokers. Microbiome data were collected from right and left nasopharynx and oropharynx region to fo...
library(glmnet) mydata = read.table("./TrainingSet/RF/liver.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.4,family="gaussian",standardize=FALSE) sink('./Model/EN/Classifier/liver/liver_050.txt',append=TRUE) pr...
/Model/EN/Classifier/liver/liver_050.R
no_license
leon1003/QSMART
R
false
false
347
r
library(glmnet) mydata = read.table("./TrainingSet/RF/liver.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.4,family="gaussian",standardize=FALSE) sink('./Model/EN/Classifier/liver/liver_050.txt',append=TRUE) pr...
install.packages("tidyverse") install.packages("readr") install.packages("dplyr") ############### Importing the data file #bold_data <- read.delim(file.choose(), header = T) #bold_data library(tidyverse) bold_data <- read_tsv("http://www.boldsystems.org/index.php/API_Public/combined?taxon=Clostridium&format=tsv") #L...
/Assignment 1 Improvements.R
no_license
ssurajbh/Basic-data-wrangling
R
false
false
2,925
r
install.packages("tidyverse") install.packages("readr") install.packages("dplyr") ############### Importing the data file #bold_data <- read.delim(file.choose(), header = T) #bold_data library(tidyverse) bold_data <- read_tsv("http://www.boldsystems.org/index.php/API_Public/combined?taxon=Clostridium&format=tsv") #L...
library(dplyr) library(graphics) main <- function() { # Load the data from the current folder if necessary NEI <-load.NEI.SCC.dataset() # Subset for US emissions emissions_by_year <- extract.US.emissions.data(NEI) # plot to the screen plot.data(emissions_by_year) # ...
/Plot1.R
no_license
luilan/EDAProject2
R
false
false
1,370
r
library(dplyr) library(graphics) main <- function() { # Load the data from the current folder if necessary NEI <-load.NEI.SCC.dataset() # Subset for US emissions emissions_by_year <- extract.US.emissions.data(NEI) # plot to the screen plot.data(emissions_by_year) # ...
# generalized linear models source("build_collapse_table.r") glimpse(timeseries) glimpse(collapse) model_data = collapse %>% group_by(stockid, stocklong, region) %>% summarize(ever_collapsed = any(ever_collapsed)) %>% ungroup() glimpse(model_data) # logistic regression time model_l = glm(ever_collapsed ~ reg...
/classnotes 3:22.R
no_license
anabishop99/unit_4_fisheries
R
false
false
1,663
r
# generalized linear models source("build_collapse_table.r") glimpse(timeseries) glimpse(collapse) model_data = collapse %>% group_by(stockid, stocklong, region) %>% summarize(ever_collapsed = any(ever_collapsed)) %>% ungroup() glimpse(model_data) # logistic regression time model_l = glm(ever_collapsed ~ reg...
plot1 <- function() { data<-read.csv(file="household_power_consumption.txt", sep=";", colClasses="character") data<-data[which(data[,1] %in% c("1/2/2007","2/2/2007")),] data$Global_active_power <-as.numeric(data$Global_active_power) png(filename="plot1.png", width = 480, height = 480) hist(data$Global_active...
/plot1.R
no_license
KaiSchlolaut/ExData_Plotting1
R
false
false
446
r
plot1 <- function() { data<-read.csv(file="household_power_consumption.txt", sep=";", colClasses="character") data<-data[which(data[,1] %in% c("1/2/2007","2/2/2007")),] data$Global_active_power <-as.numeric(data$Global_active_power) png(filename="plot1.png", width = 480, height = 480) hist(data$Global_active...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \name{ranges.test} \alias{ranges.test} \title{The test ranges} \usage{ ranges.test() } \description{ The test ranges }
/man/ranges.test.Rd
no_license
JohnReid/Saturn
R
false
true
205
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \name{ranges.test} \alias{ranges.test} \title{The test ranges} \usage{ ranges.test() } \description{ The test ranges }
# Copyright 2018 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
/R/04_output.R
permissive
snowdj/nbcclim
R
false
false
692
r
# Copyright 2018 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
## ## Function for critical values of ur.sp ## .spcv <- function(obs, type, pol.deg, signif){ obs.ranges <- c(25, 50, 100, 200, 500, 1000, 1e30) dim.1 <- which(obs.ranges >= obs, arr.ind=TRUE)[1] signif.val <- c(0.01, 0.05, 0.1) dim.2 <- which(signif==signif.val, arr.ind=TRUE) dim.3 <- pol.deg if(t...
/R/internal.R
no_license
cran/urca
R
false
false
1,629
r
## ## Function for critical values of ur.sp ## .spcv <- function(obs, type, pol.deg, signif){ obs.ranges <- c(25, 50, 100, 200, 500, 1000, 1e30) dim.1 <- which(obs.ranges >= obs, arr.ind=TRUE)[1] signif.val <- c(0.01, 0.05, 0.1) dim.2 <- which(signif==signif.val, arr.ind=TRUE) dim.3 <- pol.deg if(t...
#' Using a dataframe specific column to plot a pie figure #' #' @param data a dataframe or tibble #' @param ncol specific column, factor #' #' @return a figure as ggplot2 object #' @export #' #' @examples #' my_pie(mtcars,ncol=2) #' my_pie(diamonds,ncol=3) #' my_pie(diamonds,ncol=3)+guides(fill="none") #' my_pie <- fun...
/rmytools/.Rproj.user/2A551E2D/sources/s-5E9F76BE/C4ED3F13-contents
no_license
pjx1990/my_rpackage
R
false
false
1,065
#' Using a dataframe specific column to plot a pie figure #' #' @param data a dataframe or tibble #' @param ncol specific column, factor #' #' @return a figure as ggplot2 object #' @export #' #' @examples #' my_pie(mtcars,ncol=2) #' my_pie(diamonds,ncol=3) #' my_pie(diamonds,ncol=3)+guides(fill="none") #' my_pie <- fun...
######################################################### #### ANXIOUS-MISERY (MOOD) BY SEX BY AGE INTERACTION #### ######################################################### #Load data data.JAC <- readRDS("/data/jux/BBL/projects/pncT1AcrossDisorder/subjectData/n1394_T1_subjData.rds") #Load library library(mgcv) #Get...
/GamAnalyses_T1Bifactors_volNMF_mood_sex_age.R
no_license
PennLINC/KaczkurkinPark_BifactorStructure
R
false
false
1,765
r
######################################################### #### ANXIOUS-MISERY (MOOD) BY SEX BY AGE INTERACTION #### ######################################################### #Load data data.JAC <- readRDS("/data/jux/BBL/projects/pncT1AcrossDisorder/subjectData/n1394_T1_subjData.rds") #Load library library(mgcv) #Get...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gen-namespace-docs.R, % R/gen-namespace-examples.R \name{torch_conv_transpose2d} \alias{torch_conv_transpose2d} \title{Conv_transpose2d} \arguments{ \item{input}{NA input tensor of shape \eqn{(\mbox{minibatch} , \mbox{in\_channels} , iH , i...
/man/torch_conv_transpose2d.Rd
permissive
minghao2016/torch
R
false
true
1,921
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gen-namespace-docs.R, % R/gen-namespace-examples.R \name{torch_conv_transpose2d} \alias{torch_conv_transpose2d} \title{Conv_transpose2d} \arguments{ \item{input}{NA input tensor of shape \eqn{(\mbox{minibatch} , \mbox{in\_channels} , iH , i...
# AHP参考:https://www.slideshare.net/soultoru/rahp # AHPのパッケージの読み込み # http://aoki2.si.gunma-u.ac.jp/R/AHP.html:ここを参考に source("http://aoki2.si.gunma-u.ac.jp/R/src/AHP.R", encoding="euc-jp") # 一対比較の結果 # xは効果・費用対効果・実現可能性の一対比較評価結果 x<-c(1/3,5,5) # yは効果・費用対効果・実現可能性それぞれの現状維持,対策案1,2,3の一対比較評価結果 y1<-c(7,1/3,5,1/7,1/3,5...
/AHP.R
no_license
hwpwk/study1
R
false
false
828
r
# AHP参考:https://www.slideshare.net/soultoru/rahp # AHPのパッケージの読み込み # http://aoki2.si.gunma-u.ac.jp/R/AHP.html:ここを参考に source("http://aoki2.si.gunma-u.ac.jp/R/src/AHP.R", encoding="euc-jp") # 一対比較の結果 # xは効果・費用対効果・実現可能性の一対比較評価結果 x<-c(1/3,5,5) # yは効果・費用対効果・実現可能性それぞれの現状維持,対策案1,2,3の一対比較評価結果 y1<-c(7,1/3,5,1/7,1/3,5...
library(httr) library(xml2) library(googlesheets) extracted_data_nrows <- 1 load("last_id.RData") ##last_id <- 0 extracted_data_to_upload <- data.frame(matrix(ncol = 9, nrow = 0)) colnames(extracted_data_to_upload) <-c('PhotoId', 'ClientCode', ...
/Repsly_api_parser.R
no_license
dstyazhkin/hors_test_task
R
false
false
2,825
r
library(httr) library(xml2) library(googlesheets) extracted_data_nrows <- 1 load("last_id.RData") ##last_id <- 0 extracted_data_to_upload <- data.frame(matrix(ncol = 9, nrow = 0)) colnames(extracted_data_to_upload) <-c('PhotoId', 'ClientCode', ...
/surveillance/man/abattoir.Rd
no_license
albrizre/spatstat.revdep
R
false
false
865
rd
\name{schoolgrowth} \alias{schoolgrowth} \title{Smoothing School-Level Growth Measures Using Empirical Best Linear Prediction} \description{Uses student-level growth scores for particular years, grades and subjects to compute direct estimates, and empirical best linear predictors (EBLPs), of specified school-leve...
/man/schoolgrowth.Rd
no_license
parthsarin/schoolgrowth
R
false
false
29,527
rd
\name{schoolgrowth} \alias{schoolgrowth} \title{Smoothing School-Level Growth Measures Using Empirical Best Linear Prediction} \description{Uses student-level growth scores for particular years, grades and subjects to compute direct estimates, and empirical best linear predictors (EBLPs), of specified school-leve...
test_that("Arnold returns expected results", { suppressMessages(vcr::use_cassette("arnold", { one_result <- suppressMessages( .standardize_arnold("qualitative research", "2020-01-02", "2020-01-03", FALSE)) expect_equal("136154", one_result$id) })) })
/tests/testthat/test-arnold.R
permissive
zbj-ropensci-reviews/awardFindR
R
false
false
295
r
test_that("Arnold returns expected results", { suppressMessages(vcr::use_cassette("arnold", { one_result <- suppressMessages( .standardize_arnold("qualitative research", "2020-01-02", "2020-01-03", FALSE)) expect_equal("136154", one_result$id) })) })
## Getting full dataset ## setwd("E:\\Coursera\\4. Exploratory Data Analysis\\Project 1") data_full <- read.csv(".\\household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="...
/plot1.R
no_license
mahimakhot/ExData_Plotting1
R
false
false
845
r
## Getting full dataset ## setwd("E:\\Coursera\\4. Exploratory Data Analysis\\Project 1") data_full <- read.csv(".\\household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="...
context("Build README") test_that("Package readme can be built ", { destination <- file.path("testReadme", "README.md") on.exit(unlink(c("testReadme/README.md", "testReadme/README.html", "testReadme/man/figures"), recursive = TRUE)) build_readme("testReadme") expect_true(file.exists(destination)) })
/data/genthat_extracted_code/devtools/tests/test-build-readme.R
no_license
surayaaramli/typeRrh
R
false
false
313
r
context("Build README") test_that("Package readme can be built ", { destination <- file.path("testReadme", "README.md") on.exit(unlink(c("testReadme/README.md", "testReadme/README.html", "testReadme/man/figures"), recursive = TRUE)) build_readme("testReadme") expect_true(file.exists(destination)) })
/sucesohi_tipomuerte_barras.R
permissive
AdrianGonzalezDS/bookdown-demo-master
R
false
false
5,057
r
server <- function(input, output, session) { one_tailed <- eventReactive(input$run, { input$one_tailed }) output$tests <- renderUI({ print("Print document content:") print(input$body_text) text <- input$body_text if (is.null(text)) { html <- NULL } else if (text == ""...
/server.R
permissive
WillemSleegers/statcheck-word
R
false
false
2,888
r
server <- function(input, output, session) { one_tailed <- eventReactive(input$run, { input$one_tailed }) output$tests <- renderUI({ print("Print document content:") print(input$body_text) text <- input$body_text if (is.null(text)) { html <- NULL } else if (text == ""...
#' @importFrom dplyr distinct filter #' @importFrom shiny isTruthy #' @importFrom rlang .data #' set_analyses <- function(dataset, data_group, dat) { ## Filter by dataset. # Start with phenotypes in data groups. if(shiny::isTruthy(data_group)) { dat <- dplyr::filter(dat, .data$pheno_group %in% data_group) ...
/R/set_analyses.R
no_license
byandell/qtl2shiny
R
false
false
851
r
#' @importFrom dplyr distinct filter #' @importFrom shiny isTruthy #' @importFrom rlang .data #' set_analyses <- function(dataset, data_group, dat) { ## Filter by dataset. # Start with phenotypes in data groups. if(shiny::isTruthy(data_group)) { dat <- dplyr::filter(dat, .data$pheno_group %in% data_group) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/head_tail.R \name{head.uts} \alias{head.uts} \alias{tail.uts} \title{Return the First or Last Part} \usage{ \method{head}{uts}(x, n = 6L, ...) \method{tail}{uts}(x, n = 6L, ...) } \arguments{ \item{x}{a \code{"uts"} object.} \item{n}{a sing...
/man/head.uts.Rd
no_license
andreas50/uts
R
false
true
1,326
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/head_tail.R \name{head.uts} \alias{head.uts} \alias{tail.uts} \title{Return the First or Last Part} \usage{ \method{head}{uts}(x, n = 6L, ...) \method{tail}{uts}(x, n = 6L, ...) } \arguments{ \item{x}{a \code{"uts"} object.} \item{n}{a sing...
source("incl/start.R") plan(batchjobs_local) ## CRAN processing times: ## On Windows 32-bit, don't run these tests if (!fullTest && isWin32) plan(sequential) oopts <- c(oopts, options( future.globals.resolve=TRUE, future.globals.onMissing="error" )) message("*** Globals - subassignments ...") message("*** Glo...
/data/genthat_extracted_code/future.BatchJobs/tests/globals,subassignment.R
no_license
surayaaramli/typeRrh
R
false
false
1,846
r
source("incl/start.R") plan(batchjobs_local) ## CRAN processing times: ## On Windows 32-bit, don't run these tests if (!fullTest && isWin32) plan(sequential) oopts <- c(oopts, options( future.globals.resolve=TRUE, future.globals.onMissing="error" )) message("*** Globals - subassignments ...") message("*** Glo...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/groups.R \docType{data} \name{groups} \alias{groups} \title{Group indices for explanatory variables} \format{ A vector consisting of 466 integer values. } \usage{ groups } \description{ A vector of integers which assigns each variable (genoty...
/man/groups.Rd
no_license
cran/seagull
R
false
true
1,118
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/groups.R \docType{data} \name{groups} \alias{groups} \title{Group indices for explanatory variables} \format{ A vector consisting of 466 integer values. } \usage{ groups } \description{ A vector of integers which assigns each variable (genoty...
predict.mnp <- function(object, newdata = NULL, newdraw = NULL, n.draws = 1, type = c("prob", "choice", "order"), verbose = FALSE, ...){ if (NA %in% match(type, c("prob", "choice", "order"))) stop("Invalid input for `type'.") if (n.draws < 1) stop("Invalid in...
/MNP/R/predict.mnp.R
no_license
ingted/R-Examples
R
false
false
2,760
r
predict.mnp <- function(object, newdata = NULL, newdraw = NULL, n.draws = 1, type = c("prob", "choice", "order"), verbose = FALSE, ...){ if (NA %in% match(type, c("prob", "choice", "order"))) stop("Invalid input for `type'.") if (n.draws < 1) stop("Invalid in...
install.packages("tidyverse") install.packages("ggmap") library(tidyverse) library(ggmap) college <- read_csv("E:/LinkedIN learning/Ex_Files_Data_Visualization_R_ggplot2/college.csv") summary(college) college <- college %>% mutate(state=as.factor(state), region=as.factor(region), highest_degree=as.factor(h...
/Practice_codes.R
no_license
saikatds-bd/LinkedIN-Visualization
R
false
false
9,157
r
install.packages("tidyverse") install.packages("ggmap") library(tidyverse) library(ggmap) college <- read_csv("E:/LinkedIN learning/Ex_Files_Data_Visualization_R_ggplot2/college.csv") summary(college) college <- college %>% mutate(state=as.factor(state), region=as.factor(region), highest_degree=as.factor(h...
#' Get MERMAID project sites #' #' Get sites for specified MERMAID project(s). Returns metadata on sites, including site ID and name, notes, latitude and longitude, country, reef type and zone, exposure, and when the site was created and last updated. Requires authorization. #' #' @inheritParams get_project_endpoint #'...
/R/mermaid_get_project_sites.R
permissive
data-mermaid/mermaidr
R
false
false
853
r
#' Get MERMAID project sites #' #' Get sites for specified MERMAID project(s). Returns metadata on sites, including site ID and name, notes, latitude and longitude, country, reef type and zone, exposure, and when the site was created and last updated. Requires authorization. #' #' @inheritParams get_project_endpoint #'...
# makeCacheMatrix creates a list containing a function to # 1. set the value of the matrix # 2. get the value of the matrix # 3. set the value of inverse of the matrix # 4. get the value of inverse of the matrix makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y ...
/cachematrix.R
no_license
devashishmore/ProgrammingAssignment2
R
false
false
1,061
r
# makeCacheMatrix creates a list containing a function to # 1. set the value of the matrix # 2. get the value of the matrix # 3. set the value of inverse of the matrix # 4. get the value of inverse of the matrix makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y ...
#' A function to summarise the computation region, vectors and rasters in the mapset. #' @description This function takes no inputs. It prints a list of data sets in the current GRASS mapset, as well as the parameters of the current computation region. #' @return Nothing. #' @examples #' if(check_running()) vibe_c...
/R/vibe_check.R
no_license
cran/rdwplus
R
false
false
885
r
#' A function to summarise the computation region, vectors and rasters in the mapset. #' @description This function takes no inputs. It prints a list of data sets in the current GRASS mapset, as well as the parameters of the current computation region. #' @return Nothing. #' @examples #' if(check_running()) vibe_c...
d<-read.table("household_power_consumption.txt",sep=";",header=TRUE) d$Date<-strptime(d$Date, "%d/%m/%Y") i<-(as.Date(d$Date) >= as.Date("2007-02-01") & as.Date(d$Date) <= as.Date("2007-02-02")) data<-d[i,] s<-paste(as.character(data$Date), data$Time) t<-strptime(s, "%Y-%m-%d %H:%M:%S") library(ggplot2) png("plot4.pn...
/plot4.R
no_license
achilleswu/ExData_Plotting1
R
false
false
894
r
d<-read.table("household_power_consumption.txt",sep=";",header=TRUE) d$Date<-strptime(d$Date, "%d/%m/%Y") i<-(as.Date(d$Date) >= as.Date("2007-02-01") & as.Date(d$Date) <= as.Date("2007-02-02")) data<-d[i,] s<-paste(as.character(data$Date), data$Time) t<-strptime(s, "%Y-%m-%d %H:%M:%S") library(ggplot2) png("plot4.pn...
#' Simulate NOC Observations from a Single-State or Multi-State Process #' #' @description This function generates data under normal operating conditions #' from a single-state or multi-state process model. #' #' @param startTime a POSIXct object specifying the day and time for the #' starting observation. #' @para...
/R/processNOCdata.R
no_license
gabrielodom/mvMonitoring
R
false
false
5,826
r
#' Simulate NOC Observations from a Single-State or Multi-State Process #' #' @description This function generates data under normal operating conditions #' from a single-state or multi-state process model. #' #' @param startTime a POSIXct object specifying the day and time for the #' starting observation. #' @para...
`.scope` <- function(enviroTrain, Smoother, degree) { XXX <- enviroTrain deg <- degree vnames <- names(XXX[]) step.list <- as.list(vnames) names(step.list) <- vnames NbVar <- dim(enviroTrain)[2] i <- 1 while(i <= NbVar) { vname <- names(XXX)[i] # loops through independent...
/biomod2_brisca_version/biomod2/R/scope.R
no_license
DamienGeorges/briscahub
R
false
false
1,936
r
`.scope` <- function(enviroTrain, Smoother, degree) { XXX <- enviroTrain deg <- degree vnames <- names(XXX[]) step.list <- as.list(vnames) names(step.list) <- vnames NbVar <- dim(enviroTrain)[2] i <- 1 while(i <= NbVar) { vname <- names(XXX)[i] # loops through independent...
## Importing packages # This R environment comes with all of CRAN and many other helpful packages preinstalled. # You can see which packages are installed by checking out the kaggle/rstats docker image: # https://github.com/kaggle/docker-rstats library(tidyverse) # metapackage with lots of helpful functions ## Run...
/r/kernels/baky0905-titanic-competition/script/titanic-competition.r
no_license
helenaK/trustworthy-titanic
R
false
false
2,102
r
## Importing packages # This R environment comes with all of CRAN and many other helpful packages preinstalled. # You can see which packages are installed by checking out the kaggle/rstats docker image: # https://github.com/kaggle/docker-rstats library(tidyverse) # metapackage with lots of helpful functions ## Run...
% Generated by roxygen2 (4.1.0.9001): do not edit by hand % Please edit documentation in R/gwidgets-methods.R \name{update.GComponent} \alias{update.GComponent} \title{method for update} \usage{ \method{update}{GComponent}(object, ...) } \arguments{ \item{object}{object} \item{...}{passed along} } \description{ method...
/man/update.GComponent.Rd
no_license
tokareff/gWidgetsWWW2
R
false
false
335
rd
% Generated by roxygen2 (4.1.0.9001): do not edit by hand % Please edit documentation in R/gwidgets-methods.R \name{update.GComponent} \alias{update.GComponent} \title{method for update} \usage{ \method{update}{GComponent}(object, ...) } \arguments{ \item{object}{object} \item{...}{passed along} } \description{ method...
if(!require("pcacman")){install.packages("pacman"); library(pacman)} p_load(readxl, stringr, tidyr, dplyr, ggplot) acs_bike_big <- read_excel("Data/ACS/supplemental-table3 (1).xlsx", skip = 5) %>% mutate(type="Big") acs_bike_median <- read_excel("Data/ACS/supplemental-table2 (1).xlsx", skip = 5) %>% mutate(type="Mid"...
/src/acs_data.R
no_license
shiweipsu/Dissertation_Bicycle-Network-Repo
R
false
false
2,087
r
if(!require("pcacman")){install.packages("pacman"); library(pacman)} p_load(readxl, stringr, tidyr, dplyr, ggplot) acs_bike_big <- read_excel("Data/ACS/supplemental-table3 (1).xlsx", skip = 5) %>% mutate(type="Big") acs_bike_median <- read_excel("Data/ACS/supplemental-table2 (1).xlsx", skip = 5) %>% mutate(type="Mid"...
times = 10 data<-rep(times, 0) for(j in 1:times) { nums = rexp(30, 1.5) data[j] = mean(nums) hist(data, main = paste("exponential sampling with 10 repeats:", j), plot = T,col = "red", prob = T) curve(dnorm(x, mean = 1/1.5, sd= 1/sqrt(1.5*1.5*30)), col="blue", lwd=2, add=T) Sys.sleep(0.07) }
/2/2(a).R
no_license
amirhossein-alizad/EPS-using-R
R
false
false
310
r
times = 10 data<-rep(times, 0) for(j in 1:times) { nums = rexp(30, 1.5) data[j] = mean(nums) hist(data, main = paste("exponential sampling with 10 repeats:", j), plot = T,col = "red", prob = T) curve(dnorm(x, mean = 1/1.5, sd= 1/sqrt(1.5*1.5*30)), col="blue", lwd=2, add=T) Sys.sleep(0.07) }
### ### Remember to build the package first, so the tests get copied to the package directory. ### rm(list=ls(all=TRUE)) #Clear all the variables before starting a new run. require(testthat) require(devtools) #directoryTests <- file.path(devtools::inst("REDCapR"), "tests/testthat") directoryTests <- file.path(devtoo...
/tests/testthat/master-test-runner.R
no_license
gjmerrin/TabularManifest
R
false
false
679
r
### ### Remember to build the package first, so the tests get copied to the package directory. ### rm(list=ls(all=TRUE)) #Clear all the variables before starting a new run. require(testthat) require(devtools) #directoryTests <- file.path(devtools::inst("REDCapR"), "tests/testthat") directoryTests <- file.path(devtoo...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pk_1cmt_t12.R \name{pk_1cmt_t12} \alias{pk_1cmt_t12} \title{Calculate terminal half-life for 1-compartment model} \usage{ pk_1cmt_t12(CL = 3, V = 30) } \arguments{ \item{CL}{clearance} \item{V}{volume of central compartment} } \description{ ...
/man/pk_1cmt_t12.Rd
permissive
gimme00/PKmisc
R
false
true
375
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pk_1cmt_t12.R \name{pk_1cmt_t12} \alias{pk_1cmt_t12} \title{Calculate terminal half-life for 1-compartment model} \usage{ pk_1cmt_t12(CL = 3, V = 30) } \arguments{ \item{CL}{clearance} \item{V}{volume of central compartment} } \description{ ...
my.html.table = function(df,id="mytab", sel.row=NULL, col.names=TRUE, row.names=FALSE, border=TRUE, bg.color =c("#dddddd","#ffffff"), font.size="80%", round.digits=8, signif.digits=8,col.tooltips=NULL, tr.id = paste0(id,"_tr_",seq_len(NROW(df))), ...) { restore.point("html.table") n = NROW(df) #bg.color =c("#ed...
/R/htmltable.R
no_license
AlexRieber/RTutorSAGI
R
false
false
2,806
r
my.html.table = function(df,id="mytab", sel.row=NULL, col.names=TRUE, row.names=FALSE, border=TRUE, bg.color =c("#dddddd","#ffffff"), font.size="80%", round.digits=8, signif.digits=8,col.tooltips=NULL, tr.id = paste0(id,"_tr_",seq_len(NROW(df))), ...) { restore.point("html.table") n = NROW(df) #bg.color =c("#ed...
print.epMCA.inference.battery <- function (x,...) { res.epMCA.inference.battery <- x if (!inherits(res.epMCA.inference.battery, "epMCA.inference.battery")) stop ("no convenient data") cat("**Results for Multiple Correspondence Analysis**\n") cat ("Permutation was performed on ", ncol(res.epMCA.inference.batter...
/InPosition/R/print.epMCA.inference.battery.R
no_license
LukeMoraglia/ExPosition1
R
false
false
937
r
print.epMCA.inference.battery <- function (x,...) { res.epMCA.inference.battery <- x if (!inherits(res.epMCA.inference.battery, "epMCA.inference.battery")) stop ("no convenient data") cat("**Results for Multiple Correspondence Analysis**\n") cat ("Permutation was performed on ", ncol(res.epMCA.inference.batter...
library(hyperSpec) ### Name: chondro ### Title: Raman spectra of 2 Chondrocytes in Cartilage A Raman-map ### (laterally resolved Raman spectra) of chondrocytes in cartilage. ### Aliases: chondro ### Keywords: datasets ### ** Examples chondro ## do baseline correction baselines <- spc.fit.poly.below (chondro) c...
/data/genthat_extracted_code/hyperSpec/examples/chondro.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
926
r
library(hyperSpec) ### Name: chondro ### Title: Raman spectra of 2 Chondrocytes in Cartilage A Raman-map ### (laterally resolved Raman spectra) of chondrocytes in cartilage. ### Aliases: chondro ### Keywords: datasets ### ** Examples chondro ## do baseline correction baselines <- spc.fit.poly.below (chondro) c...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/expect-sql.R \name{expect_sql} \alias{expect_sql} \title{Detect if a specific SQL statement is sent} \usage{ expect_sql(object, regexp = NULL, ...) } \arguments{ \item{object}{the expression to evaluate} \item{regexp}{the statement to match}...
/man/expect_sql.Rd
permissive
jimsforks/dittodb
R
false
true
1,566
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/expect-sql.R \name{expect_sql} \alias{expect_sql} \title{Detect if a specific SQL statement is sent} \usage{ expect_sql(object, regexp = NULL, ...) } \arguments{ \item{object}{the expression to evaluate} \item{regexp}{the statement to match}...
#Updates in last week total_updates_last_week_query_definition <- 'PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT (count(*) as ?count) WHERE { ?obs <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/linked-data/cube#DataSet>. ?obs <http://www.w3.org/2000/01/rdf-schema#label> ?Name. OPTI...
/SparqlQueries/totalUpdatesLastWeekQueryDefinition.R
no_license
sinclr4/DataHoles
R
false
false
439
r
#Updates in last week total_updates_last_week_query_definition <- 'PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT (count(*) as ?count) WHERE { ?obs <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/linked-data/cube#DataSet>. ?obs <http://www.w3.org/2000/01/rdf-schema#label> ?Name. OPTI...
/R-source/PlusBullet.R
no_license
mizma2k/FX-Git
R
false
false
9,945
r
testlist <- list(a = 1.02706466752804e-315, b = 0) result <- do.call(BayesMRA::rmvn_arma_scalar,testlist) str(result)
/BayesMRA/inst/testfiles/rmvn_arma_scalar/AFL_rmvn_arma_scalar/rmvn_arma_scalar_valgrind_files/1615926760-test.R
no_license
akhikolla/updatedatatype-list1
R
false
false
117
r
testlist <- list(a = 1.02706466752804e-315, b = 0) result <- do.call(BayesMRA::rmvn_arma_scalar,testlist) str(result)
consumer_survey <- read.csv("consumer-survey.csv") head(consumer_survey) myData <- consumer_survey myData[is.na(myData)]=0 summary(myData) ncol(myData) myData$MILES <- NULL myData$HYP_TYPE <- NULL myData$TIME <- NULL myData$Q_1B10 <- NULL myData$Q_2BCL <- NULL myData$Q_2BCNO <- NULL summary(myData) head(myData) myDat...
/ARMonCustomer.R
no_license
abhi117a/R
R
false
false
617
r
consumer_survey <- read.csv("consumer-survey.csv") head(consumer_survey) myData <- consumer_survey myData[is.na(myData)]=0 summary(myData) ncol(myData) myData$MILES <- NULL myData$HYP_TYPE <- NULL myData$TIME <- NULL myData$Q_1B10 <- NULL myData$Q_2BCL <- NULL myData$Q_2BCNO <- NULL summary(myData) head(myData) myDat...
#Load library library(plyr) ## This first line will likely take a few seconds. Be patient! NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") #create png file png(filename = "plot2.png", width = 480, height = 480, units = "px") #plot the graph with( ddply(filte...
/plot2.R
no_license
dushyantlad/ExDataAna_Prj2
R
false
false
455
r
#Load library library(plyr) ## This first line will likely take a few seconds. Be patient! NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") #create png file png(filename = "plot2.png", width = 480, height = 480, units = "px") #plot the graph with( ddply(filte...
setwd("C:/Users/Admin/Desktop/Data science Coursera/coursera data files/Exploratory data peer graded assignment") file.list <- list.files(path = getwd(),pattern = ".txt",full.names = TRUE) data <- read.table(file.list,sep = ";",stringsAsFactors = FALSE,dec = ".",header = TRUE) datasubset <- data[data$Date %in% c("1/...
/plot 3.R
no_license
anupam503/ExData_Plotting1
R
false
false
1,021
r
setwd("C:/Users/Admin/Desktop/Data science Coursera/coursera data files/Exploratory data peer graded assignment") file.list <- list.files(path = getwd(),pattern = ".txt",full.names = TRUE) data <- read.table(file.list,sep = ";",stringsAsFactors = FALSE,dec = ".",header = TRUE) datasubset <- data[data$Date %in% c("1/...
##Loading the data power <- read.table("household_power_consumption.txt",header=TRUE,sep=";") ###subseting data to reduce performance hindrance power_subset <- subset(power,power$Date == "1/2/2007" | power$Date == "2/2/2007") ## histogram to show Global_active_power versus frequency graph hist(as.numeric(as....
/plot1.R
no_license
shamameerja/ExData_Plotting1
R
false
false
572
r
##Loading the data power <- read.table("household_power_consumption.txt",header=TRUE,sep=";") ###subseting data to reduce performance hindrance power_subset <- subset(power,power$Date == "1/2/2007" | power$Date == "2/2/2007") ## histogram to show Global_active_power versus frequency graph hist(as.numeric(as....
\name{stat_sum_single1} \title{Internal MAc objects} \alias{ stat_sum_single1} \description{Internal MAc objects.} \details{These are not to be called by the user.} \keyword{internal}
/man/stat_sum_single1.Rd
no_license
cran/MAc
R
false
false
194
rd
\name{stat_sum_single1} \title{Internal MAc objects} \alias{ stat_sum_single1} \description{Internal MAc objects.} \details{These are not to be called by the user.} \keyword{internal}
library(condor) source('Step_0_init.R') # generate condor files for all the scenarios scenarios <- expand.grid( TYPE=c('wald'), #TYPE=c('wald','waldxm30','waldxmm','waldxp80'), MISSING=c('mcar','mar1','mar2','mar3','mar4','mar5','mar6','mnar1','mnar2'), PERCENT=sprintf('%02d',seq(5,25,5)) ,stringsAsFactors ...
/Step3_5_mice/RUNStep_3_5_MICEWald.R
no_license
yuliasidi/Binomial_PE_Progs
R
false
false
3,396
r
library(condor) source('Step_0_init.R') # generate condor files for all the scenarios scenarios <- expand.grid( TYPE=c('wald'), #TYPE=c('wald','waldxm30','waldxmm','waldxp80'), MISSING=c('mcar','mar1','mar2','mar3','mar4','mar5','mar6','mnar1','mnar2'), PERCENT=sprintf('%02d',seq(5,25,5)) ,stringsAsFactors ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/afex-package.R \docType{package} \name{afex-package} \alias{afex} \alias{afex-package} \title{\packageTitle{afex} Maintainer: \packageMaintainer{afex}} \description{ \packageDescription{afex} } \details{ The DESCRIPTION file: \packageDESCRIP...
/man/afex-package.Rd
no_license
lnsongxf/afex
R
false
true
1,047
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/afex-package.R \docType{package} \name{afex-package} \alias{afex} \alias{afex-package} \title{\packageTitle{afex} Maintainer: \packageMaintainer{afex}} \description{ \packageDescription{afex} } \details{ The DESCRIPTION file: \packageDESCRIP...
#' Import transcript-level abundances and counts #' for transcript- and gene-level analysis packages #' #' \code{tximport} imports transcript-level estimates from various #' external software and optionally summarizes abundances, counts, #' and transcript lengths #' to the gene-level (default) or outputs transcript-lev...
/R/tximport.R
no_license
jiawu/tximport
R
false
false
22,666
r
#' Import transcript-level abundances and counts #' for transcript- and gene-level analysis packages #' #' \code{tximport} imports transcript-level estimates from various #' external software and optionally summarizes abundances, counts, #' and transcript lengths #' to the gene-level (default) or outputs transcript-lev...
yield.dollar = function(cf, times, start, end, endtime){ all=list(cf,times,start,end,endtime) #NULL if(any(lapply(all,is.null)==T)) stop("Cannot input any variables as NULL.") #Length one=list(start,end,endtime) if(any(lapply(one,length)!= 1)) stop("start, end, and endtime must be of length 1.") ...
/R/yield.dollar.R
no_license
IanMadlenya/FinancialMath
R
false
false
1,502
r
yield.dollar = function(cf, times, start, end, endtime){ all=list(cf,times,start,end,endtime) #NULL if(any(lapply(all,is.null)==T)) stop("Cannot input any variables as NULL.") #Length one=list(start,end,endtime) if(any(lapply(one,length)!= 1)) stop("start, end, and endtime must be of length 1.") ...