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/plotD3_prediction.R \name{plotD3_prediction} \alias{plotD3_prediction} \alias{plotD3Prediction} \title{Plot Prediction vs Target, Observed or Variable Values in D3 with r2d3 package.} \usage{ plotD3_prediction(object, ..., variable = "_y_", p...
/man/plotD3_prediction.Rd
no_license
a3digit/auditor
R
false
true
2,866
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotD3_prediction.R \name{plotD3_prediction} \alias{plotD3_prediction} \alias{plotD3Prediction} \title{Plot Prediction vs Target, Observed or Variable Values in D3 with r2d3 package.} \usage{ plotD3_prediction(object, ..., variable = "_y_", p...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/add.R, R/add_.R \name{eline} \alias{eline} \alias{eline} \alias{eline_} \title{Add lines} \usage{ eline(p, serie, name = NULL, stack = NULL, clickable = TRUE, xAxisIndex = 0, yAxisIndex = 0, symbol = NULL, symbolSize = "2 | 4", symbolRota...
/man/eline.Rd
no_license
JohnCoene/echarts
R
false
true
3,288
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/add.R, R/add_.R \name{eline} \alias{eline} \alias{eline} \alias{eline_} \title{Add lines} \usage{ eline(p, serie, name = NULL, stack = NULL, clickable = TRUE, xAxisIndex = 0, yAxisIndex = 0, symbol = NULL, symbolSize = "2 | 4", symbolRota...
set.seed(123) library(vdiffr) co <- function(expr) capture.output(expr, file = NULL) data(geese_data_day1) # Load into simmr simmr_1 <- with( geese_data_day1, simmr_load( mixtures = mixtures, source_names = source_names, source_means = source_means, source_sds = source_sds, correction_means = ...
/tests/testthat/test_simmr_print_summary.R
no_license
andrewcparnell/simmr
R
false
false
2,622
r
set.seed(123) library(vdiffr) co <- function(expr) capture.output(expr, file = NULL) data(geese_data_day1) # Load into simmr simmr_1 <- with( geese_data_day1, simmr_load( mixtures = mixtures, source_names = source_names, source_means = source_means, source_sds = source_sds, correction_means = ...
# Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate context("Test GenomeApi") api.instance <- GenomeApi$new() test_that("AssemblyDescriptorsByAccessions", { # tests for AssemblyDescriptorsByAccessions # base path: https://api.ncbi.nlm.nih.gov/dat...
/tests/testthat/test_genome_api.R
no_license
zhang-ncbi/dataset_r_test
R
false
false
7,897
r
# Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate context("Test GenomeApi") api.instance <- GenomeApi$new() test_that("AssemblyDescriptorsByAccessions", { # tests for AssemblyDescriptorsByAccessions # base path: https://api.ncbi.nlm.nih.gov/dat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MultivariateOutlierFunction.R \name{OptimalEpsilon} \alias{OptimalEpsilon} \title{Calculation of the optimal value for the epsilon parameter used in dbscan} \usage{ OptimalEpsilon(df) } \arguments{ \item{df, }{a dataframe of numerical variabl...
/man/OptimalEpsilon.Rd
permissive
sbbauer/automatic-data-explorer
R
false
true
660
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MultivariateOutlierFunction.R \name{OptimalEpsilon} \alias{OptimalEpsilon} \title{Calculation of the optimal value for the epsilon parameter used in dbscan} \usage{ OptimalEpsilon(df) } \arguments{ \item{df, }{a dataframe of numerical variabl...
library(randomForest) library(gbm) #foor Auc require(verification) ?roc.area employee = read.csv("/home/pramiti/R_codes/kaggle/amazon_access_problem/train.csv", header=TRUE) emp_test = read.csv("/home/pramiti/R_codes/kaggle/amazon_access_problem/test.csv", header= TRUE) View(employee) View(emp_test) #for unbalanced ...
/amazon_access_problem/employee_randonforest_gbm_crossvalidation.R
no_license
pg20/kaggle
R
false
false
3,242
r
library(randomForest) library(gbm) #foor Auc require(verification) ?roc.area employee = read.csv("/home/pramiti/R_codes/kaggle/amazon_access_problem/train.csv", header=TRUE) emp_test = read.csv("/home/pramiti/R_codes/kaggle/amazon_access_problem/test.csv", header= TRUE) View(employee) View(emp_test) #for unbalanced ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SIMPLE_B.R \name{SIMPLE_B} \alias{SIMPLE_B} \title{Impute zero entries and clustering for scRNASeq data integrating bulk RNASeq} \usage{ SIMPLE_B( dat, K0, bulk, celltype, M0 = 1, clus = NULL, K = 20, b = 1, iter = 10, est...
/man/SIMPLE_B.Rd
permissive
JunLiuLab/SIMPLEs
R
false
true
9,043
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SIMPLE_B.R \name{SIMPLE_B} \alias{SIMPLE_B} \title{Impute zero entries and clustering for scRNASeq data integrating bulk RNASeq} \usage{ SIMPLE_B( dat, K0, bulk, celltype, M0 = 1, clus = NULL, K = 20, b = 1, iter = 10, est...
\alias{gdkGCSetValues} \name{gdkGCSetValues} \title{gdkGCSetValues} \description{Sets attributes of a graphics context in bulk. For each flag set in \code{values.mask}, the corresponding field will be read from \code{values} and set as the new value for \code{gc}. If you're only setting a few values on \code{gc}, calli...
/man/gdkGCSetValues.Rd
no_license
cran/RGtk2.10
R
false
false
656
rd
\alias{gdkGCSetValues} \name{gdkGCSetValues} \title{gdkGCSetValues} \description{Sets attributes of a graphics context in bulk. For each flag set in \code{values.mask}, the corresponding field will be read from \code{values} and set as the new value for \code{gc}. If you're only setting a few values on \code{gc}, calli...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rbd.getBindingSeq.R \name{rbd.getBindingSeq} \alias{rbd.getBindingSeq} \title{Get Binding Sequence from RBDmap Data - Zhang et. al 2019 Method} \usage{ rbd.getBindingSeq( ms_sequence, protease, sequence_for_alignment, protein_name = N...
/man/rbd.getBindingSeq.Rd
no_license
egmg726/crisscrosslinker
R
false
true
1,247
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rbd.getBindingSeq.R \name{rbd.getBindingSeq} \alias{rbd.getBindingSeq} \title{Get Binding Sequence from RBDmap Data - Zhang et. al 2019 Method} \usage{ rbd.getBindingSeq( ms_sequence, protease, sequence_for_alignment, protein_name = N...
## Author: Molla Hunegnaw Asmare ## Date: 27 April 2014 ## The script tries to use cashed value of inversed Matrix to reduce cost of computation and avoids ## repeated matrix inverstion. ## There are two functions in the script: ## 1. makeCacheMatrix creates a special "matrix" object that can cache its inverse...
/cachematrix.R
no_license
mhunegnaw/ProgrammingAssignment2
R
false
false
1,601
r
## Author: Molla Hunegnaw Asmare ## Date: 27 April 2014 ## The script tries to use cashed value of inversed Matrix to reduce cost of computation and avoids ## repeated matrix inverstion. ## There are two functions in the script: ## 1. makeCacheMatrix creates a special "matrix" object that can cache its inverse...
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704...
/myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615764806-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
1,803
r
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704...
library(shiny) source("../../analysis/R/decode.R") source("../../analysis/R/simulation.R") source("../../analysis/R/encode.R") Plot <- function(x, color = "grey") { n <- nrow(x) if (n < 16) { par(mfrow = c(n, 1), mai = c(0, .5, .5, 0)) } else if (n < 64) { par(mfrow = c(n / 2, 2), mai = c(0, .5, .5, 0)) ...
/apps/rappor-sim/server.R
permissive
ysl/rappor
R
false
false
4,313
r
library(shiny) source("../../analysis/R/decode.R") source("../../analysis/R/simulation.R") source("../../analysis/R/encode.R") Plot <- function(x, color = "grey") { n <- nrow(x) if (n < 16) { par(mfrow = c(n, 1), mai = c(0, .5, .5, 0)) } else if (n < 64) { par(mfrow = c(n / 2, 2), mai = c(0, .5, .5, 0)) ...
## Exploratory Data Analysis Week 1 assignment #2/4 # # read in file fUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" # download data and unzip it download.file(fUrl, destfile = "./data.zip", method = "curl") unzip("data.zip", exdir = ".") # read in source file (.txt) a...
/plot2.R
no_license
ttompk/ExData_Plotting1
R
false
false
1,102
r
## Exploratory Data Analysis Week 1 assignment #2/4 # # read in file fUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" # download data and unzip it download.file(fUrl, destfile = "./data.zip", method = "curl") unzip("data.zip", exdir = ".") # read in source file (.txt) a...
head(cars) tail(cars) help("cars") cars$kph <- 1.609 * cars$speed cars$m <- 0.3048 * cars$dist head(cars) mean(cars$kph) max(cars$kph) min(cars$kph) median(cars$kph) summary(cars$kph) sort(cars$kph) # ggggg require("ggplot2") qplot(data=cars,kph,binwidth=2.5, xlab="Скорость машины (км/ч)", ylab="Количеств...
/klsh2014/data_analysis/script_4.R
no_license
bdemeshev/klsh
R
false
false
1,816
r
head(cars) tail(cars) help("cars") cars$kph <- 1.609 * cars$speed cars$m <- 0.3048 * cars$dist head(cars) mean(cars$kph) max(cars$kph) min(cars$kph) median(cars$kph) summary(cars$kph) sort(cars$kph) # ggggg require("ggplot2") qplot(data=cars,kph,binwidth=2.5, xlab="Скорость машины (км/ч)", ylab="Количеств...
#Loads raw data from MATLAB files for second backwards paper first experiment require(R.matlab) #define function to be used below turnMATintoMeltedDataframe<- function(fromMAT) { #It was imported as a list of lists mydata<-fromMAT numTrials<- length( unlist( mydata$allConditions ) ) #Some of the list members a...
/data-raw/turnMATintoMeltedDataframe.R
permissive
alexholcombe/mixRSVP
R
false
false
3,516
r
#Loads raw data from MATLAB files for second backwards paper first experiment require(R.matlab) #define function to be used below turnMATintoMeltedDataframe<- function(fromMAT) { #It was imported as a list of lists mydata<-fromMAT numTrials<- length( unlist( mydata$allConditions ) ) #Some of the list members a...
#' @name kobo_dico #' @rdname kobo_dico #' @title Data dictionnary #' #' @description Produce a data dictionnary based on the xlsform for the project #' #' @param form The full filename of the form to be accessed (xls or xlsx file). #' It is assumed that the form is stored in the data folder. #' #' #' @return A "data...
/R/kobo_dico.R
no_license
hkejigu/koboloadeR
R
false
false
24,834
r
#' @name kobo_dico #' @rdname kobo_dico #' @title Data dictionnary #' #' @description Produce a data dictionnary based on the xlsform for the project #' #' @param form The full filename of the form to be accessed (xls or xlsx file). #' It is assumed that the form is stored in the data folder. #' #' #' @return A "data...
suppressPackageStartupMessages({ library(tidytext) library(tidyverse) library(stringr) library(knitr) library(wordcloud) library(ngram) }) start_time <- Sys.time() #' ## Data Loading and Summarizing #+ DataLoading #' English Repository Files blogs_file <- "final/en_US/en_US.blogs.txt" news_file <- "f...
/ExploratoryAnalysis.R
no_license
PuneetSingla5822/Capstone
R
false
false
7,171
r
suppressPackageStartupMessages({ library(tidytext) library(tidyverse) library(stringr) library(knitr) library(wordcloud) library(ngram) }) start_time <- Sys.time() #' ## Data Loading and Summarizing #+ DataLoading #' English Repository Files blogs_file <- "final/en_US/en_US.blogs.txt" news_file <- "f...
library(plyr) setwd("~/Documents/github/Delhi/") ########################################################## ##### Compare with discom demand from another source ##### ########################################################## #### Get hourly demand for grids #### # read in grid level demand data #### demand_grid <- ...
/code/discom_bounded_subdiv_analysis.R
no_license
Ecohen4/Delhi
R
false
false
3,567
r
library(plyr) setwd("~/Documents/github/Delhi/") ########################################################## ##### Compare with discom demand from another source ##### ########################################################## #### Get hourly demand for grids #### # read in grid level demand data #### demand_grid <- ...
#------------------------------------------------------------------------------- # Environment Set-up #------------------------------------------------------------------------------- rm(list=ls(all=TRUE)) gc() options(scipen=999) # Load required libraries library(readr) library(xgboost) # Set working directory # setw...
/Model/Submission/Codes/xgboost_submission_22.R
no_license
vikasnitk85/RossmannStoreSales
R
false
false
3,923
r
#------------------------------------------------------------------------------- # Environment Set-up #------------------------------------------------------------------------------- rm(list=ls(all=TRUE)) gc() options(scipen=999) # Load required libraries library(readr) library(xgboost) # Set working directory # setw...
# mean(iris[,"Sepal.Length"],na.rm = TRUE) zzz<-iris[1>1,"Sepal.Length"] zzz set.seed(10) x <- rep(0:1, each = 5) e <- rnorm(10, 0, 20) y <- 0.5 + 2 * x + e x e y library(datasets) Rprof() fit <- lm(y ~ x1 + x2) Rprof(NULL)
/02_RProgramming/misc.R
no_license
Hagser/RProgramming
R
false
false
226
r
# mean(iris[,"Sepal.Length"],na.rm = TRUE) zzz<-iris[1>1,"Sepal.Length"] zzz set.seed(10) x <- rep(0:1, each = 5) e <- rnorm(10, 0, 20) y <- 0.5 + 2 * x + e x e y library(datasets) Rprof() fit <- lm(y ~ x1 + x2) Rprof(NULL)
library(chron) library(RColorBrewer) library(lattice) library(ncdf4) setwd("~/PlantProject/CRU_DatasetsYearly//") dname <- "tmp" temp = list.files(pattern="*.nc") # Loop over files for(i in seq_along(temp)) { ncin = nc_open(temp[i]) # open a NetCDF file # print(ncin) # Get longitude values lon <-...
/SaveCSV.R
no_license
msilva00/PlantProject
R
false
false
3,718
r
library(chron) library(RColorBrewer) library(lattice) library(ncdf4) setwd("~/PlantProject/CRU_DatasetsYearly//") dname <- "tmp" temp = list.files(pattern="*.nc") # Loop over files for(i in seq_along(temp)) { ncin = nc_open(temp[i]) # open a NetCDF file # print(ncin) # Get longitude values lon <-...
determine.lambda <- function(y, s2, tau2.re, penalty = "tau2", n.lambda = 100, lambda.scale = "log", tol = 10^(-10), lam.c = 1.2) { if(missing(y)) stop("please specify effect size.") if(missing(s2)) stop("please specify within-study variance.") if(length(y) != length(s2) | any(s2 < 0)...
/R/determine.lambda.R
no_license
cran/altmeta
R
false
false
1,300
r
determine.lambda <- function(y, s2, tau2.re, penalty = "tau2", n.lambda = 100, lambda.scale = "log", tol = 10^(-10), lam.c = 1.2) { if(missing(y)) stop("please specify effect size.") if(missing(s2)) stop("please specify within-study variance.") if(length(y) != length(s2) | any(s2 < 0)...
Dixon <- c(112,117,119,125,129,131,135,139,140,167)
/ZetaFour/DixonTest.R
no_license
anhnguyendepocen/StatsMaster
R
false
false
53
r
Dixon <- c(112,117,119,125,129,131,135,139,140,167)
testlist <- list(A = structure(c(2.31584307392677e+77, 1.03542155949144e+220, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0), .Dim = c(1L, 7L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613109767-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
257
r
testlist <- list(A = structure(c(2.31584307392677e+77, 1.03542155949144e+220, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0), .Dim = c(1L, 7L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
shinyUI(uiOutput("mode"))
/ui.R
no_license
JulioMh/TFG
R
false
false
26
r
shinyUI(uiOutput("mode"))
write_variable_attributes_tag<-function(var_metadata,varid,ncfile){ ncatt_put(ncfile,varid,'long_name',var_metadata$long_name) ncatt_put(ncfile,varid,'standard_name',var_metadata$standard_name) ncatt_put(ncfile,varid,'units',var_metadata$units) ncatt_put(ncfile,varid,'Conventions',var_metadata$Conventions)...
/write_variable_attributes_tag.R
no_license
aenieblas/POPSTAR_NetCDF
R
false
false
1,444
r
write_variable_attributes_tag<-function(var_metadata,varid,ncfile){ ncatt_put(ncfile,varid,'long_name',var_metadata$long_name) ncatt_put(ncfile,varid,'standard_name',var_metadata$standard_name) ncatt_put(ncfile,varid,'units',var_metadata$units) ncatt_put(ncfile,varid,'Conventions',var_metadata$Conventions)...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PET.R \name{LAI2hc} \alias{LAI2hc} \title{Calculate vegetation height from Leaf Area Index (LAI), Eq 4.2.23 in David R Maidment, Handbook of Hydrology \code{LAI2hc}} \usage{ LAI2hc(lai) } \arguments{ \item{lai}{Leaf Area Index (LAI) [m2 m-2]}...
/man/LAI2hc.Rd
permissive
SHUD-System/rSHUD
R
false
true
590
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PET.R \name{LAI2hc} \alias{LAI2hc} \title{Calculate vegetation height from Leaf Area Index (LAI), Eq 4.2.23 in David R Maidment, Handbook of Hydrology \code{LAI2hc}} \usage{ LAI2hc(lai) } \arguments{ \item{lai}{Leaf Area Index (LAI) [m2 m-2]}...
BaseflowSeparation <- function(streamflow, filter_parameter=0.925, passes=3){ suppressWarnings(Ends<-c(1,length(streamflow))*rep(1,(passes+1))) # Start and end values for the filter function suppressWarnings(AddToStart<-c(1,-1)*rep(1,passes)) btP<-streamflow##Previous pass's baseflow approximation qft<-vector(leng...
/R/BaseflowSeparation.R
no_license
cran/EcoHydRology
R
false
false
1,077
r
BaseflowSeparation <- function(streamflow, filter_parameter=0.925, passes=3){ suppressWarnings(Ends<-c(1,length(streamflow))*rep(1,(passes+1))) # Start and end values for the filter function suppressWarnings(AddToStart<-c(1,-1)*rep(1,passes)) btP<-streamflow##Previous pass's baseflow approximation qft<-vector(leng...
## pseudotime ## # load arguments arg <- commandArgs(T) print(arg) if(length(arg)!= 9){stop("pseudotime.R <sparse> <motif.deviations> <gene> <TFgene> <meta> <svd> <prefix> <config> <threads>")} sparse <- as.character(arg[1]) motif <- as.character(arg[2]) gene <- as.character(arg[3]) tfgene <- as.character(arg[4]) meta...
/R/pseudotime.R
permissive
Zeyu618/maize_single_cell_cis_regulatory_atlas
R
false
false
31,093
r
## pseudotime ## # load arguments arg <- commandArgs(T) print(arg) if(length(arg)!= 9){stop("pseudotime.R <sparse> <motif.deviations> <gene> <TFgene> <meta> <svd> <prefix> <config> <threads>")} sparse <- as.character(arg[1]) motif <- as.character(arg[2]) gene <- as.character(arg[3]) tfgene <- as.character(arg[4]) meta...
simple_rolling_average_coupled <- function(data, metric, acute_period, chronic_period) { data %>% mutate( acute = rollapply(data[,metric], acute_period, FUN = mean, na.rm = TRUE, fill = NA, align = "right"), chronic = rollapply(data[,metric], chronic_period, FUN = mean, na.rm = TRUE, fill = NA, align...
/acr_calculations.R
no_license
jotremblay/euclid
R
false
false
2,140
r
simple_rolling_average_coupled <- function(data, metric, acute_period, chronic_period) { data %>% mutate( acute = rollapply(data[,metric], acute_period, FUN = mean, na.rm = TRUE, fill = NA, align = "right"), chronic = rollapply(data[,metric], chronic_period, FUN = mean, na.rm = TRUE, fill = NA, align...
#' Simulated dataset for package 'DecisionCurve' #' #' Simulated cohort data containing demographic variables, #' marker values and cancer outcome. #' #' @format A data frame with 500 rows and 6 variables: #' \itemize{ #' \item Age: Age in years. #' \item Female: Indicator for female gender. #' \item Smokes: Indi...
/R/data.R
no_license
cran/BioPET
R
false
false
485
r
#' Simulated dataset for package 'DecisionCurve' #' #' Simulated cohort data containing demographic variables, #' marker values and cancer outcome. #' #' @format A data frame with 500 rows and 6 variables: #' \itemize{ #' \item Age: Age in years. #' \item Female: Indicator for female gender. #' \item Smokes: Indi...
################################## # Load data and required packages ################################## if(!require(tidyverse)) install.packages("tidyverse", repos = "http://cran.us.r-project.org") if(!require(caret)) install.packages("caret", repos = "http://cran.us.r-project.org") if(!require(data.table)) in...
/Diabetes_Prediction.R
no_license
apurba-das/Diabetes-Prediction
R
false
false
9,621
r
################################## # Load data and required packages ################################## if(!require(tidyverse)) install.packages("tidyverse", repos = "http://cran.us.r-project.org") if(!require(caret)) install.packages("caret", repos = "http://cran.us.r-project.org") if(!require(data.table)) in...
context("DOCX text") library(xml2) library(gdtools) test_that("text can be found", { file <- tempfile() dml_docx( file = file, bg = "transparent" ) plot.new() text(0.2, 0.2, "hello") dev.off() x <- read_xml(file) xpath_ <- ".//wps:wsp/wps:txbx/w:txbxContent/w:p/w:r/w:t" text_node <- xml_find_first(x...
/tests/testthat/test-docx-text.R
no_license
zoyi/rvg
R
false
false
6,063
r
context("DOCX text") library(xml2) library(gdtools) test_that("text can be found", { file <- tempfile() dml_docx( file = file, bg = "transparent" ) plot.new() text(0.2, 0.2, "hello") dev.off() x <- read_xml(file) xpath_ <- ".//wps:wsp/wps:txbx/w:txbxContent/w:p/w:r/w:t" text_node <- xml_find_first(x...
#Plot the memory model, first argument is the upperbound, the the dataset containing the plotting data #Load Data args<-commandArgs(TRUE) upperbound <- as.integer(args[1]) dataset <- read.csv(args[2]) filename = gsub(".csv", "", args[2]) fileNameEt <- paste(filename, "_AVG_A.png", sep="") graphtitle1 <- "MEMORY AFTER ...
/analysis/avg/PlotAVGExecutionMemoryACLI.r
permissive
streamreasoning/heaven
R
false
false
1,680
r
#Plot the memory model, first argument is the upperbound, the the dataset containing the plotting data #Load Data args<-commandArgs(TRUE) upperbound <- as.integer(args[1]) dataset <- read.csv(args[2]) filename = gsub(".csv", "", args[2]) fileNameEt <- paste(filename, "_AVG_A.png", sep="") graphtitle1 <- "MEMORY AFTER ...
#' @title make data for upset plot #' #' @description this is just re-naming some variables so that they #' read clearly in the upset plot. #' #' @param descriptive_data a target created by `make_descriptive_data()` #' make_upset_data <- function(descriptive_data) { descriptive_data %>% select(demo_age, ...
/R/make_upset_data.R
no_license
bcjaeger/INTERMACS-imputation-ML
R
false
false
734
r
#' @title make data for upset plot #' #' @description this is just re-naming some variables so that they #' read clearly in the upset plot. #' #' @param descriptive_data a target created by `make_descriptive_data()` #' make_upset_data <- function(descriptive_data) { descriptive_data %>% select(demo_age, ...
#Artificial_neural_network getwd() setwd("C:\\Users\\gaura\\Desktop\\MachineLearning\\7.Deep_Learning\\Artificial_neural_network\\R") dataset <- read.csv("Churn_Modelling.csv") dataset=dataset[4:14] #preprocessing 1st steps View(dataset) #encoding the categorical variable as factors dataset$Geography = as.nu...
/ANN.R
no_license
Gaurav715/MACHINELEARNING-using-R
R
false
false
1,669
r
#Artificial_neural_network getwd() setwd("C:\\Users\\gaura\\Desktop\\MachineLearning\\7.Deep_Learning\\Artificial_neural_network\\R") dataset <- read.csv("Churn_Modelling.csv") dataset=dataset[4:14] #preprocessing 1st steps View(dataset) #encoding the categorical variable as factors dataset$Geography = as.nu...
missmap(df.train, main="Titanic Training Data - Missings Map",col=c("yellow", "black"), legend=FALSE) barplot(table(df.train$Survived), names.arg = c("Perished", "Survived"), main="Survived (passenger fate)", col="black") barplot(table(df.train$Pclass), names.arg = c("first", "second", "third...
/plots.R
no_license
biarchitect/kTitanic
R
false
false
1,941
r
missmap(df.train, main="Titanic Training Data - Missings Map",col=c("yellow", "black"), legend=FALSE) barplot(table(df.train$Survived), names.arg = c("Perished", "Survived"), main="Survived (passenger fate)", col="black") barplot(table(df.train$Pclass), names.arg = c("first", "second", "third...
\docType{data} \name{Heightweight} \alias{Heightweight} \title{Height and Weight} \format{A data frame with 81 observations on the following variables. \itemize{ \item{\code{female}} {0 = male, 1 = female} \item{\code{gender}} {a factor with levels \code{male} or \code{female}} \item{\code{height}} {sub...
/man/Heightweight.Rd
no_license
datandrews/mosaic
R
false
false
696
rd
\docType{data} \name{Heightweight} \alias{Heightweight} \title{Height and Weight} \format{A data frame with 81 observations on the following variables. \itemize{ \item{\code{female}} {0 = male, 1 = female} \item{\code{gender}} {a factor with levels \code{male} or \code{female}} \item{\code{height}} {sub...
##Functions to find the Inverse of the Matrix. #makeCacheMatrix is used to create the matrix Object with Matrix Inverse getter and setter functions makeCacheMatrix <- function(x = matrix()) { matrixInv <- NULL set <- function(y) { x <<- y matrixInv <<- NULL } get <- function() x set...
/cachematrix.R
no_license
hstthodar/ProgrammingAssignment2
R
false
false
802
r
##Functions to find the Inverse of the Matrix. #makeCacheMatrix is used to create the matrix Object with Matrix Inverse getter and setter functions makeCacheMatrix <- function(x = matrix()) { matrixInv <- NULL set <- function(y) { x <<- y matrixInv <<- NULL } get <- function() x set...
#' fbsites. #' #' Provides some tools to manage field site data. #' #' @name fbsites #' @docType package NULL
/R/fbsites-package.r
no_license
c5sire/fbsites
R
false
false
110
r
#' fbsites. #' #' Provides some tools to manage field site data. #' #' @name fbsites #' @docType package NULL
source("incl/start.R") message("findGlobals() with formula ...") g <- findGlobals(. ~ x + y : z, substitute = TRUE) print(g) assert_identical_sets(g, c("~", ".", "+", "x", ":", "y", "z")) g <- findGlobals(map(1L, ~ typeof(.x)), substitute = TRUE) print(g) assert_identical_sets(g, c("map", "~", "typeof", ".x")) mess...
/tests/formulas.R
no_license
DavisVaughan/globals
R
false
false
680
r
source("incl/start.R") message("findGlobals() with formula ...") g <- findGlobals(. ~ x + y : z, substitute = TRUE) print(g) assert_identical_sets(g, c("~", ".", "+", "x", ":", "y", "z")) g <- findGlobals(map(1L, ~ typeof(.x)), substitute = TRUE) print(g) assert_identical_sets(g, c("map", "~", "typeof", ".x")) mess...
power_consumption<- read.csv("household_power_consumption.txt", header=TRUE,sep=";",nrows = 2075259,check.names = FALSE,stringsAsFactors = FALSE,comment.char = " ",quote = '\"') power_data<-subset(power_consumption,Date %in% c("1/2/2007","2/2/2007")) power_data$Date<- as.Date(power_data$Date,format = "%d/%m/%Y") dateti...
/Plot 4.R
no_license
Paulominandy/ExData_Plotting1
R
false
false
1,333
r
power_consumption<- read.csv("household_power_consumption.txt", header=TRUE,sep=";",nrows = 2075259,check.names = FALSE,stringsAsFactors = FALSE,comment.char = " ",quote = '\"') power_data<-subset(power_consumption,Date %in% c("1/2/2007","2/2/2007")) power_data$Date<- as.Date(power_data$Date,format = "%d/%m/%Y") dateti...
## ============================================================================= ## ## nand gate problem, ## ## This code is derived from the Test Set for IVP solvers ## http://www.dm.uniba.it/~testset/ ## index 0 IDE of dimension 14 ## ## ===============================================================...
/R/ex_nand.R
no_license
cran/deTestSet
R
false
false
2,021
r
## ============================================================================= ## ## nand gate problem, ## ## This code is derived from the Test Set for IVP solvers ## http://www.dm.uniba.it/~testset/ ## index 0 IDE of dimension 14 ## ## ===============================================================...
## Caching the Inverse of a Matrix: ## 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. ## Below are a pair of functions that are used to create a special object that ## stores a matrix and caches its inverse. ## T...
/cachematrix.R
no_license
Abhishek2511/ProgrammingAssignment2
R
false
false
1,359
r
## Caching the Inverse of a Matrix: ## 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. ## Below are a pair of functions that are used to create a special object that ## stores a matrix and caches its inverse. ## T...
library(readr) library(tidyr) library(dplyr) library(magrittr) library(ggplot2) library(rstanarm) library(lme4) ## READ THE DATA poverty <- read_csv("poverty.csv") elections <- read_csv("elections.csv") # elections1 <- read_csv("https://raw.githubusercontent.com/MEDSL/2018-elections-unoffical/master/election-context-2...
/Poverty Data.R
no_license
acook95/Midterm_Project
R
false
false
9,395
r
library(readr) library(tidyr) library(dplyr) library(magrittr) library(ggplot2) library(rstanarm) library(lme4) ## READ THE DATA poverty <- read_csv("poverty.csv") elections <- read_csv("elections.csv") # elections1 <- read_csv("https://raw.githubusercontent.com/MEDSL/2018-elections-unoffical/master/election-context-2...
shinyServer( function(input, output) { # create dataframe with selected input variables new_df <- reactive({ College[, c(input$x_var, input$y_var)] }) # run k-means with selected number of clusters k_clust <- reactive({ kmeans(new_df(), input$num_clusters) }) output$p...
/server.R
no_license
owl775/DataProducts
R
false
false
554
r
shinyServer( function(input, output) { # create dataframe with selected input variables new_df <- reactive({ College[, c(input$x_var, input$y_var)] }) # run k-means with selected number of clusters k_clust <- reactive({ kmeans(new_df(), input$num_clusters) }) output$p...
# This function stores the matrix and creates somewhere to hold the inverted matrix makeCacheMatrix <- function(x = numeric()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(solve) m <<- solve # in...
/cachematrix.R
no_license
peregrinari/ProgrammingAssignment2
R
false
false
1,381
r
# This function stores the matrix and creates somewhere to hold the inverted matrix makeCacheMatrix <- function(x = numeric()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(solve) m <<- solve # in...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/response.R \name{response} \alias{GDCResponse} \alias{response} \alias{response.GDCQuery} \alias{response_all} \title{Fetch \code{\link{GDCQuery}} metadata from GDC} \usage{ response(x, ...) \method{response}{GDCQuery}(x, from = 1, size = 10...
/man/response.Rd
no_license
sowmyaiyer/GenomicDataCommons
R
false
true
1,119
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/response.R \name{response} \alias{GDCResponse} \alias{response} \alias{response.GDCQuery} \alias{response_all} \title{Fetch \code{\link{GDCQuery}} metadata from GDC} \usage{ response(x, ...) \method{response}{GDCQuery}(x, from = 1, size = 10...
drought <- function(sw_in, tc, pn, lat, elev, g_cover) { source("splash_Main_point.R") SP_result_daily <- splash(sw_in,tc,pn, lat, elev) # for (r in 1:nrow(SP_result_daily)) { # if (is.na(SP_result_daily$pet[r])==T) { # SP_result_daily$pet[r] <- 0 # } # if (is.na(SP_result_daily$aet[r])==T) { ...
/soil_moisture_function.R
no_license
Troc91/PModel
R
false
false
1,722
r
drought <- function(sw_in, tc, pn, lat, elev, g_cover) { source("splash_Main_point.R") SP_result_daily <- splash(sw_in,tc,pn, lat, elev) # for (r in 1:nrow(SP_result_daily)) { # if (is.na(SP_result_daily$pet[r])==T) { # SP_result_daily$pet[r] <- 0 # } # if (is.na(SP_result_daily$aet[r])==T) { ...
# FLIndices.R - FLIndices class and methods # Author: FLR Team # Maintainer: Richard Hillary, Imperial College London # Additions: # Last Change: 11 ene 2007 14:51 # $Id: FLIndices.R,v 1.3.2.11.2.1 2007/01/27 18:57:04 ejardim Exp $ # Reference: # Notes: ## class :: FLIndices validFLIndices <- function(object){ #...
/R/FLIndices.R
no_license
cran/FLCore
R
false
false
4,451
r
# FLIndices.R - FLIndices class and methods # Author: FLR Team # Maintainer: Richard Hillary, Imperial College London # Additions: # Last Change: 11 ene 2007 14:51 # $Id: FLIndices.R,v 1.3.2.11.2.1 2007/01/27 18:57:04 ejardim Exp $ # Reference: # Notes: ## class :: FLIndices validFLIndices <- function(object){ #...
# ALADYM Age length based dynamic model - version 12.3 # Authors: G. Lembo, I. Bitetto, M.T. Facchini, M.T. Spedicato 2018 # COISPA Tecnologia & Ricerca, Via dei Trulli 18/20 - (Bari), Italy # In case of use of the model, the Authors should be cited. # If you have any comments or suggestions please contact the follow...
/BEMTOOL-ver2.5-2018_0901/src/biol/bmtALADYM/ALADYM-ver12.3-2017_0501/gui/forecast/selectivity_uncert_vector_from_file/load_selectivity_uncert_vector_from_file.r
no_license
gresci/BEMTOOL2.5
R
false
false
2,515
r
# ALADYM Age length based dynamic model - version 12.3 # Authors: G. Lembo, I. Bitetto, M.T. Facchini, M.T. Spedicato 2018 # COISPA Tecnologia & Ricerca, Via dei Trulli 18/20 - (Bari), Italy # In case of use of the model, the Authors should be cited. # If you have any comments or suggestions please contact the follow...
## Data import load("~/GitHub/The-simulations-of-the-spread-of-COVID-19-under-different-interventions-/Data/All_dat.RDATA") dat <- all_list[[region_mark]]$Data N <- all_list[[region_mark]]$Population region <- all_list[[region_mark]]$Region Policy <- all_list[[region_mark]]$Policy ## Initial time_length <- nrow(dat)...
/Code/Data_import.R
no_license
tingT0929/The-simulations-of-the-spread-of-COVID-19-under-different-interventions-
R
false
false
392
r
## Data import load("~/GitHub/The-simulations-of-the-spread-of-COVID-19-under-different-interventions-/Data/All_dat.RDATA") dat <- all_list[[region_mark]]$Data N <- all_list[[region_mark]]$Population region <- all_list[[region_mark]]$Region Policy <- all_list[[region_mark]]$Policy ## Initial time_length <- nrow(dat)...
#' Significant Earthquakes Data #' #' @source National Geophysical Data Center / World Data Service (NGDC/WDS): #' Significant Earthquake Database. National Geophysical Data Center, NOAA. #' doi:10.7289/V5TD9V7K #' \url{https://www.ngdc.noaa.gov/nndc/struts/form?t=101650&s=1&d=1} #' @format A tibble with columns: #'...
/R/data.R
no_license
connermcb/earthquakes_explorer
R
false
false
1,698
r
#' Significant Earthquakes Data #' #' @source National Geophysical Data Center / World Data Service (NGDC/WDS): #' Significant Earthquake Database. National Geophysical Data Center, NOAA. #' doi:10.7289/V5TD9V7K #' \url{https://www.ngdc.noaa.gov/nndc/struts/form?t=101650&s=1&d=1} #' @format A tibble with columns: #'...
#get_cell_type_reference_rna_seq_raw_dat.R ################################################################################ ## BLOOD ## ################################################################################ ## SmallRNA-seq: # Tom Gingeras Encode GSE24565 # B-cells 2 samples # CD-14 positive monocyte ...
/analysis/cell_type_of_origin/src/get_cell_type_reference_rna_seq_raw_dat.R
no_license
RoccoDLucero/exrna_atlas
R
false
false
12,135
r
#get_cell_type_reference_rna_seq_raw_dat.R ################################################################################ ## BLOOD ## ################################################################################ ## SmallRNA-seq: # Tom Gingeras Encode GSE24565 # B-cells 2 samples # CD-14 positive monocyte ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tmx.r \name{tmx_is.identified} \alias{tmx_is.identified} \title{Test if a factor model is identified} \usage{ tmx_is.identified(nVariables, nFactors) } \arguments{ \item{nVariables}{the number of variables measured.} \item{nFactors}{the numb...
/man/tmx_is.identified.Rd
no_license
guhjy/umx
R
false
true
1,678
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tmx.r \name{tmx_is.identified} \alias{tmx_is.identified} \title{Test if a factor model is identified} \usage{ tmx_is.identified(nVariables, nFactors) } \arguments{ \item{nVariables}{the number of variables measured.} \item{nFactors}{the numb...
#' Download near-bottom climatology data from World Ocean Atlas #' #' Download and near-bottom climatology data from Nationa Oceanographic Data Center (NODC) World Ocean Atlas 2013 or Regional Climatology and then convert to a raster object #' #' @param url A character string naming the URL of a CSV file to be downlo...
/R/Get_Bottom_WOA.R
no_license
xiaoyaowjw/OceanData
R
false
false
2,972
r
#' Download near-bottom climatology data from World Ocean Atlas #' #' Download and near-bottom climatology data from Nationa Oceanographic Data Center (NODC) World Ocean Atlas 2013 or Regional Climatology and then convert to a raster object #' #' @param url A character string naming the URL of a CSV file to be downlo...
# Load the data calculators <- read.csv("http://stat.cmu.edu/202/data/calculators.csv") # Save the data write.csv(calculators, "data-raw/calculators.csv", row.names = FALSE) usethis::use_data(calculators, overwrite = TRUE)
/data-raw/calculators.R
permissive
frank113/cmu202
R
false
false
227
r
# Load the data calculators <- read.csv("http://stat.cmu.edu/202/data/calculators.csv") # Save the data write.csv(calculators, "data-raw/calculators.csv", row.names = FALSE) usethis::use_data(calculators, overwrite = TRUE)
#!/usr/bin/env Rscript ### # Usage ### # This script is used to combine permutation results from rank-based integration method and combine results from p-value-based and effect-size-based methods. args = commandArgs(trailingOnly=TRUE) studies=as.character(args[1]) out_dir=as.character(args[2]) ### # Ch...
/study.rankprod.combine.R
no_license
bonkmp/BMIN503_Final_Project
R
false
false
3,691
r
#!/usr/bin/env Rscript ### # Usage ### # This script is used to combine permutation results from rank-based integration method and combine results from p-value-based and effect-size-based methods. args = commandArgs(trailingOnly=TRUE) studies=as.character(args[1]) out_dir=as.character(args[2]) ### # Ch...
outliers <- within(list(), { removeOutliers <- function (trainset) { trainset %>% filter( !(GrLivArea > 4000 & SalePrice < 2e5) ) } })
/house-prices/R/R/remove_outliers.R
no_license
MatrixNorm/kaggle
R
false
false
163
r
outliers <- within(list(), { removeOutliers <- function (trainset) { trainset %>% filter( !(GrLivArea > 4000 & SalePrice < 2e5) ) } })
# TODO: abstract scrapeData.R and scrapeCode.R require(rvest) require(stringr) data_dir_html <- 'http://evansresearch.us/DSC/Spring2017/ECMT/Data/' data_names <- read_html(data_dir_html) %>% html_nodes("a") %>% html_attr('href') %>% str_subset('.csv|.xls|.xlsx$') data_links <- paste0(data_dir_html, data_names) names(da...
/scrapeData.R
no_license
Synergist/ECON-4101-Applied-Econometrics
R
false
false
1,110
r
# TODO: abstract scrapeData.R and scrapeCode.R require(rvest) require(stringr) data_dir_html <- 'http://evansresearch.us/DSC/Spring2017/ECMT/Data/' data_names <- read_html(data_dir_html) %>% html_nodes("a") %>% html_attr('href') %>% str_subset('.csv|.xls|.xlsx$') data_links <- paste0(data_dir_html, data_names) names(da...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/methods_vector.R \docType{methods} \name{typeof,cudaVector-method} \alias{typeof,cudaVector} \alias{typeof,cudaVector-method} \title{Get cudaVector type} \usage{ \S4method{typeof}{cudaVector}(x) } \arguments{ \item{x}{A cudaVector obj...
/man/typeof-cudaVector-method.Rd
no_license
strategist922/gpuRcuda
R
false
false
364
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/methods_vector.R \docType{methods} \name{typeof,cudaVector-method} \alias{typeof,cudaVector} \alias{typeof,cudaVector-method} \title{Get cudaVector type} \usage{ \S4method{typeof}{cudaVector}(x) } \arguments{ \item{x}{A cudaVector obj...
# Copyright 2015 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 applic...
/tests/testthat/test-plot.R
permissive
atillmanns/ssdtools
R
false
false
2,403
r
# Copyright 2015 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 applic...
packageEnvironment <- new.env() DEBUG <- FALSE #' Read golf hole info from a KML layer #' #' Read a Folder structure from a KML file created in accordance with the conventions of this package, and produce #' a set of information about the golf hole documented in that folder. See the package README.md for details. #' ...
/R/Functions.R
permissive
scottcame/golfcoursegeo
R
false
false
11,733
r
packageEnvironment <- new.env() DEBUG <- FALSE #' Read golf hole info from a KML layer #' #' Read a Folder structure from a KML file created in accordance with the conventions of this package, and produce #' a set of information about the golf hole documented in that folder. See the package README.md for details. #' ...
#working #ENTROPY information gain https://rstudio-pubs-static.s3.amazonaws.com/202050_60f5c6dd1b884ba3ac29f1aef5c848bb.html rm(list = ls()) library(readr) adult_data <- read_csv("adult-data.csv") #summary(adult_data) #str(adult_data) set.seed(1234) income = ifelse( adult_data$income == "<=50000", "Low", "High") #nam...
/Temp/train.R
no_license
ksrikanthcnc/Data-Mining
R
false
false
1,225
r
#working #ENTROPY information gain https://rstudio-pubs-static.s3.amazonaws.com/202050_60f5c6dd1b884ba3ac29f1aef5c848bb.html rm(list = ls()) library(readr) adult_data <- read_csv("adult-data.csv") #summary(adult_data) #str(adult_data) set.seed(1234) income = ifelse( adult_data$income == "<=50000", "Low", "High") #nam...
head(df_c) head(df_i) head(df_o) head(df_od)
/01 Data/DataFrameShow.R
no_license
eg22453/DV_RProject1
R
false
false
48
r
head(df_c) head(df_i) head(df_o) head(df_od)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/current.R \name{current} \alias{current} \title{Get the current value of an Iterator without changing its state} \usage{ current(iter) } \arguments{ \item{iter}{An \code{Iterator} object} } \value{ The current value of \code{iter} } \descript...
/man/current.Rd
permissive
jacgoldsm/peruse
R
false
true
496
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/current.R \name{current} \alias{current} \title{Get the current value of an Iterator without changing its state} \usage{ current(iter) } \arguments{ \item{iter}{An \code{Iterator} object} } \value{ The current value of \code{iter} } \descript...
library(ape) testtree <- read.tree("8148_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="8148_0_unrooted.txt")
/codeml_files/newick_trees_processed/8148_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("8148_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="8148_0_unrooted.txt")
# This program draws a scatter plot with points representing enterotypes. Set1 - stable across amplicons # set 2 - stable across couple of amplicons: 12-34, 34-56, 12-56 # set 3 - not stable across amplicons at all graphEntStabil <- function(file1 = '/media/lev-genetik/980E73270E72FD96/Liege/Results/Enterotyping/2018_0...
/Archiv/Graphs_enterotype_stability.R
no_license
Lev-genetik/CEDAR_mt
R
false
false
2,708
r
# This program draws a scatter plot with points representing enterotypes. Set1 - stable across amplicons # set 2 - stable across couple of amplicons: 12-34, 34-56, 12-56 # set 3 - not stable across amplicons at all graphEntStabil <- function(file1 = '/media/lev-genetik/980E73270E72FD96/Liege/Results/Enterotyping/2018_0...
epc <- read.table("household_power_consumption.txt",header=T,sep=";",colClasses=c("character","character","double","double","double","double","double","double","numeric"),na.strings="?") epc$DateTime = paste(epc$Date, epc$Time) epc$DateTime = as.POSIXlt(epc$DateTime,format="%d/%m/%Y %H:%M:%S") epc$Date = NULL epc$Time ...
/plot3.R
no_license
jammykhan/ExData_Plotting1
R
false
false
796
r
epc <- read.table("household_power_consumption.txt",header=T,sep=";",colClasses=c("character","character","double","double","double","double","double","double","numeric"),na.strings="?") epc$DateTime = paste(epc$Date, epc$Time) epc$DateTime = as.POSIXlt(epc$DateTime,format="%d/%m/%Y %H:%M:%S") epc$Date = NULL epc$Time ...
##-----------------------------------------------------------------------## ## #TIDYTUESDAY: METEORITE IMPACTS ## ##-----------------------------------------------------------------------## ## R version 3.5.3 (2019-03-11) ## Author: Lisa Hehnke (dataplanes.org | @DataPlanes) #...
/meteorite-impacts/meteorite-impacts.R
no_license
SigWeber/tidytuesday
R
false
false
4,270
r
##-----------------------------------------------------------------------## ## #TIDYTUESDAY: METEORITE IMPACTS ## ##-----------------------------------------------------------------------## ## R version 3.5.3 (2019-03-11) ## Author: Lisa Hehnke (dataplanes.org | @DataPlanes) #...
library(dplyr) # Loading our data bechdel_rating <- read.csv("./data/bechdel_test_df.csv", stringsAsFactors = FALSE) bechdel_revenue <- read.csv("./data/Bechdel-master_revenue.csv", stringsAsFactors = FALSE) # Merging Data rating_select <- bechdel_rating %>% se...
/scripts/summary_info.R
permissive
info-201a-sp20/final-project-taylorblackburn
R
false
false
1,475
r
library(dplyr) # Loading our data bechdel_rating <- read.csv("./data/bechdel_test_df.csv", stringsAsFactors = FALSE) bechdel_revenue <- read.csv("./data/Bechdel-master_revenue.csv", stringsAsFactors = FALSE) # Merging Data rating_select <- bechdel_rating %>% se...
library(qrcm) ### Name: predict.iqr ### Title: Prediction After Quantile Regression Coefficients Modeling ### Aliases: predict.iqr ### Keywords: methods ### ** Examples # using simulated data n <- 1000 x <- runif(n) y <- rlogis(n, 1 + x, 1 + x) # true quantile function: Q(p | x) = beta0(p) + beta1(p)*...
/data/genthat_extracted_code/qrcm/examples/predict.iqr.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,216
r
library(qrcm) ### Name: predict.iqr ### Title: Prediction After Quantile Regression Coefficients Modeling ### Aliases: predict.iqr ### Keywords: methods ### ** Examples # using simulated data n <- 1000 x <- runif(n) y <- rlogis(n, 1 + x, 1 + x) # true quantile function: Q(p | x) = beta0(p) + beta1(p)*...
library(broman) ### Name: strwidth2xlim ### Title: Calculate horizontal limit in user coordinates for adding labels ### Aliases: strwidth2xlim ### ** Examples x <- runif(15,-1,1)*10 xlabs <- sapply(sample(1:20,15,replace=TRUE), function(a) paste(LETTERS[1:a], collapse="")) ## Labels to the left ## xlims <-...
/data/genthat_extracted_code/broman/examples/strwidth2xlim.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
560
r
library(broman) ### Name: strwidth2xlim ### Title: Calculate horizontal limit in user coordinates for adding labels ### Aliases: strwidth2xlim ### ** Examples x <- runif(15,-1,1)*10 xlabs <- sapply(sample(1:20,15,replace=TRUE), function(a) paste(LETTERS[1:a], collapse="")) ## Labels to the left ## xlims <-...
#' Cloud User Accounts API Objects #' Creates and manages users and groups for accessing Google Compute Engine virtual machines. #' #' Auto-generated code by googleAuthR::gar_create_api_objects #' at 2017-03-05 19:34:47 #' filename: /Users/mark/dev/R/autoGoogleAPI/googleclouduseraccountsbeta.auto/R/clouduseraccounts...
/googleclouduseraccountsbeta.auto/R/clouduseraccounts_objects.R
permissive
GVersteeg/autoGoogleAPI
R
false
false
17,074
r
#' Cloud User Accounts API Objects #' Creates and manages users and groups for accessing Google Compute Engine virtual machines. #' #' Auto-generated code by googleAuthR::gar_create_api_objects #' at 2017-03-05 19:34:47 #' filename: /Users/mark/dev/R/autoGoogleAPI/googleclouduseraccountsbeta.auto/R/clouduseraccounts...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/photo_search.R \name{photo_search} \alias{photo_search} \title{Search for photo metadata} \usage{ photo_search( mindate_taken = NULL, maxdate_taken = NULL, mindate_uploaded = NULL, maxdate_uploaded = NULL, user_id = NULL, text = N...
/man/photo_search.Rd
no_license
ropensci/photosearcher
R
false
true
8,223
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/photo_search.R \name{photo_search} \alias{photo_search} \title{Search for photo metadata} \usage{ photo_search( mindate_taken = NULL, maxdate_taken = NULL, mindate_uploaded = NULL, maxdate_uploaded = NULL, user_id = NULL, text = N...
printenv = function (env = parent.frame()) { frame = 1 while (! identical(env, baseenv())) { name = environmentName(env) name_display = sprintf('<environment: %s>', name) default_display = capture.output(env)[1] cat(default_display) if (name_display != default_display) {...
/scripts/printenv.r
permissive
klmr/box
R
false
false
1,095
r
printenv = function (env = parent.frame()) { frame = 1 while (! identical(env, baseenv())) { name = environmentName(env) name_display = sprintf('<environment: %s>', name) default_display = capture.output(env)[1] cat(default_display) if (name_display != default_display) {...
# Autor Matheus Rabetti # Relatorio da OIT # Preenchimento do questionario da OIT com base nos dados da PNAD de 2014 # Data att: 28/07/2016 # Ultima att: # BIBLIOTECA -------------------------------------------------------------- library(bit64) # leitura de dados numericos mais rapida library(descr) #...
/OIT/OIT_informal.R
no_license
MatheusRabetti/relatorio_internacional
R
false
false
8,117
r
# Autor Matheus Rabetti # Relatorio da OIT # Preenchimento do questionario da OIT com base nos dados da PNAD de 2014 # Data att: 28/07/2016 # Ultima att: # BIBLIOTECA -------------------------------------------------------------- library(bit64) # leitura de dados numericos mais rapida library(descr) #...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/timeline.R \name{timeline-opts} \alias{timeline-opts} \alias{e_timeline_opts} \alias{e_timeline_serie} \alias{e_timeline_on_serie} \title{Timeline} \usage{ e_timeline_opts(e, axis_type = "category", ...) e_timeline_serie(e, ..., index = 1) ...
/man/timeline-opts.Rd
permissive
JohnCoene/echarts4r
R
false
true
1,727
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/timeline.R \name{timeline-opts} \alias{timeline-opts} \alias{e_timeline_opts} \alias{e_timeline_serie} \alias{e_timeline_on_serie} \title{Timeline} \usage{ e_timeline_opts(e, axis_type = "category", ...) e_timeline_serie(e, ..., index = 1) ...
## final Course Project ## Coursera: Exploratory Data Analysis ## Set Working Directory setwd("~/Coursera Data Science/04 Explroatory Data Analysis") ## File URL if(!file.exists("./data")){dir.create("./data")} fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip" download.file(fileUrl, d...
/04 Explroatory Data Analysis/Project 2/plot1.R
no_license
thebbennett/coursera
R
false
false
1,340
r
## final Course Project ## Coursera: Exploratory Data Analysis ## Set Working Directory setwd("~/Coursera Data Science/04 Explroatory Data Analysis") ## File URL if(!file.exists("./data")){dir.create("./data")} fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip" download.file(fileUrl, d...
require(magpie) require("devtools") # arguments args <- commandArgs(trailingOnly = TRUE) magpie.user <- args[1] magpie.password <- args[2] magpie.url <- args[3] magpie.project_id <- args[4] magpie.model_id <- as.numeric(args[5]) df_pcr <- args[6] df_treat <- args[7] # login set_url(magpie.url) login(magpie.user, mag...
/apps/predictions/Rscripts/magpie_create_job.R
no_license
hoffmka/predictdemo
R
false
false
699
r
require(magpie) require("devtools") # arguments args <- commandArgs(trailingOnly = TRUE) magpie.user <- args[1] magpie.password <- args[2] magpie.url <- args[3] magpie.project_id <- args[4] magpie.model_id <- as.numeric(args[5]) df_pcr <- args[6] df_treat <- args[7] # login set_url(magpie.url) login(magpie.user, mag...
#ExData_Plotting2 #================ #Plotting Assignment 1 for Exploratory Data Analysis mydata = read.table("household_power_consumption.txt", sep = ";", dec = ".", header = TRUE, na.strings = "?", colClasses = c("character", "character", "numeric", "numeric...
/plot2.R
no_license
pratibha-vellanki/ExData_Plotting1
R
false
false
956
r
#ExData_Plotting2 #================ #Plotting Assignment 1 for Exploratory Data Analysis mydata = read.table("household_power_consumption.txt", sep = ";", dec = ".", header = TRUE, na.strings = "?", colClasses = c("character", "character", "numeric", "numeric...
#' Mastering Software Development in R Specialization Capstone Project #' Coursera Capstone Project #' The overall goal of the capstone project is to integrate the skills you have developed #' over the courses in this Specialization and to build a software package that can be used #' to work with the NOAA Significa...
/R/hello.R
no_license
redcomet97/RCapstone
R
false
false
19,029
r
#' Mastering Software Development in R Specialization Capstone Project #' Coursera Capstone Project #' The overall goal of the capstone project is to integrate the skills you have developed #' over the courses in this Specialization and to build a software package that can be used #' to work with the NOAA Significa...
# Pathways Heart Study Aim 1 data analysis # Zaixing Shi, 1/7/2020 library(tidyverse) library(haven) library(ggplot2) library(dplyr) library(plyr) library(naniar) library(reshape2) library(survival) library(survminer) # define function round2() to round number to exact decimal place round2 <- function(x, k) trimws(f...
/1_analysis.R
no_license
zs2192/pathwaysheart
R
false
false
53,644
r
# Pathways Heart Study Aim 1 data analysis # Zaixing Shi, 1/7/2020 library(tidyverse) library(haven) library(ggplot2) library(dplyr) library(plyr) library(naniar) library(reshape2) library(survival) library(survminer) # define function round2() to round number to exact decimal place round2 <- function(x, k) trimws(f...
#!/usr/bin/env Rscript # windowed SNPs # cjfiscus # 2021-12-09 library(pacman) p_load(data.table, IRanges, GenomicRanges, ggplot2, cowplot, patchwork) ## load data df<-fread("~/Desktop/MANUSCRIPTS/athal_data/snps_lowp.txt.gz") tests<-1325631 alpha<-0.05/tests ## subset to sig snps df<-df[,c("V1", "V2", "V4", "V15")]...
/chapter_1/figure_scripts/013_15_snp_scans.R
permissive
cjfiscus/2022_Fiscus_Dissertation
R
false
false
7,466
r
#!/usr/bin/env Rscript # windowed SNPs # cjfiscus # 2021-12-09 library(pacman) p_load(data.table, IRanges, GenomicRanges, ggplot2, cowplot, patchwork) ## load data df<-fread("~/Desktop/MANUSCRIPTS/athal_data/snps_lowp.txt.gz") tests<-1325631 alpha<-0.05/tests ## subset to sig snps df<-df[,c("V1", "V2", "V4", "V15")]...
IDASw_filter1000 <- function(data, delete_minutes_after1000 = 10, date_origin = "1970-01-01" , date_format= "%Y-%m-%d %H:%M:%S"){ #returns logical vector (length as data columns) --> TRUE:CORE#1000; FALSE: rest of values time_1000 <- as.vector( data[bin_WORK == 1, epoch_time] ) time_1000_exte...
/Rscripts/core_filtration.R
no_license
pz10/dyflux
R
false
false
12,109
r
IDASw_filter1000 <- function(data, delete_minutes_after1000 = 10, date_origin = "1970-01-01" , date_format= "%Y-%m-%d %H:%M:%S"){ #returns logical vector (length as data columns) --> TRUE:CORE#1000; FALSE: rest of values time_1000 <- as.vector( data[bin_WORK == 1, epoch_time] ) time_1000_exte...
model { # LIKELIHOOD # n= number of states # y = number of birds in each state for(i in 1:n) { y[i] ~ dpois(lambda[i]) z[i] <- beta lambda[i] <- exp(z[i]) #calculate predicitve density for use in WAIC pd[i] <- dpois(y[i],lambda[i]) #note when the lhs of the <- is not data, dpois() ...
/Labs/ModelSelection/pois.reg.0_nth.R
no_license
nthobbs50/BayesLabs
R
false
false
591
r
model { # LIKELIHOOD # n= number of states # y = number of birds in each state for(i in 1:n) { y[i] ~ dpois(lambda[i]) z[i] <- beta lambda[i] <- exp(z[i]) #calculate predicitve density for use in WAIC pd[i] <- dpois(y[i],lambda[i]) #note when the lhs of the <- is not data, dpois() ...
## simulation Poisson source("functions_general.R") source("functions_poisson.R") library(MASS) ## scenario parameters sc <- read.csv("simulation_scenarios.csv") ## allocate space to save scenario results results_poisson <- vector(mode = "list", length = 16) ## Run each for loop separately to speed to computational...
/R/simulation_poisson.R
no_license
gabriellesimoneau/Rcode_article--IPDMAcomparison
R
false
false
10,169
r
## simulation Poisson source("functions_general.R") source("functions_poisson.R") library(MASS) ## scenario parameters sc <- read.csv("simulation_scenarios.csv") ## allocate space to save scenario results results_poisson <- vector(mode = "list", length = 16) ## Run each for loop separately to speed to computational...
library(reshape2) path = 'C:/Users/mikeha/Dropbox/Threat mapping/' source(paste0(path,'scripts/ThreatMapFunctions.R')) GetSpThreatCodes<-function(threat.species.info,threat.codes, threats) { taxa.th.sp.ids = list() for(th in names(threat.codes)) { th.sp.ids = list() for(code in threat.codes[[th]]) ...
/DrawThreatCodes.R
no_license
mikeharfoot/ThreatMapping
R
false
false
5,364
r
library(reshape2) path = 'C:/Users/mikeha/Dropbox/Threat mapping/' source(paste0(path,'scripts/ThreatMapFunctions.R')) GetSpThreatCodes<-function(threat.species.info,threat.codes, threats) { taxa.th.sp.ids = list() for(th in names(threat.codes)) { th.sp.ids = list() for(code in threat.codes[[th]]) ...
#' Project a distance matrix into a lower-dimensional space. #' #' Takes as input a sparse matrix of the edge weights connecting each node to its nearest neighbors, and outputs #' a matrix of coordinates embedding the inputs in a lower-dimensional space. #' #' The algorithm attempts to estimate a \code{dim}-dimension...
/R/projectKNNs.R
no_license
zaburo-ch/largeVis
R
false
false
4,667
r
#' Project a distance matrix into a lower-dimensional space. #' #' Takes as input a sparse matrix of the edge weights connecting each node to its nearest neighbors, and outputs #' a matrix of coordinates embedding the inputs in a lower-dimensional space. #' #' The algorithm attempts to estimate a \code{dim}-dimension...
# version control ## 180407 - 생성, 목적 : ER에서 촬영된 사진명을 변경 # 작업 History ## 180407 - 2,3 월 사진을 작업함 ################################### # 1. 코드실행 전 작업 ### 1. ER에서 보내준 사진을 emroom 로 이동한다. ### 2. original-initial_rename.R 을 구동한다. (파일명 변경 후 temp_for_rename 폴더로 이동) ### 3. temp_for_rename 폴더에서 파일명의 형식을 수동으로 cleaning 한다....
/for_emroom.R
no_license
anobo23/Image_Naming_Distribution
R
false
false
1,675
r
# version control ## 180407 - 생성, 목적 : ER에서 촬영된 사진명을 변경 # 작업 History ## 180407 - 2,3 월 사진을 작업함 ################################### # 1. 코드실행 전 작업 ### 1. ER에서 보내준 사진을 emroom 로 이동한다. ### 2. original-initial_rename.R 을 구동한다. (파일명 변경 후 temp_for_rename 폴더로 이동) ### 3. temp_for_rename 폴더에서 파일명의 형식을 수동으로 cleaning 한다....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/util_finctions.R \name{asinInverseTransform} \alias{asinInverseTransform} \title{Inverse arc-sine transformation} \usage{ asinInverseTransform(p) } \arguments{ \item{p}{numeric vector} } \value{ numeric vector representing inverse of arc-sine...
/man/asinInverseTransform.Rd
no_license
karacitir/reproducerTaskGra
R
false
true
462
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/util_finctions.R \name{asinInverseTransform} \alias{asinInverseTransform} \title{Inverse arc-sine transformation} \usage{ asinInverseTransform(p) } \arguments{ \item{p}{numeric vector} } \value{ numeric vector representing inverse of arc-sine...
############S################# ## TRAIT CHANGE OVER SPACE ## ############S################# rm(list=ls()) #Detach packages#### detachAllPackages <- function() { basic.packages <- c("package:stats","package:graphics","package:grDevices","package:utils","package:datasets","package:methods","package:base")...
/3. New_Moisture_only_FINAL.R
no_license
gejielin/Tundra_teabag_experiment
R
false
false
24,798
r
############S################# ## TRAIT CHANGE OVER SPACE ## ############S################# rm(list=ls()) #Detach packages#### detachAllPackages <- function() { basic.packages <- c("package:stats","package:graphics","package:grDevices","package:utils","package:datasets","package:methods","package:base")...
/wifitotal.R
no_license
BuFanBoy/EMC
R
false
false
1,964
r
\name{messages} \alias{messages} \title{ messages} \description{ The purpose of this function is supporting the functions of this package (by introducing some nested "if-else" conditions) from all possible messages which are defined in functions of this package. The "messages" function is used in most of func...
/man/messages.Rd
no_license
cran/Calculator.LR.FNs
R
false
false
2,856
rd
\name{messages} \alias{messages} \title{ messages} \description{ The purpose of this function is supporting the functions of this package (by introducing some nested "if-else" conditions) from all possible messages which are defined in functions of this package. The "messages" function is used in most of func...
allowed.file <- "USTBook-spellcheck-allowed.csv" do_spellcheck <- function() { allowed.words <- character() if(file.exists(allowed.file)) allowed.words <- read.csv(allowed.file)$x res <- spelling::spell_check_files(list.files(pattern="Rmd")) idx <- which(!res[,1] %in% allowed.words) if (length(idx) == 0)...
/spellcheck.R
no_license
brownag/2020SoilTaxonomyBook
R
false
false
603
r
allowed.file <- "USTBook-spellcheck-allowed.csv" do_spellcheck <- function() { allowed.words <- character() if(file.exists(allowed.file)) allowed.words <- read.csv(allowed.file)$x res <- spelling::spell_check_files(list.files(pattern="Rmd")) idx <- which(!res[,1] %in% allowed.words) if (length(idx) == 0)...
library(tidyverse) library(lmerTest) library(spatialEco) library(BBmisc) library(raster) library(gstat) library(nlme) ### load data and compute cti data <- read.csv("//storage.slu.se/Home$/yofo0001/My Documents/Recherche/Temporal_climatic_debt/SWE_PA_data.csv") %>% filter(latin != "Branta leucopsis", yr > 1998) %>%...
/analyses_SWE.R
no_license
tanxuezhi/FORMAS-Project
R
false
false
7,844
r
library(tidyverse) library(lmerTest) library(spatialEco) library(BBmisc) library(raster) library(gstat) library(nlme) ### load data and compute cti data <- read.csv("//storage.slu.se/Home$/yofo0001/My Documents/Recherche/Temporal_climatic_debt/SWE_PA_data.csv") %>% filter(latin != "Branta leucopsis", yr > 1998) %>%...
"logratio.mat" <- function(data) { data$log.ratio }
/R/logratio.mat.R
no_license
cran/varmixt
R
false
false
61
r
"logratio.mat" <- function(data) { data$log.ratio }
b <- 8 x=32 x+8 b+8 cam <- bucky <- 20 assign("ham", 71) ham+20 rm(ham) ham
/variables.R
no_license
cpbuckingham/r
R
false
false
79
r
b <- 8 x=32 x+8 b+8 cam <- bucky <- 20 assign("ham", 71) ham+20 rm(ham) ham
library(tidyverse) library(ggpubr) blogs <- readLines("data/en_US/en_US.blogs.txt", skipNul=TRUE) news <- readLines("data/en_US/en_US.news.txt", skipNul=TRUE) twitter <- readLines("data/en_US/en_US.twitter.txt", skipNul=TRUE) #DESCRIPTIVE STATISTICS #number of lines blogs_len <- length(blogs) news_len <- length(news)...
/descr_analysis.R
no_license
benjms/nextword
R
false
false
3,952
r
library(tidyverse) library(ggpubr) blogs <- readLines("data/en_US/en_US.blogs.txt", skipNul=TRUE) news <- readLines("data/en_US/en_US.news.txt", skipNul=TRUE) twitter <- readLines("data/en_US/en_US.twitter.txt", skipNul=TRUE) #DESCRIPTIVE STATISTICS #number of lines blogs_len <- length(blogs) news_len <- length(news)...
#####convert datasets into singleCellExperiment R objects for later use source("R/config.R") source("R/utils.R") source("R/dataset_config.R") preprocesss.datasets <- list(PBMC=list("PBMC_AllCells_withLabels.RDS","GSE96583_batch{i}_samples.RDS","GSE96583_8_Stim_Pats.RDS","GSE96583_8_Ctrl_Pats.RDS"), ...
/R/preprocess_data.R
no_license
XingjieShi/scRNAIdent
R
false
false
15,419
r
#####convert datasets into singleCellExperiment R objects for later use source("R/config.R") source("R/utils.R") source("R/dataset_config.R") preprocesss.datasets <- list(PBMC=list("PBMC_AllCells_withLabels.RDS","GSE96583_batch{i}_samples.RDS","GSE96583_8_Stim_Pats.RDS","GSE96583_8_Ctrl_Pats.RDS"), ...