content
large_stringlengths
0
6.46M
path
large_stringlengths
3
331
license_type
large_stringclasses
2 values
repo_name
large_stringlengths
5
125
language
large_stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
4
6.46M
extension
large_stringclasses
75 values
text
stringlengths
0
6.46M
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_histogram.R \name{plot_histogram} \alias{plot_histogram} \title{Plot histogram} \usage{ plot_histogram(x, freq = TRUE, breaks = "Sturges", y_buffer = 0.05, ylim = NULL, xlim = NULL, main = "", col = "lightgrey", bty = "o", add = FALS...
/man/plot_histogram.Rd
no_license
agruss2/utilities
R
false
true
2,192
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_histogram.R \name{plot_histogram} \alias{plot_histogram} \title{Plot histogram} \usage{ plot_histogram(x, freq = TRUE, breaks = "Sturges", y_buffer = 0.05, ylim = NULL, xlim = NULL, main = "", col = "lightgrey", bty = "o", add = FALS...
library("party") ##library with decision tree library("e1071") ##library with naive bayes source("treshold_prediction.r") bayesPrediction = function(data_build, data_testing) { bayes = naiveBayes(as.factor(party_changed) ~ own_dst + own_mode_dst + ...
/prediction_models.r
no_license
fiedukow/SejMOWaKlasyfikacja
R
false
false
4,086
r
library("party") ##library with decision tree library("e1071") ##library with naive bayes source("treshold_prediction.r") bayesPrediction = function(data_build, data_testing) { bayes = naiveBayes(as.factor(party_changed) ~ own_dst + own_mode_dst + ...
context("Departure of an indicator from the best performer") # debug( ) test_that("Indicator highBest", { testTB <- dplyr::tribble( ~time, ~countryA , ~countryB, ~countryC, 2000, 0.8, 2.7, 3.9, 2001, 1.2, 3.2, 4.2, 2002, 0.9, 2.9, 0.1, 2003, 1.3, 2.9, 1.0...
/tests/testthat/test_departure_best.R
no_license
cran/convergEU
R
false
false
1,688
r
context("Departure of an indicator from the best performer") # debug( ) test_that("Indicator highBest", { testTB <- dplyr::tribble( ~time, ~countryA , ~countryB, ~countryC, 2000, 0.8, 2.7, 3.9, 2001, 1.2, 3.2, 4.2, 2002, 0.9, 2.9, 0.1, 2003, 1.3, 2.9, 1.0...
library(dplyr, warn.conflicts = F, quietly = T) source('dt_sim.R') #weights related functions source('funs/weight_define_each.R') source('funs/fun_a.R') source('funs/fun_b.R') source('funs/assign_weights.R') source('funs/pvf_apply.R') source('funs/pvf.R') source('funs/mi_weights.R') #assume that PE weights are affe...
/pgms_sim/mcda_c3_sc2_pmiss80_normTRUE.R
no_license
yuliasidi/ch3sim
R
false
false
3,998
r
library(dplyr, warn.conflicts = F, quietly = T) source('dt_sim.R') #weights related functions source('funs/weight_define_each.R') source('funs/fun_a.R') source('funs/fun_b.R') source('funs/assign_weights.R') source('funs/pvf_apply.R') source('funs/pvf.R') source('funs/mi_weights.R') #assume that PE weights are affe...
## Put comments here that give an overall description of what your ## functions do ## Function makeCacheMatrix creates a special matrix object that ## can cache its invers in order to reduce the computation. ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { mat <-...
/cachematrix.R
no_license
VishalAmbavade/ProgrammingAssignment2
R
false
false
1,108
r
## Put comments here that give an overall description of what your ## functions do ## Function makeCacheMatrix creates a special matrix object that ## can cache its invers in order to reduce the computation. ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { mat <-...
# ============================================================================== # Functions for managing STYLES and retrieving general lists of properties # relevant to multiple style modes. Functions specific to Default, Mapping, # Bypass, Dependencies and Values are in separate files. # # I. Style management functi...
/R/Styles.R
permissive
cytoscape/RCy3
R
false
false
16,831
r
# ============================================================================== # Functions for managing STYLES and retrieving general lists of properties # relevant to multiple style modes. Functions specific to Default, Mapping, # Bypass, Dependencies and Values are in separate files. # # I. Style management functi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/slacks.R \name{slacks} \alias{slacks} \title{Slacks} \usage{ slacks(deasol) } \arguments{ \item{deasol}{Object of class \code{dea} or \code{dea_fuzzy} obtained with some of the DEA model functions.} } \description{ Extract the slacks of the D...
/man/slacks.Rd
no_license
cran/deaR
R
false
true
1,056
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/slacks.R \name{slacks} \alias{slacks} \title{Slacks} \usage{ slacks(deasol) } \arguments{ \item{deasol}{Object of class \code{dea} or \code{dea_fuzzy} obtained with some of the DEA model functions.} } \description{ Extract the slacks of the D...
######################################################################################################## ######################################################################################################## # # Naive Time Series Forecasting (Average of Past 5 Years) - Forecasting Results for Youngest Age # #########...
/ForecastR_Phase-3_Release2/R Code/SIMPLESIBREG/Youngest Age - Simple Sibling Regression.r
no_license
avelez-espino/ForecastR_Phase3_Release2
R
false
false
70,195
r
######################################################################################################## ######################################################################################################## # # Naive Time Series Forecasting (Average of Past 5 Years) - Forecasting Results for Youngest Age # #########...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/humanization.R \docType{data} \name{humanization} \alias{humanization} \title{Infrahumanization of outgroups} \format{ A tibble with 321 observations of 7 variables with attributes from SAS. \describe{ \item{age}{Age in years of participant...
/man/humanization.Rd
no_license
TKosfeld/fosdata
R
false
true
2,302
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/humanization.R \docType{data} \name{humanization} \alias{humanization} \title{Infrahumanization of outgroups} \format{ A tibble with 321 observations of 7 variables with attributes from SAS. \describe{ \item{age}{Age in years of participant...
#' d.dep.t.avg #' #' This function displays d for repeated measures data #' and the non-central confidence interval using the #' average standard deviation of each level as the denominator. #' #' @param m1 mean from first level #' @param m2 mean from second level #' @param sd1 standard deviation from first level #' @p...
/R/d.dep.t.avg.R
no_license
adamcohen3/MOTE
R
false
false
2,192
r
#' d.dep.t.avg #' #' This function displays d for repeated measures data #' and the non-central confidence interval using the #' average standard deviation of each level as the denominator. #' #' @param m1 mean from first level #' @param m2 mean from second level #' @param sd1 standard deviation from first level #' @p...
command.arguments <- commandArgs(trailingOnly = TRUE); data.directory <- normalizePath(command.arguments[1]); code.directory <- normalizePath(command.arguments[2]); output.directory <- normalizePath(command.arguments[3]); # add custom library using .libPaths() print( data.directory ); print( code.directory ...
/005-explore-sentinel/code/runall.R
no_license
kennethchu-statcan/nwrc-2020
R
false
false
2,107
r
command.arguments <- commandArgs(trailingOnly = TRUE); data.directory <- normalizePath(command.arguments[1]); code.directory <- normalizePath(command.arguments[2]); output.directory <- normalizePath(command.arguments[3]); # add custom library using .libPaths() print( data.directory ); print( code.directory ...
library(rmarkdown) Sys.setenv(RSTUDIO_PANDOC="C:/Program Files/RStudio/bin/pandoc") setwd("C:/Users/Phil/Documents") rmarkdown::render("Stocks.Rmd", params = list(symbol='IBM'))
/Jobrun.R
no_license
jasongeslois/Job-Scheduling-R-Markdown-Reports-via-R
R
false
false
180
r
library(rmarkdown) Sys.setenv(RSTUDIO_PANDOC="C:/Program Files/RStudio/bin/pandoc") setwd("C:/Users/Phil/Documents") rmarkdown::render("Stocks.Rmd", params = list(symbol='IBM'))
#Useful packages library(ggplot2) library(grid) library(gridExtra) library(stringr) library(tidyr) library(dplyr) library(xtable) library(readxl) library(readr) library(haven) #Functions to help with plotting #use best practices ggplot2 settings theme_set(theme_bw()) #add draft to plots:draft.flag = TRUE or FALSE - i...
/R/xgx_functions_v2.R
no_license
Novartis/xgx
R
false
false
5,314
r
#Useful packages library(ggplot2) library(grid) library(gridExtra) library(stringr) library(tidyr) library(dplyr) library(xtable) library(readxl) library(readr) library(haven) #Functions to help with plotting #use best practices ggplot2 settings theme_set(theme_bw()) #add draft to plots:draft.flag = TRUE or FALSE - i...
getWESqcData <- function(){ samples <- list.dirs(paste0(baseDirWES,"QualityControl/multiQCfiles"),recursive = F,full.names = F) pairedSamples <- samples[sapply(samples,function(x) length(strsplit(x,"_")[[1]])) == 3] singleSamples <- samples[sapply(samples,function(x) length(strsplit(x,"_")[[1]])) == 2] ...
/NGS_functions_QC.R
no_license
lennartkester/NGS_Rtools
R
false
false
57,611
r
getWESqcData <- function(){ samples <- list.dirs(paste0(baseDirWES,"QualityControl/multiQCfiles"),recursive = F,full.names = F) pairedSamples <- samples[sapply(samples,function(x) length(strsplit(x,"_")[[1]])) == 3] singleSamples <- samples[sapply(samples,function(x) length(strsplit(x,"_")[[1]])) == 2] ...
# swap pairs to improve inclusion range for performances swap2 <- function(gp, combinations, av_inclusions, inclusion_tolerance) { min_c <- av_inclusions - inclusion_tolerance max_c <- av_inclusions + inclusion_tolerance sampling <- rle(sort(unlist(gp[ , 1:2]))) # s.f. = sampling frequencies s.f. <- sampli...
/R/swap2.R
no_license
KenBredemeyer/pair.generator
R
false
false
3,055
r
# swap pairs to improve inclusion range for performances swap2 <- function(gp, combinations, av_inclusions, inclusion_tolerance) { min_c <- av_inclusions - inclusion_tolerance max_c <- av_inclusions + inclusion_tolerance sampling <- rle(sort(unlist(gp[ , 1:2]))) # s.f. = sampling frequencies s.f. <- sampli...
source("full_dcsbm.R") source("igraph_recast.R") library(igraph) N <- 300 set.seed(12345) param_list <- make_param_list(N = N) degrees <- rep(20, N) membership <- c(rep(1, 2 * N / 3), rep(2, 1 * N / 6), rep(3, 1 * N / 6)) P <- matrix(0.1, 3, 3) + diag(3) * 0.7 sbm_obj <- DCSBM(param_list, degrees = degrees, membershi...
/make2vs3.R
no_license
jpalowitch/reslimit
R
false
false
678
r
source("full_dcsbm.R") source("igraph_recast.R") library(igraph) N <- 300 set.seed(12345) param_list <- make_param_list(N = N) degrees <- rep(20, N) membership <- c(rep(1, 2 * N / 3), rep(2, 1 * N / 6), rep(3, 1 * N / 6)) P <- matrix(0.1, 3, 3) + diag(3) * 0.7 sbm_obj <- DCSBM(param_list, degrees = degrees, membershi...
# Here are the test scores of 10 students in physics and history: # Physics Scores 15 12 8 8 7 7 7 6 5 3 # History Scores 10 25 17 11 13 17 20 13 9 15 # Compute Karl Pearson’s coefficient of correlation between these scores. # Compute the answer correct to three decimal places. phys <- c(...
/Artificial Intelligence/Correlation and Regression Lines - A Quick Recap #1/main.r
no_license
mudream4869/hackerrank-code
R
false
false
456
r
# Here are the test scores of 10 students in physics and history: # Physics Scores 15 12 8 8 7 7 7 6 5 3 # History Scores 10 25 17 11 13 17 20 13 9 15 # Compute Karl Pearson’s coefficient of correlation between these scores. # Compute the answer correct to three decimal places. phys <- c(...
#' Get records by vernacular name, optional fuzzy matching #' #' @export #' @param name (character) a species common name. required. For #' `wm_records_common` must be `length(name) == 1`; for `wm_records_common_` #' can be `length(name) >= 1` #' @param fuzzy (logical) fuzzy search. default: `FALSE` #' @param of...
/R/wm_records_common.R
permissive
cran/worrms
R
false
false
1,526
r
#' Get records by vernacular name, optional fuzzy matching #' #' @export #' @param name (character) a species common name. required. For #' `wm_records_common` must be `length(name) == 1`; for `wm_records_common_` #' can be `length(name) >= 1` #' @param fuzzy (logical) fuzzy search. default: `FALSE` #' @param of...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RaceID.R \name{compumap} \alias{compumap} \title{Computation of a two dimensional umap representation} \usage{ compumap( object, dimRed = FALSE, n_neighbors = 15, metric = "euclidean", n_epochs = 200, min_dist = 0.1, local_conne...
/man/compumap.Rd
no_license
dgrun/RaceID3_StemID2_package
R
false
true
1,862
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RaceID.R \name{compumap} \alias{compumap} \title{Computation of a two dimensional umap representation} \usage{ compumap( object, dimRed = FALSE, n_neighbors = 15, metric = "euclidean", n_epochs = 200, min_dist = 0.1, local_conne...
library(learnPopGen) ### Name: sexratio ### Title: Hypothetical analysis of frequency dependent selection on a sex ### determining genetic locus ### Aliases: sexratio ### Keywords: population genetics evolutionary theory ### ** Examples sexratio() sexratio(p0=0.001,show="sex-ratio") sexratio(p0=0.001,show="fit...
/data/genthat_extracted_code/learnPopGen/examples/sexratio.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
381
r
library(learnPopGen) ### Name: sexratio ### Title: Hypothetical analysis of frequency dependent selection on a sex ### determining genetic locus ### Aliases: sexratio ### Keywords: population genetics evolutionary theory ### ** Examples sexratio() sexratio(p0=0.001,show="sex-ratio") sexratio(p0=0.001,show="fit...
setwd("C:/Users/Punit/Desktop") # set working directory xtrain<- read.table("X_train.txt") # reading the train data ytrain<- read.table("y_train.txt") # reading the training activity id subtrain<- read.table("subject_train.txt") # reading the training subjects xtest<- read.table("X_test.txt") # reading the test data ...
/run_analysis.R
no_license
punitagrawal32/Getting-and-cleaning-data
R
false
false
2,218
r
setwd("C:/Users/Punit/Desktop") # set working directory xtrain<- read.table("X_train.txt") # reading the train data ytrain<- read.table("y_train.txt") # reading the training activity id subtrain<- read.table("subject_train.txt") # reading the training subjects xtest<- read.table("X_test.txt") # reading the test data ...
#!/usr/bin/env Rscript library(dplyr) # Read and cleanup the features data features <- read.table("./UCI HAR Dataset/features.txt", header=FALSE, sep="") features2 <- gsub("-", "_", features[,2]) features2 <- gsub(",", "_", features2) feat...
/run_analysis.R
no_license
analytics-engine/GettingAndCleaningData
R
false
false
2,558
r
#!/usr/bin/env Rscript library(dplyr) # Read and cleanup the features data features <- read.table("./UCI HAR Dataset/features.txt", header=FALSE, sep="") features2 <- gsub("-", "_", features[,2]) features2 <- gsub(",", "_", features2) feat...
args = commandArgs(TRUE) inputFileName = args[1] outputPrefix = args[2] thisPath = args[3] path = thisPath setwd(path) library(WGCNA); options(stringsAsFactors = FALSE); inputFile = paste(inputFileName, sep="") riceData0 = read.table(inputFile, header = TRUE, sep = "\t") riceData = as.data.frame(t(r...
/Clustering/WGCNA/wgcna_initial_sample_clustering_simple_parameters.R
no_license
anandksrao/Gene_coexpression_scripts
R
false
false
1,829
r
args = commandArgs(TRUE) inputFileName = args[1] outputPrefix = args[2] thisPath = args[3] path = thisPath setwd(path) library(WGCNA); options(stringsAsFactors = FALSE); inputFile = paste(inputFileName, sep="") riceData0 = read.table(inputFile, header = TRUE, sep = "\t") riceData = as.data.frame(t(r...
# Quality-Control PDF erstellen: QCReport(data,file="qcreport.pdf")
/website/R/qualityreport.R
no_license
emmkey/GenEx
R
false
false
67
r
# Quality-Control PDF erstellen: QCReport(data,file="qcreport.pdf")
#' @name example_data #' @title Example data for plot generation #' @docType data #' @keywords datasets NULL #' @name d1 #' @title Exemplary dendrogram of genes #' @docType data #' @keywords datasets NULL #' @name d2 #' @title Exemplary dendrogram of strains #' @docType data #' @keywords datasets NULL #' @name hm #'...
/R/datasets.R
no_license
michbur/dendrolenda
R
false
false
501
r
#' @name example_data #' @title Example data for plot generation #' @docType data #' @keywords datasets NULL #' @name d1 #' @title Exemplary dendrogram of genes #' @docType data #' @keywords datasets NULL #' @name d2 #' @title Exemplary dendrogram of strains #' @docType data #' @keywords datasets NULL #' @name hm #'...
rankhospital <- function(state, outcome, rank = "best"){ ## Read outcome data data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") fd <- as.data.frame(cbind(data[, 2], # hospital data[, 7], # state data[, 11], # heart attack ...
/rankhospital.R
no_license
KiranKumar23/ProgAssignment3-data
R
false
false
1,691
r
rankhospital <- function(state, outcome, rank = "best"){ ## Read outcome data data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") fd <- as.data.frame(cbind(data[, 2], # hospital data[, 7], # state data[, 11], # heart attack ...
source("R/fun_cluster.R") ## Erro com todo mundo rmatrix <- as(dados %>% select(-Timestamp) %>% # select(-contains("cluster")) %>% as.data.frame(), "realRatingMatrix") min(rowCounts(rmatrix)) ptm <- Sys.time() model_train_scheme <- evaluationScheme(rmatrix, train = ...
/R/erro_rec.R
no_license
leo-filgueira/trab_recom
R
false
false
11,806
r
source("R/fun_cluster.R") ## Erro com todo mundo rmatrix <- as(dados %>% select(-Timestamp) %>% # select(-contains("cluster")) %>% as.data.frame(), "realRatingMatrix") min(rowCounts(rmatrix)) ptm <- Sys.time() model_train_scheme <- evaluationScheme(rmatrix, train = ...
#GRID OF AGROMETEOROLOGICAL DATA #LANDSAT-8 com thermal #'Crop coefficient (ETa / ET0) using Landsat-8 images (including thermal bands) with a grid of agrometeorological data. #' #' @param doy is the Day of Year (DOY) #' @param a is one of the regression coefficients of SAFER algorithm #' @param b is one of...
/R/landsat8_thermal_grid.R
no_license
cran/agriwater
R
false
false
34,054
r
#GRID OF AGROMETEOROLOGICAL DATA #LANDSAT-8 com thermal #'Crop coefficient (ETa / ET0) using Landsat-8 images (including thermal bands) with a grid of agrometeorological data. #' #' @param doy is the Day of Year (DOY) #' @param a is one of the regression coefficients of SAFER algorithm #' @param b is one of...
#' Maximum Scatter Difference #' #' Maximum Scatter Difference (MSD) is a supervised linear dimension reduction method. #' The basic idea of MSD is to use \emph{additive} cost function rather than \emph{multiplicative} #' trace ratio criterion that was adopted by LDA. Due to such formulation, it can neglect sample-samp...
/R/linear_MSD.R
no_license
rcannood/Rdimtools
R
false
false
4,316
r
#' Maximum Scatter Difference #' #' Maximum Scatter Difference (MSD) is a supervised linear dimension reduction method. #' The basic idea of MSD is to use \emph{additive} cost function rather than \emph{multiplicative} #' trace ratio criterion that was adopted by LDA. Due to such formulation, it can neglect sample-samp...
X.median = numeric(5000) for(i in 1:5000) { X = rnorm(99, mean = 0, sd = 1) X.median[i] = median(X) } print(mean(X.median)) print(sd(X.median)) hist(X.median)
/stats200_samplemedian.R
no_license
alexmonahan/csLabs_School
R
false
false
162
r
X.median = numeric(5000) for(i in 1:5000) { X = rnorm(99, mean = 0, sd = 1) X.median[i] = median(X) } print(mean(X.median)) print(sd(X.median)) hist(X.median)
# par() # view current settings opar <- par() # make a copy of current settings par(fg="dodgerblue4") # col = rgb(0, 0, BETAg[,2]), #### Sparrow data load("sparrows.RData") fledged<-sparrows[,1] ; age<-sparrows[,2] ; age2<-age^2 #### Figure 10.1 pdf("fig10_1.pdf",family="Times",height=3.5,wi...
/static/stat572/pr/chapter10.R
permissive
UrbanStudy/stat2019_website
R
false
false
12,571
r
# par() # view current settings opar <- par() # make a copy of current settings par(fg="dodgerblue4") # col = rgb(0, 0, BETAg[,2]), #### Sparrow data load("sparrows.RData") fledged<-sparrows[,1] ; age<-sparrows[,2] ; age2<-age^2 #### Figure 10.1 pdf("fig10_1.pdf",family="Times",height=3.5,wi...
\name{range01} \alias{range01} \title{ Shrink or stretch a vector to make it range between 0 and 1 } \description{ This function re-scales a numeric vector so that it ranges between 0 and 1. So, the lowest value becomes 0, the highest becomes 1, and the ones in the middle retain their rank and relative diference. } \us...
/man/range01.Rd
no_license
cran/modEvA
R
false
false
859
rd
\name{range01} \alias{range01} \title{ Shrink or stretch a vector to make it range between 0 and 1 } \description{ This function re-scales a numeric vector so that it ranges between 0 and 1. So, the lowest value becomes 0, the highest becomes 1, and the ones in the middle retain their rank and relative diference. } \us...
function (Z, z.axes, z.axes.names = NULL, alpha = 0.5, basket.beta = 0.5, basket.n = 36, ax = NULL, ax.col, ax.name.col, ax.name.size, bandwidth, pch.samples.size = 1, c.hull.n = 10, class.vec, colours.density, cuts.density, dens.ax.cex, dens.ax.tcl, dens.mgp, draw.densitycontours, ellipse.alpha, ellipse.ka...
/source/drawbipl.bagalpha.density.R
no_license
carelvdmerwe/ExplodingBiplotsPlotly
R
false
false
17,265
r
function (Z, z.axes, z.axes.names = NULL, alpha = 0.5, basket.beta = 0.5, basket.n = 36, ax = NULL, ax.col, ax.name.col, ax.name.size, bandwidth, pch.samples.size = 1, c.hull.n = 10, class.vec, colours.density, cuts.density, dens.ax.cex, dens.ax.tcl, dens.mgp, draw.densitycontours, ellipse.alpha, ellipse.ka...
#' Get genome build for sumstats #' #' Compare the SNP:CHR:BP data against a dataset of all Hapmap3 SNP:CHR:BP data for two genome builds (GRCh37 and GRCh38). Evaluate which genome build matches the SNP locations from the sum stats file. #' #' @param path Filepath of the summary statistics file #' #' @return Either 'GR...
/R/get_genomebuild_for_sumstats.r
no_license
zj-liu/MAGMA_Celltyping
R
false
false
1,046
r
#' Get genome build for sumstats #' #' Compare the SNP:CHR:BP data against a dataset of all Hapmap3 SNP:CHR:BP data for two genome builds (GRCh37 and GRCh38). Evaluate which genome build matches the SNP locations from the sum stats file. #' #' @param path Filepath of the summary statistics file #' #' @return Either 'GR...
output$glc_cli_Selector = renderUI({ selectInput("glc_cli", "Select HDL Function Variable", choices = featureNames(data$data$cli), selected = featureNames(data$data$cli)[1]) }) glc_cli_dt = reactive({ data$corr$glc$cli[[input$glc.level]][[input$glc.method]][[input$glc_cli]] %>% ...
/hdl/apps/app/server/glc/corr_cli.R
no_license
zhuchcn/ffs
R
false
false
1,339
r
output$glc_cli_Selector = renderUI({ selectInput("glc_cli", "Select HDL Function Variable", choices = featureNames(data$data$cli), selected = featureNames(data$data$cli)[1]) }) glc_cli_dt = reactive({ data$corr$glc$cli[[input$glc.level]][[input$glc.method]][[input$glc_cli]] %>% ...
# Global variables # Global variables if (getRversion() >= "2.15.1") { utils::globalVariables(c("brow", "dat", "dat2", "trat", "results", "plot_group", "heat.colors", "results", "dev.new", "aov", "dispplot", "sd")) }
/R/globalvariables.R
no_license
bendeivide/MCPtests
R
false
false
306
r
# Global variables # Global variables if (getRversion() >= "2.15.1") { utils::globalVariables(c("brow", "dat", "dat2", "trat", "results", "plot_group", "heat.colors", "results", "dev.new", "aov", "dispplot", "sd")) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllClasses.R \docType{class} \name{ZGroupCurvesDataFrame} \alias{ZGroupCurvesDataFrame} \alias{ZGroupCurvesDataFrame-class} \title{The ZGroupCurvesDataFrame class} \description{ \code{ZGroupCurvesDataFrame} class inherits class data.frame. } ...
/man/ZGroupCurvesDataFrame-class.Rd
no_license
hmorzaria/zonator
R
false
true
853
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllClasses.R \docType{class} \name{ZGroupCurvesDataFrame} \alias{ZGroupCurvesDataFrame} \alias{ZGroupCurvesDataFrame-class} \title{The ZGroupCurvesDataFrame class} \description{ \code{ZGroupCurvesDataFrame} class inherits class data.frame. } ...
#' Helper functions for processing text #' Replaces the readtext::readtext function that reads a lists of text files into a data frame #' @param paths A vector of paths to text files that are to be read in #' @return A readtext data.frame #' @export spell_replace <- function(txt, word_list=coca_list, ignore_names=TRUE...
/R/spell_functions.R
permissive
browndw/spell.replacer
R
false
false
2,748
r
#' Helper functions for processing text #' Replaces the readtext::readtext function that reads a lists of text files into a data frame #' @param paths A vector of paths to text files that are to be read in #' @return A readtext data.frame #' @export spell_replace <- function(txt, word_list=coca_list, ignore_names=TRUE...
#' @title Univariate Bimodality Plot #' @description Coloured bimodality plot. #' @param x \code{\link{phyloseq-class}} object #' @param taxon Taxonomic group to visualize. #' @param tipping.point Indicate critical point for abundance #' variations to be highlighted. #' @param lims Optional. Figure X axis limits. #' @p...
/R/hotplot.R
no_license
rnandety/microbiome
R
false
false
2,882
r
#' @title Univariate Bimodality Plot #' @description Coloured bimodality plot. #' @param x \code{\link{phyloseq-class}} object #' @param taxon Taxonomic group to visualize. #' @param tipping.point Indicate critical point for abundance #' variations to be highlighted. #' @param lims Optional. Figure X axis limits. #' @p...
# Comparing urban vs rural tree composition in Texas # ### set up workspace and load any required functions ============================= library(ggplot2) library(dplyr) library(tidyr) library(ggmap) library(sf) library(ggthemes) library(readr) library(lubridate) rm(list = ls()) ### data source 1: traditional FIA d...
/TX_FIA_urban_vs_rural_tree_comp.R
permissive
dankatz/TX_FIA_rural_vs_urban
R
false
false
7,080
r
# Comparing urban vs rural tree composition in Texas # ### set up workspace and load any required functions ============================= library(ggplot2) library(dplyr) library(tidyr) library(ggmap) library(sf) library(ggthemes) library(readr) library(lubridate) rm(list = ls()) ### data source 1: traditional FIA d...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/odf_check.R \name{odf_check} \alias{odf_check} \title{Check ODF metadata} \usage{ odf_check(obj, print = TRUE) } \arguments{ \item{obj}{an odf object (oce::read.odf())} \item{print}{TRUE or FALSE, TRUE will cause errors to be displayed at co...
/ncTemplates/man/odf_check.Rd
no_license
EOGrady21/netCDF
R
false
true
591
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/odf_check.R \name{odf_check} \alias{odf_check} \title{Check ODF metadata} \usage{ odf_check(obj, print = TRUE) } \arguments{ \item{obj}{an odf object (oce::read.odf())} \item{print}{TRUE or FALSE, TRUE will cause errors to be displayed at co...
\name{readHeinzTree} \Rdversion{1.4} \alias{readHeinzTree} \title{ Convert HEINZ output to tree } \description{ Converts the HEINZ output to a tree in graph format. If the output is in matrix form, it will create a list of graphs. The function needs the node and edge file and the original network from which the module ...
/man/readHeinzTree.Rd
no_license
assaron/BioNet
R
false
false
1,091
rd
\name{readHeinzTree} \Rdversion{1.4} \alias{readHeinzTree} \title{ Convert HEINZ output to tree } \description{ Converts the HEINZ output to a tree in graph format. If the output is in matrix form, it will create a list of graphs. The function needs the node and edge file and the original network from which the module ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/raster_zscale.R \name{raster_zscale} \alias{raster_zscale} \title{Approximates the zscale of a raster Digital Elevation Model for 'rayshader'} \usage{ raster_zscale(raster, height_units = "m") } \arguments{ \item{raster}{A raster object of el...
/man/raster_zscale.Rd
no_license
cran/geoviz
R
false
true
613
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/raster_zscale.R \name{raster_zscale} \alias{raster_zscale} \title{Approximates the zscale of a raster Digital Elevation Model for 'rayshader'} \usage{ raster_zscale(raster, height_units = "m") } \arguments{ \item{raster}{A raster object of el...
# Example for Association Analysis library(arules) # Read in the file data<-read.csv(file="car.csv") # Min the associations rules <- apriori(data,parameter = list(supp = 0.004, conf = 0.50, target = "rules")) rules <- subset(rules,subset = lift>2.0 ) #rules <- subset(rules,subset = confidence >0.9) srul...
/assocAnalysis.R
no_license
TharunReddyPakala/DataScience
R
false
false
415
r
# Example for Association Analysis library(arules) # Read in the file data<-read.csv(file="car.csv") # Min the associations rules <- apriori(data,parameter = list(supp = 0.004, conf = 0.50, target = "rules")) rules <- subset(rules,subset = lift>2.0 ) #rules <- subset(rules,subset = confidence >0.9) srul...
###################################################################################### # Copyright 2022, Nicolau Andrés-Thió # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restrict...
/R_code/analyseAugmentedExperiments.R
permissive
INFORMSJoC/2021.0299
R
false
false
4,441
r
###################################################################################### # Copyright 2022, Nicolau Andrés-Thió # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restrict...
rm(list=ls()) library(tidyverse) library(curl) library(paletteer) library(sf) library(ragg) library(ggtext) library(scales) library(extrafont) library(ggrepel) library(gganimate) #Start with LA level cases for the whole of the UK cases <- tempfile() url <- "https://api.coronavirus.data.gov.uk/v2/data?a...
/Heatmaps/COVIDCaseCartograms.R
no_license
mathiasfls/COVID-19
R
false
false
13,845
r
rm(list=ls()) library(tidyverse) library(curl) library(paletteer) library(sf) library(ragg) library(ggtext) library(scales) library(extrafont) library(ggrepel) library(gganimate) #Start with LA level cases for the whole of the UK cases <- tempfile() url <- "https://api.coronavirus.data.gov.uk/v2/data?a...
old = c('conversion_interval_days', 'tof_first_subs', 'time_on_file_on_phtoshp_lightrm_bndl', 'tot_no_activities', 'tot_active_days', 'no_of_days_on_illustrator', 'no_of_days_on_indesign', 'no_of_days_on_lightroom', 'no_of_days_on_photoshop', 'recent_30_tot_no_activities', 'recent_30_tot_active_days', 'recent_30_no_of_...
/data-science-scripts/zach/customer_pred_mismatch.R
no_license
mcohenmcohen/DataRobot
R
false
false
2,860
r
old = c('conversion_interval_days', 'tof_first_subs', 'time_on_file_on_phtoshp_lightrm_bndl', 'tot_no_activities', 'tot_active_days', 'no_of_days_on_illustrator', 'no_of_days_on_indesign', 'no_of_days_on_lightroom', 'no_of_days_on_photoshop', 'recent_30_tot_no_activities', 'recent_30_tot_active_days', 'recent_30_no_of_...
#rm(list=ls()) version<-"21.10.2022" ########### Site Variability #################################### ########## make a new dataframe of median max and min values ### #############################################################3 ####### Code for Stepwat Figures ####### Trace Martyn 14.07.2017- Version 3 ############...
/code_figures/STEPWAT_functional.composition.RCP45.21.10.2022.R
no_license
tmartyn/Martyn_2022
R
false
false
5,718
r
#rm(list=ls()) version<-"21.10.2022" ########### Site Variability #################################### ########## make a new dataframe of median max and min values ### #############################################################3 ####### Code for Stepwat Figures ####### Trace Martyn 14.07.2017- Version 3 ############...
model{ kMean~dnorm(0,100)T(0,10) lInf~dnorm(0,0.001)T(0,1000) l0~dnorm(0,1000)T(,lInf) sigma~dunif(0,10) tau<-1/pow(sigma,2) #individual random effect on k for(f in 1:nInd){ k[f]~dnorm(kMean,tauK) } sigmaK~dunif(0,1) tauK<-1/pow(sigmaK,2) for(i in 1:nEvalRows){ lengthExp[i]<-lInf*(1-exp...
/modelVonBert.R
no_license
evanchildress/perform
R
false
false
472
r
model{ kMean~dnorm(0,100)T(0,10) lInf~dnorm(0,0.001)T(0,1000) l0~dnorm(0,1000)T(,lInf) sigma~dunif(0,10) tau<-1/pow(sigma,2) #individual random effect on k for(f in 1:nInd){ k[f]~dnorm(kMean,tauK) } sigmaK~dunif(0,1) tauK<-1/pow(sigmaK,2) for(i in 1:nEvalRows){ lengthExp[i]<-lInf*(1-exp...
library(data.table) library(ggplot2) library(scales) # Load results ================================================================= results_R = fread("data-raw/results_R.csv") results_S = fread("data-raw/results_stata.csv") # Merge results and calculate relative speed =================================== results = r...
/examples/benchmarking_plots.R
permissive
harveybarnhard/looperr
R
false
false
1,849
r
library(data.table) library(ggplot2) library(scales) # Load results ================================================================= results_R = fread("data-raw/results_R.csv") results_S = fread("data-raw/results_stata.csv") # Merge results and calculate relative speed =================================== results = r...
# ============================================================================ # # Rotterdam project # ---------------------------------------------------------------------------- # Global variables # ============================================================================ # # Define study period outbreak_period <-...
/rotterdam_vars.R
no_license
tm-pham/VIM-PA_transmission_routes_erasmusMC
R
false
false
1,730
r
# ============================================================================ # # Rotterdam project # ---------------------------------------------------------------------------- # Global variables # ============================================================================ # # Define study period outbreak_period <-...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rgl-3d.r \name{biplot3dBase2} \alias{biplot3dBase2} \title{biplot3dBase2 is the workhorse to draw a grid in rgl (3D device).} \usage{ biplot3dBase2(x, dim = 1:3, labels.e = TRUE, labels.c = TRUE, lines.c = 1, lef = 1.1, frame = 1, col.frame...
/man/biplot3dBase2.Rd
no_license
artoo-git/OpenRepGrid
R
false
true
1,485
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rgl-3d.r \name{biplot3dBase2} \alias{biplot3dBase2} \title{biplot3dBase2 is the workhorse to draw a grid in rgl (3D device).} \usage{ biplot3dBase2(x, dim = 1:3, labels.e = TRUE, labels.c = TRUE, lines.c = 1, lef = 1.1, frame = 1, col.frame...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gis_analysis.R \name{wbt_construct_vector_tin} \alias{wbt_construct_vector_tin} \title{Construct vector tin} \usage{ wbt_construct_vector_tin( input, output, field = NULL, use_z = FALSE, max_triangle_edge_length = NULL, wd = NULL,...
/man/wbt_construct_vector_tin.Rd
permissive
dondealban/whiteboxR
R
false
true
1,156
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gis_analysis.R \name{wbt_construct_vector_tin} \alias{wbt_construct_vector_tin} \title{Construct vector tin} \usage{ wbt_construct_vector_tin( input, output, field = NULL, use_z = FALSE, max_triangle_edge_length = NULL, wd = NULL,...
#' <Add Title> #' #' <Add Description> #' #' @param labels character or list with otpions: #' \itemize{ #' \item{format}{: list format functions for each parameter label (see \href{http://c3js.org/reference.html#data-labels}{c3 data-labels})} #' } #' @param hide booleen or character vector of parameters to hide #' @i...
/R/c3.R
no_license
calculus-ask/c3
R
false
false
5,636
r
#' <Add Title> #' #' <Add Description> #' #' @param labels character or list with otpions: #' \itemize{ #' \item{format}{: list format functions for each parameter label (see \href{http://c3js.org/reference.html#data-labels}{c3 data-labels})} #' } #' @param hide booleen or character vector of parameters to hide #' @i...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prod.R \name{prod} \alias{prod} \title{fun_name} \usage{ prod(params) } \arguments{ \item{param}{fun_name} } \description{ kolejna funkcja podmieniona } \keyword{Ktos} \keyword{Odwiedzam} \keyword{beka} \keyword{chlop} \keyword{czlowieka,} \k...
/man/prod.Rd
no_license
granatb/RapeR
R
false
true
430
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prod.R \name{prod} \alias{prod} \title{fun_name} \usage{ prod(params) } \arguments{ \item{param}{fun_name} } \description{ kolejna funkcja podmieniona } \keyword{Ktos} \keyword{Odwiedzam} \keyword{beka} \keyword{chlop} \keyword{czlowieka,} \k...
library(testthat) library(comparer) test_check("comparer")
/tests/testthat.R
no_license
CollinErickson/comparer
R
false
false
60
r
library(testthat) library(comparer) test_check("comparer")
plot2 <- function() { data <- read.csv("household_power_consumption.txt", header=TRUE, sep = ";", stringsAsFactors=FALSE) data <- data[(data$Date == '1/2/2007' | data$Date == '2/2/2007'),] power <- data.frame(strptime(paste(data[,1],data[,2]), "%d/%m/%Y %H:%M:%S"), as.numeric(data[,3])) png(file = "plot...
/plot2.R
no_license
AdrianDel/ExData_Plotting1
R
false
false
431
r
plot2 <- function() { data <- read.csv("household_power_consumption.txt", header=TRUE, sep = ";", stringsAsFactors=FALSE) data <- data[(data$Date == '1/2/2007' | data$Date == '2/2/2007'),] power <- data.frame(strptime(paste(data[,1],data[,2]), "%d/%m/%Y %H:%M:%S"), as.numeric(data[,3])) png(file = "plot...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 1261 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 1261 c c Input Parameter (command line, file): c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/q...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query02_query55_1344n/query02_query55_1344n.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
710
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 1261 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 1261 c c Input Parameter (command line, file): c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/q...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/auxiliary_visuals.R \name{decide_cluster_order} \alias{decide_cluster_order} \title{decide_cluster_order} \usage{ decide_cluster_order(gobject, expression_values = c("normalized", "scaled", "custom"), genes, cluster_column = NULL, cluster...
/man/decide_cluster_order.Rd
permissive
kanliu0205/Giotto
R
false
true
997
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/auxiliary_visuals.R \name{decide_cluster_order} \alias{decide_cluster_order} \title{decide_cluster_order} \usage{ decide_cluster_order(gobject, expression_values = c("normalized", "scaled", "custom"), genes, cluster_column = NULL, cluster...
# install.packages('igraph') # # adjm <- matrix(sample(0:1, 100, replace=TRUE, prob=c(0.9,0.1)), nc=10) # g1 <- graph_from_adjacency_matrix( adjm ,mode='undirected') # adjm <- matrix(sample(0:5, 100, replace=TRUE, # prob=c(0.9,0.02,0.02,0.02,0.02,0.02)), nc=10) library(igraph) ################...
/simulation_nets.R
no_license
hector-garrido/scripts-info-propagation
R
false
false
6,110
r
# install.packages('igraph') # # adjm <- matrix(sample(0:1, 100, replace=TRUE, prob=c(0.9,0.1)), nc=10) # g1 <- graph_from_adjacency_matrix( adjm ,mode='undirected') # adjm <- matrix(sample(0:5, 100, replace=TRUE, # prob=c(0.9,0.02,0.02,0.02,0.02,0.02)), nc=10) library(igraph) ################...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/geo_all_gse.R \name{geo_all_gse} \alias{geo_all_gse} \title{all gse in geo} \usage{ geo_all_gse() } \value{ all gse } \description{ all gse in geo }
/man/geo_all_gse.Rd
no_license
yikeshu0611/BioMisc
R
false
true
227
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/geo_all_gse.R \name{geo_all_gse} \alias{geo_all_gse} \title{all gse in geo} \usage{ geo_all_gse() } \value{ all gse } \description{ all gse in geo }
# mouse data LDA project # Evan Cummings # CSCI 548 - Pattern Recognition # Douglas Raiford, Fall 2015 library(MASS) # read in the data : f = read.csv("../../data/otu_table_L6.txt", sep="\t", row.names=1) # remove and "Other" generas : fn = f[-grep("Other", rownames(f)),] # remove any rows with more than 6 zeros : ...
/LDA/src/mouse.r
no_license
pf4d/pattern_recognition
R
false
false
3,628
r
# mouse data LDA project # Evan Cummings # CSCI 548 - Pattern Recognition # Douglas Raiford, Fall 2015 library(MASS) # read in the data : f = read.csv("../../data/otu_table_L6.txt", sep="\t", row.names=1) # remove and "Other" generas : fn = f[-grep("Other", rownames(f)),] # remove any rows with more than 6 zeros : ...
#R Script for Twitter Mining to find out consumer sentiment about an airline install.packages("twitteR") #Installing twitteR package (read JSON) library(twitteR) #loading package install.packages(c("devtools", "rjson", "bit64", "httr")) library(httr) install.packages("base64enc") library(base64enc) install.packages...
/Airline-Consumer-Index/AirlineRating.R
no_license
arunphilips/arrdata
R
false
false
4,805
r
#R Script for Twitter Mining to find out consumer sentiment about an airline install.packages("twitteR") #Installing twitteR package (read JSON) library(twitteR) #loading package install.packages(c("devtools", "rjson", "bit64", "httr")) library(httr) install.packages("base64enc") library(base64enc) install.packages...
## Plot1.png power <- read.table("./Project 1/household_power_consumption.txt", header = TRUE, sep = ";", stringsAsFactors = FALSE, na.strings = "?") power$Date <- as.Date(power$Date, format = "%d/%m/%Y") powert <- subset(power, power$Date %in% as.Date(c("2007-02-01", "2007-02-02"))) powert$Global...
/plot1.R
no_license
sallytian/ExData_Plotting1
R
false
false
566
r
## Plot1.png power <- read.table("./Project 1/household_power_consumption.txt", header = TRUE, sep = ";", stringsAsFactors = FALSE, na.strings = "?") power$Date <- as.Date(power$Date, format = "%d/%m/%Y") powert <- subset(power, power$Date %in% as.Date(c("2007-02-01", "2007-02-02"))) powert$Global...
errorlist <- list() warninglist <- list() library(data.table) suppressMessages(library(matrixStats)) args <- (commandArgs(TRUE)); bim_file <- as.character(args[1]) fam_file <- as.character(args[2]) quality_file <- as.character(args[3]) controlsnps_file <- as.character(args[4]) message("Checking bim file: ", bim_file...
/resources/checks/genetic_data.R
permissive
TabeaSchoeler/SiblingGWAS
R
false
false
5,864
r
errorlist <- list() warninglist <- list() library(data.table) suppressMessages(library(matrixStats)) args <- (commandArgs(TRUE)); bim_file <- as.character(args[1]) fam_file <- as.character(args[2]) quality_file <- as.character(args[3]) controlsnps_file <- as.character(args[4]) message("Checking bim file: ", bim_file...
convert_to_binary <-function(n){ if(n >1){ convert_to_binary(as.integer(n/2)) } cat(n %% 2) }
/Project R/decimaltobinary.R
no_license
ilhamakhsan/MatematikaNumerik
R
false
false
120
r
convert_to_binary <-function(n){ if(n >1){ convert_to_binary(as.integer(n/2)) } cat(n %% 2) }
##in session we build the path ## ##reading the csv file and save it in data variable ## data<-read.csv("cities_r2.csv", sep = ',', h = TRUE) library(ggplot2) library(plotrix) ## ##Pie Plot for total male,female,children population in india ##we took means and plotted the chart ## slices <- c(mean(...
/Final.R
no_license
srilekha9/RDataScienceCourse-Top_500_Indian_Cities
R
false
false
5,575
r
##in session we build the path ## ##reading the csv file and save it in data variable ## data<-read.csv("cities_r2.csv", sep = ',', h = TRUE) library(ggplot2) library(plotrix) ## ##Pie Plot for total male,female,children population in india ##we took means and plotted the chart ## slices <- c(mean(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/add_default_solver.R \name{add_default_solver} \alias{add_default_solver} \title{Add default solver} \usage{ add_default_solver(x, ...) } \arguments{ \item{x}{\code{\link[=problem]{problem()}} object.} \item{...}{arguments passed to the solv...
/man/add_default_solver.Rd
no_license
prioritizr/prioritizr
R
false
true
1,615
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/add_default_solver.R \name{add_default_solver} \alias{add_default_solver} \title{Add default solver} \usage{ add_default_solver(x, ...) } \arguments{ \item{x}{\code{\link[=problem]{problem()}} object.} \item{...}{arguments passed to the solv...
## Script Explaining Away effect ## index in CP Tables 1-> True, 2-> False rm(list=ls()) P.C.1=0.1 ## a priori probability that C is true P.C=c(P.C.1,1-P.C.1) P.V.1= 0.6 ## a priori probability that V is true P.V=c(P.V.1,1-P.V.1) P.H.CV<-array(0,c(2,2,2)) ## CPT of H given C and V P.H.CV[1,1,1]=0.95 P.H.CV[1,1,2]...
/inst/scripts/GraphicalModeling/expl_away.R
no_license
gbonte/gbcode
R
false
false
1,163
r
## Script Explaining Away effect ## index in CP Tables 1-> True, 2-> False rm(list=ls()) P.C.1=0.1 ## a priori probability that C is true P.C=c(P.C.1,1-P.C.1) P.V.1= 0.6 ## a priori probability that V is true P.V=c(P.V.1,1-P.V.1) P.H.CV<-array(0,c(2,2,2)) ## CPT of H given C and V P.H.CV[1,1,1]=0.95 P.H.CV[1,1,2]...
#' @import bnlearn #' @import heatmaply #' @import plotly #' @import rintrojs #' @import shiny #' @import shinyAce #' @import shinydashboard #' @import shinyWidgets options(shiny.testmode=TRUE) # Define required server logic shinyServer(function(input, output, session) { # Get the data selection from user dat <-...
/inst/bn/server.R
permissive
paulgovan/BayesianNetwork
R
false
false
13,931
r
#' @import bnlearn #' @import heatmaply #' @import plotly #' @import rintrojs #' @import shiny #' @import shinyAce #' @import shinydashboard #' @import shinyWidgets options(shiny.testmode=TRUE) # Define required server logic shinyServer(function(input, output, session) { # Get the data selection from user dat <-...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/storagegateway_operations.R \name{storagegateway_delete_chap_credentials} \alias{storagegateway_delete_chap_credentials} \title{Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target and initiator ...
/cran/paws.storage/man/storagegateway_delete_chap_credentials.Rd
permissive
johnnytommy/paws
R
false
true
1,393
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/storagegateway_operations.R \name{storagegateway_delete_chap_credentials} \alias{storagegateway_delete_chap_credentials} \title{Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target and initiator ...
library(RWDataPlyr) ### Name: rdf_slot_names ### Title: Returns all slots contained in an rdf file. ### Aliases: rdf_slot_names getSlotsInRdf ### ** Examples rdf_slot_names(keyRdf)
/data/genthat_extracted_code/RWDataPlyr/examples/rdf_slot_names.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
189
r
library(RWDataPlyr) ### Name: rdf_slot_names ### Title: Returns all slots contained in an rdf file. ### Aliases: rdf_slot_names getSlotsInRdf ### ** Examples rdf_slot_names(keyRdf)
run_analysis <- function() { # load labels for features and activities features.lbl <- read.table("./features.txt") activity.lbl <- read.table("./activity_labels.txt") # load subjects, features, and activities for both test and train directories x.test <- read.table("./...
/run_analysis.R
no_license
pmiotti/Get-and-Clean-Data-Class-Project
R
false
false
2,958
r
run_analysis <- function() { # load labels for features and activities features.lbl <- read.table("./features.txt") activity.lbl <- read.table("./activity_labels.txt") # load subjects, features, and activities for both test and train directories x.test <- read.table("./...
.annBuilderParseSourceURLs <- function() { dataFile <- "sourceURLs.txt" cols <- rep("character", 2) df <- read.table(dataFile, header=TRUE, colClasses=cols) sourceURLs <- as.list(df$url) names(sourceURLs) <- df$name sourceURLs } sourceURLs <- .annBuilderParseSourceURLs() rm(.annBuilderParseSourc...
/data/sourceURLs.R
no_license
SiYangming/AnnBuilder
R
false
false
327
r
.annBuilderParseSourceURLs <- function() { dataFile <- "sourceURLs.txt" cols <- rep("character", 2) df <- read.table(dataFile, header=TRUE, colClasses=cols) sourceURLs <- as.list(df$url) names(sourceURLs) <- df$name sourceURLs } sourceURLs <- .annBuilderParseSourceURLs() rm(.annBuilderParseSourc...
## The functioncs will create a wrapper around the "matrix" class so it can cache its own inverse ## also, unlike the functions in the given template which lack comments and are probably completely baffling ## to a newcomer and teach a completely marginal thing which isn't really related to the basics of R ## and are ...
/cachematrix.R
no_license
ratnip/ProgrammingAssignment2
R
false
false
3,665
r
## The functioncs will create a wrapper around the "matrix" class so it can cache its own inverse ## also, unlike the functions in the given template which lack comments and are probably completely baffling ## to a newcomer and teach a completely marginal thing which isn't really related to the basics of R ## and are ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/import.R \name{import} \alias{import} \title{Import} \usage{ import(file, format, setclass, which, ...) } \arguments{ \item{file}{A character string naming a file, URL, or single-file .zip or .tar archive.} \item{format}{An optional characte...
/man/import.Rd
no_license
rubak/rio
R
false
true
9,051
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/import.R \name{import} \alias{import} \title{Import} \usage{ import(file, format, setclass, which, ...) } \arguments{ \item{file}{A character string naming a file, URL, or single-file .zip or .tar archive.} \item{format}{An optional characte...
print(mtcars) print(women) print(plot)
/test1.R
no_license
jafarmohammed/analytics1
R
false
false
42
r
print(mtcars) print(women) print(plot)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.r \docType{data} \name{all_hgnc} \alias{all_hgnc} \title{All HGNC gene symbols} \format{ An object of class \code{character} of length 36591. } \source{ The code to prepare the .Rda file file from the marker file is: \code{ listMarts(hos...
/man/all_hgnc.Rd
no_license
RHReynolds/EWCE
R
false
true
694
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.r \docType{data} \name{all_hgnc} \alias{all_hgnc} \title{All HGNC gene symbols} \format{ An object of class \code{character} of length 36591. } \source{ The code to prepare the .Rda file file from the marker file is: \code{ listMarts(hos...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/StratSShDBoot.R \name{StratSShDBoot} \alias{StratSShDBoot} \title{Standard Error of SShD} \usage{ StratSShDBoot(Coords, Sex, NonSexFactor, rep = 1000, print.progress = T) } \arguments{ \item{Coords}{Two-dimensional array of coordinates from g...
/man/StratSShDBoot.Rd
no_license
TWilliamBell/angler
R
false
true
702
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/StratSShDBoot.R \name{StratSShDBoot} \alias{StratSShDBoot} \title{Standard Error of SShD} \usage{ StratSShDBoot(Coords, Sex, NonSexFactor, rep = 1000, print.progress = T) } \arguments{ \item{Coords}{Two-dimensional array of coordinates from g...
# Exploratory Data Analysis - Assignment 2 - Q. #3 # Jad Abboud November 30, 2017 # Load ggplot2 library require(ggplot2) # Loading provided datasets - loading from local machine NEI <- readRDS("/Users/JGA/EDA2/summarySCC_PM25.rds") SCC <- readRDS("/Users/JGA/EDA2/Source_Classification_Code.rds") # Sampling NEI_samp...
/Plot3.R
no_license
jadgabboud/Data-Science-EDA-Project-2
R
false
false
1,319
r
# Exploratory Data Analysis - Assignment 2 - Q. #3 # Jad Abboud November 30, 2017 # Load ggplot2 library require(ggplot2) # Loading provided datasets - loading from local machine NEI <- readRDS("/Users/JGA/EDA2/summarySCC_PM25.rds") SCC <- readRDS("/Users/JGA/EDA2/Source_Classification_Code.rds") # Sampling NEI_samp...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/google_place_details.R \name{google_place_details} \alias{google_place_details} \title{Google place details} \usage{ google_place_details( place_id, language = NULL, simplify = TRUE, curl_proxy = NULL, key = get_api_key("place_detai...
/man/google_place_details.Rd
permissive
SymbolixAU/googleway
R
false
true
2,409
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/google_place_details.R \name{google_place_details} \alias{google_place_details} \title{Google place details} \usage{ google_place_details( place_id, language = NULL, simplify = TRUE, curl_proxy = NULL, key = get_api_key("place_detai...
# Assuming we are already in "CapStone" directory # Quiz 1 question1_2 <- function() { # Question 1: The en_US.blogs.txt file is how many megabytes? blog_info <- file.info("Coursera-SwiftKey/final/en_US/en_US.blogs.txt") print(blog_info) # Question 2: The en_US.twitter.txt has how many lines of text...
/quiz1.R
no_license
HIRIYURS/CapStoneQuiz
R
false
false
5,070
r
# Assuming we are already in "CapStone" directory # Quiz 1 question1_2 <- function() { # Question 1: The en_US.blogs.txt file is how many megabytes? blog_info <- file.info("Coursera-SwiftKey/final/en_US/en_US.blogs.txt") print(blog_info) # Question 2: The en_US.twitter.txt has how many lines of text...
#' Prediction at new locations based on the fitting results of original dataset #' #' @param newdata #' A data.frame includes all locations' longitude, latitude, and elevation, #' where the prediction is to be calculated. #' @param fitted #' Can be either a data.frame in memory or HDFS path which contains a...
/R/predNewLocs.R
permissive
schloerke/drSpaceTime
R
false
false
4,217
r
#' Prediction at new locations based on the fitting results of original dataset #' #' @param newdata #' A data.frame includes all locations' longitude, latitude, and elevation, #' where the prediction is to be calculated. #' @param fitted #' Can be either a data.frame in memory or HDFS path which contains a...
# ---- Set working Dir ---------------------------------------------------------------- setwd("C:/Users/John/Documents/Coursera/Exploratory Data Analysis/Week1/") getwd() #-------------------------------------------------------------------------------------- #---------- Download and unzip data file -------------------...
/plot2.r
no_license
Giannis1979/ExData_Plotting1
R
false
false
1,298
r
# ---- Set working Dir ---------------------------------------------------------------- setwd("C:/Users/John/Documents/Coursera/Exploratory Data Analysis/Week1/") getwd() #-------------------------------------------------------------------------------------- #---------- Download and unzip data file -------------------...
#' Fit nested partially-latent class model with regression (low-level) #' #' \code{nplcm_fit_Reg_BrS_NoNest} use design matrix to perform etiology #' and/or false positive regressions with following features: #' \itemize{ #' \item General regression; #' \item bronze- (BrS) measurements; #' \item conditional independen...
/R/nplcm-fit-Reg-BrS-NoNest.R
permissive
zhenkewu/nplcm
R
false
false
10,868
r
#' Fit nested partially-latent class model with regression (low-level) #' #' \code{nplcm_fit_Reg_BrS_NoNest} use design matrix to perform etiology #' and/or false positive regressions with following features: #' \itemize{ #' \item General regression; #' \item bronze- (BrS) measurements; #' \item conditional independen...
#!/usr/bin/env Rscript ## options(warn=2,error=recover); options(error=quote(q("yes"))) args <- commandArgs() dollar0 <- substring(args[grep("^--file=", args)], 8) source(sprintf("%s/ded.R", dirname(dollar0))) source(sprintf("%s/hmmlib.R", dirname(dollar0))) library("R.methodsS3", lib.loc = dirname(dollar0)) library...
/fit-hmm.R
no_license
tinathu/msg-1
R
false
false
12,393
r
#!/usr/bin/env Rscript ## options(warn=2,error=recover); options(error=quote(q("yes"))) args <- commandArgs() dollar0 <- substring(args[grep("^--file=", args)], 8) source(sprintf("%s/ded.R", dirname(dollar0))) source(sprintf("%s/hmmlib.R", dirname(dollar0))) library("R.methodsS3", lib.loc = dirname(dollar0)) library...
#setup library(tidyverse) library(tidyr) library(tidytuesdayR) library(skimr) library(ggplot2) library(extrafont) library(patchwork) library(ggridges) "%ni%" <- Negate("%in%") #thanks to deisygysi for this function #load & organize data tt_data <- tt_load(2021, week=21) survey <- tt_data$survey #what are all of the ...
/TidyTuesdays/W21/W21_2021.R
no_license
MJaffee/R-Projects
R
false
false
16,984
r
#setup library(tidyverse) library(tidyr) library(tidytuesdayR) library(skimr) library(ggplot2) library(extrafont) library(patchwork) library(ggridges) "%ni%" <- Negate("%in%") #thanks to deisygysi for this function #load & organize data tt_data <- tt_load(2021, week=21) survey <- tt_data$survey #what are all of the ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Cul.R \name{Cul} \alias{Cul} \title{Cochran C critical value} \usage{ Cul(a,n,N) } \arguments{ \item{a}{significance level.} \item{n}{number of points per series.} \item{N}{number of data series.} } \description{ Upper limit critical value ...
/man/Cul.Rd
no_license
philipp-baumann/prospectr
R
false
true
478
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Cul.R \name{Cul} \alias{Cul} \title{Cochran C critical value} \usage{ Cul(a,n,N) } \arguments{ \item{a}{significance level.} \item{n}{number of points per series.} \item{N}{number of data series.} } \description{ Upper limit critical value ...
#Question 18 dataf$Total_Charges<-as.numeric(dataf$Total_Charges) sum(dataf$Total_Charges[dataf$Procedure=="X Ray" | dataf$Procedure=="Scalling"],na.rm = TRUE)
/Q18.R
no_license
umairhanif00/R-Assignment-2
R
false
false
163
r
#Question 18 dataf$Total_Charges<-as.numeric(dataf$Total_Charges) sum(dataf$Total_Charges[dataf$Procedure=="X Ray" | dataf$Procedure=="Scalling"],na.rm = TRUE)
library(PerformanceAnalytics) ### Name: chart.RelativePerformance ### Title: relative performance chart between multiple return series ### Aliases: chart.RelativePerformance ### ** Examples data(managers) chart.RelativePerformance(managers[, 1:6, drop=FALSE], managers[, 8, drop=FALSE], colorset=rich8equal, l...
/data/genthat_extracted_code/PerformanceAnalytics/examples/chart.RelativePerformance.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
388
r
library(PerformanceAnalytics) ### Name: chart.RelativePerformance ### Title: relative performance chart between multiple return series ### Aliases: chart.RelativePerformance ### ** Examples data(managers) chart.RelativePerformance(managers[, 1:6, drop=FALSE], managers[, 8, drop=FALSE], colorset=rich8equal, l...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/00documentation.R \docType{data} \name{example01} \alias{example01} \title{Dataset example01.} \format{ A data frame with 2000 rows and 7 variables. } \description{ A simulated dataset. The variables are: } \details{ \itemize{ \item x. Trea...
/man/example01.Rd
no_license
amayer2010/EffectLiteR
R
false
true
601
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/00documentation.R \docType{data} \name{example01} \alias{example01} \title{Dataset example01.} \format{ A data frame with 2000 rows and 7 variables. } \description{ A simulated dataset. The variables are: } \details{ \itemize{ \item x. Trea...
\name{h2o.glm.VA} \alias{h2o.glm.VA} %- Also NEED an '\alias' for EACH other topic documented here. \title{ H2O: Generalized Linear Models (ValueArray) } \description{ Fit a generalized linear model using the ValueArray implementation, specified by a response variable, a set of predictors, and a description of the erro...
/R/h2oRClient-package/man/h2o.glm.VA.Rd
permissive
svaithianatha/h2o
R
false
false
5,537
rd
\name{h2o.glm.VA} \alias{h2o.glm.VA} %- Also NEED an '\alias' for EACH other topic documented here. \title{ H2O: Generalized Linear Models (ValueArray) } \description{ Fit a generalized linear model using the ValueArray implementation, specified by a response variable, a set of predictors, and a description of the erro...
################################## # HCP Data ################################## rm(list=ls()) parcel<-"Power264" run<-"tfMRI_MOTOR_RL" setwd(paste0("/Users/yizhao/Dropbox/MyFolder/Biostat-JHU/2019/HCP/Data/S1200/",parcel,"/",run)) dir.data<-paste0("/Volumes/ESD-USB3/HCP/",parcel,"/output") #######################...
/tfMRI_MOTOR/Data.R
no_license
BingkaiWang/Semi-parametric-PCPCA
R
false
false
3,041
r
################################## # HCP Data ################################## rm(list=ls()) parcel<-"Power264" run<-"tfMRI_MOTOR_RL" setwd(paste0("/Users/yizhao/Dropbox/MyFolder/Biostat-JHU/2019/HCP/Data/S1200/",parcel,"/",run)) dir.data<-paste0("/Volumes/ESD-USB3/HCP/",parcel,"/output") #######################...
#' Find tacsat records close to observation data records #' #' Find the tacsat records that are close in distance or on a defined grid to #' the observation data positions in both time and space #' #' Returned is a list with the first element being the observation dataset with #' an GR_ID identifier that matche...
/vmstools/R/clipObs2Tacsat.r
no_license
nielshintzen/vmstools
R
false
false
13,411
r
#' Find tacsat records close to observation data records #' #' Find the tacsat records that are close in distance or on a defined grid to #' the observation data positions in both time and space #' #' Returned is a list with the first element being the observation dataset with #' an GR_ID identifier that matche...
library(psych) library(nFactors) library(tidyverse) library(irr) library(readxl) library(corrr) library(janitor) library(corrr) library(corrplot) library(tidyverse) gwet <- function(ratings){ #First, convert ratings into a r_ik table. # r_ik is the number of raters that voted object i to be of a category k. # ...
/R/oncatV2_IRR.R
no_license
jkaupp/ONCAT
R
false
false
2,344
r
library(psych) library(nFactors) library(tidyverse) library(irr) library(readxl) library(corrr) library(janitor) library(corrr) library(corrplot) library(tidyverse) gwet <- function(ratings){ #First, convert ratings into a r_ik table. # r_ik is the number of raters that voted object i to be of a category k. # ...
library(lubridate) library(scales) library(plot.matrix) library(reshape2) source("all_function.R") init_run() flow_data<-read_data("Jakarta","K100000","Outflow") flow_data_xts <- ts(flow_data[,3],start=c(flow_data[1,1], flow_data[1,2]), end=c(2019, 6), frequency=12) flow_data_xts_xreg <- ts(flo...
/100000_Outflow_Jakarta/ARIMA_FFNNX_Seri_Outflow_100000.R
no_license
vcarlsberg/tesis
R
false
false
3,659
r
library(lubridate) library(scales) library(plot.matrix) library(reshape2) source("all_function.R") init_run() flow_data<-read_data("Jakarta","K100000","Outflow") flow_data_xts <- ts(flow_data[,3],start=c(flow_data[1,1], flow_data[1,2]), end=c(2019, 6), frequency=12) flow_data_xts_xreg <- ts(flo...
\name{egcm-package} \alias{egcm-package} \docType{package} \title{ Simplified Engle-Granger Cointegration Models } \description{ This package provides a simplified implementation of the Engle-Granger cointegration model that is geared towards the analysis of securities prices. Summary and plot functions are provided, a...
/man/egcm-package.Rd
no_license
IanMadlenya/egcm
R
false
false
5,112
rd
\name{egcm-package} \alias{egcm-package} \docType{package} \title{ Simplified Engle-Granger Cointegration Models } \description{ This package provides a simplified implementation of the Engle-Granger cointegration model that is geared towards the analysis of securities prices. Summary and plot functions are provided, a...
# Matrix inversion is usually a costly computation and there may be some benefit # to caching the inverse of a matrix rather than compute it repeatedly. The # following two functions are used to cache the inverse of a matrix. # makeCacheMatrix creates a list containing a function to # 1. set the value of the matrix # ...
/cachematrix.R
no_license
chernyshalexander/ProgrammingAssignment2
R
false
false
1,467
r
# Matrix inversion is usually a costly computation and there may be some benefit # to caching the inverse of a matrix rather than compute it repeatedly. The # following two functions are used to cache the inverse of a matrix. # makeCacheMatrix creates a list containing a function to # 1. set the value of the matrix # ...
# Twitter # API only has data going back 6-9 days devtools::install_github("mkearney/rtweet") library(rtweet) ## Authenticate Twitter app # name assigned to created app appname <- "soil_health_mapping" # api key key <- "qYu7Yf9ukJY21ycnEu06IdwBA" # api secret secret <- "BzdAqJRNE69Vg9MYsCsyGqrmOP6qeTucr4BCPvqKkxcDVRa...
/twitter/twitter.R
no_license
Science-for-Nature-and-People/soilc-text_mapping
R
false
false
901
r
# Twitter # API only has data going back 6-9 days devtools::install_github("mkearney/rtweet") library(rtweet) ## Authenticate Twitter app # name assigned to created app appname <- "soil_health_mapping" # api key key <- "qYu7Yf9ukJY21ycnEu06IdwBA" # api secret secret <- "BzdAqJRNE69Vg9MYsCsyGqrmOP6qeTucr4BCPvqKkxcDVRa...
library(nonparaeff) ### Name: effdea.b.f ### Title: Linear Programming for the Data Envelopment Analysis ### Aliases: effdea.b.f ### Keywords: Data Envelopment Analysis ### ** Examples ## input-oriented DEA under the CRS assumption (1 input and 1 output) tab3.1.dat <- data.frame(y = c(1, 2, 4, 6, 7, 9, 9), ...
/data/genthat_extracted_code/nonparaeff/examples/effdea.b.f.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
464
r
library(nonparaeff) ### Name: effdea.b.f ### Title: Linear Programming for the Data Envelopment Analysis ### Aliases: effdea.b.f ### Keywords: Data Envelopment Analysis ### ** Examples ## input-oriented DEA under the CRS assumption (1 input and 1 output) tab3.1.dat <- data.frame(y = c(1, 2, 4, 6, 7, 9, 9), ...