diff --git a/.Rbuildignore b/.Rbuildignore
new file mode 100644
index 0000000..77fd53d
--- /dev/null
+++ b/.Rbuildignore
@@ -0,0 +1,2 @@
+^\.pbattributes$
+^manifest\.json$
diff --git a/.Rprofile b/.Rprofile
new file mode 100644
index 0000000..81b960f
--- /dev/null
+++ b/.Rprofile
@@ -0,0 +1 @@
+source("renv/activate.R")
diff --git a/.gitignore b/.gitignore
index fae8299..8bd547b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,3 +37,9 @@ vignettes/*.pdf
# R Environment Variables
.Renviron
+manifest.json
+Datasets/Raw/*.txt
+Datasets/Raw/*.dat
+Datasets/Raw/*.zip
+Datasets/Raw/*.csv
+Datasets/Raw/*.RData
diff --git a/.pbattributes b/.pbattributes
new file mode 100644
index 0000000..bf2573e
--- /dev/null
+++ b/.pbattributes
@@ -0,0 +1,5 @@
+Datasets/Raw/*.txt
+Datasets/Raw/*.dat
+Datasets/Raw/*.zip
+Datasets/Raw/*.csv
+Datasets/Raw/*.RData
diff --git a/Codes/00_Dir_Setup.R b/Codes/00_Dir_Setup.R
new file mode 100644
index 0000000..b5884ea
--- /dev/null
+++ b/Codes/00_Dir_Setup.R
@@ -0,0 +1,30 @@
+#Settting up directory
+##Settting up directory
+options(repos = getOption("repos")["CRAN"])
+install.packages("PTXQC")
+install.packages("pacman")
+pacman::p_load(piggyback, renv, here, tidyverse, targets,
+ visNetwork)
+install.packages('piggyback')
+install.packages('renv')
+install.packages('here')
+install.packages('tidyverse')
+install.packages('targets')
+install.packages('visNetwork')
+#testthat::use_test()
+
+## Created a first release directly on Github
+#pb_new_release("Skourtis/Project_Template")
+piggyback::pb_track(c("Datasets/Raw/*.txt",
+ "Datasets/Raw/*.dat",
+ "Datasets/Raw/*.zip",
+ "Datasets/Raw/*.csv",
+ "Datasets/Raw/*.RData"))
+
+piggyback::pb_track() %>%
+ pb_upload(repo = "Skourtis/Project_Template")
+
+##end
+renv::snapshot()
+
+
diff --git a/Codes/01_Downloading_Files.R b/Codes/01_Downloading_Files.R
new file mode 100644
index 0000000..f1ee988
--- /dev/null
+++ b/Codes/01_Downloading_Files.R
@@ -0,0 +1,10 @@
+#Downloading from Git template
+#Cachem install error bc 'make' was not installed, Rtools installed
+#Manually created .Renv and paste the path from Rtools webpage.
+renv::restore()
+install.packages('devtools')
+
+options(repos = getOption("repos")["CRAN"])
+devtools::install_github("bartongroup/Proteus", build_opts= c("--no-resave-data", "--no-manual"), build_vignettes=FALSE)
+pacman::p_load(piggyback, renv, here, tidyverse)
+pb_download()
diff --git a/Codes/functions.R b/Codes/functions.R
new file mode 100644
index 0000000..7bca5af
--- /dev/null
+++ b/Codes/functions.R
@@ -0,0 +1,244 @@
+Quality_Control <- function(x){
+ ### takes as input the txt output folder of MaxQuant
+ ### in the form of the here::here function
+ ### and produces a QC report
+ pacman::p_temp("PTXQC")
+ require(methods)
+ r = createReport(x)
+}
+
+load_MaxQuant <- function(txt_folder){
+ ### This function takes the txt folder,
+ ### the name of the measure_col,number of samples and
+ ### names of the conditions and output the peptides per condition and
+ ### reads the Maxquant proteinGroups file
+ #txt_folder <- here::here("Datasets", "Raw",
+ # "2020MQ044txt",
+ # "txt")
+
+ condition_names <- c(rep("control",3),
+ rep("sh_1",3),
+ rep("sh_2",3))
+ samples_ids <- 1:9
+ measure_col <- "Intensity"
+
+ measCols <- list(
+ HL = measure_col
+ )
+
+ eviCols <- list(
+ sequence = 'Sequence',
+ modified_sequence = 'Modified sequence',
+ modifications = 'Modifications',
+ protein_group = 'Proteins',
+ protein = 'Leading razor protein',
+ experiment = 'Experiment',
+ charge = 'Charge',
+ reverse = 'Reverse',
+ contaminant = 'Potential contaminant'
+ )
+ evi <- proteus::readEvidenceFile(paste0(txt_folder,
+ "/evidence.txt"),
+ measure.cols=measCols,
+ data.cols=eviCols,
+ zeroes.are.missing=FALSE)
+
+
+
+ meta <- data.frame(experiment = sort(evi$experiment %>% unique()),
+ measure = measure_col,
+ condition = condition_names,
+ sample = sort(evi$experiment %>% unique()),
+ replicate = c(rep(1,3),rep(2,3),rep(3,3)))
+
+ pepdat <- proteus::makePeptideTable(evi,
+ meta,
+ measure.cols=measCols,
+ experiment.type="label-free")
+
+ measure_columns <- list(paste(measure_col,samples_ids, sep = " " )) %>% unlist %>%
+ setNames(paste("Sample", samples_ids, sep = "_"))
+
+ list(proteins = proteus::readProteinGroups(paste0(txt_folder,
+ "/proteinGroups.txt"),
+ meta,
+ measure.cols = measure_columns),
+ peptides = pepdat, meta, measure.cols = measure_columns
+ )
+}
+load_MaxQuanttest <- function(txt_folder){
+ ### This function takes the txt folder,
+ ### the name of the measure_col,number of samples and
+ ### names of the conditions and output the peptides per condition and
+ ### reads the Maxquant proteinGroups file
+ #txt_folder <- here::here("Datasets", "Raw",
+ # "2020MQ044txt",
+ # "txt")
+
+ condition_names <- c(1:9)
+ samples_ids <- 1:9
+ measure_col <- "Intensity"
+
+ measCols <- list(
+ HL = measure_col
+ )
+
+ eviCols <- list(
+ sequence = 'Sequence',
+ modified_sequence = 'Modified sequence',
+ modifications = 'Modifications',
+ protein_group = 'Proteins',
+ protein = 'Leading razor protein',
+ experiment = 'Experiment',
+ charge = 'Charge',
+ reverse = 'Reverse',
+ contaminant = 'Potential contaminant'
+ )
+ evi <- proteus::readEvidenceFile(paste0(txt_folder,
+ "/evidence.txt"),
+ measure.cols=measCols,
+ data.cols=eviCols,
+ zeroes.are.missing=FALSE)
+
+
+
+ meta <- data.frame(experiment = sort(evi$experiment %>% unique()),
+ measure = measure_col,
+ condition = condition_names,
+ sample = sort(evi$experiment %>% unique()),
+ replicate = 1,1,1,2,2,2,3,3,3)
+
+ pepdat <- proteus::makePeptideTable(evi,
+ meta,
+ measure.cols=measCols,
+ experiment.type="label-free")
+
+ measure_columns <- list(paste(measure_col,samples_ids, sep = " " )) %>% unlist %>%
+ setNames(paste("Sample", samples_ids, sep = "_"))
+
+ list(proteins = proteus::readProteinGroups(paste0(txt_folder,
+ "/proteinGroups.txt"),
+ meta,
+ measure.cols = measure_columns),
+ peptides = pepdat, meta, measure.cols = measure_columns
+ )
+}
+
+
+is_function = function (expr) {
+ if (! is_assign(expr))
+ return(FALSE)
+ value = expr[[3]]
+ is.call(value) && as.character(value[[1]]) == 'function'
+}
+
+function_name = function (expr){
+ as.character(expr[[2]])}
+
+is_assign = function (expr){
+ is.call(expr) && as.character(expr[[1]]) %in% c('=', '<-', 'assign')}
+
+
+produce_ipath_map <- function(df,
+ column_name = NULL){
+ ### takes as input a dataframe produced which converts ratios to colours
+ ### and the columns to map and produces iPath3 images
+ #df = For_ipath_comparisons
+ #column_name = columns_for_mapping[1]
+
+ Filtered_proteins <- df %>%
+ dplyr::select(all_of(c("V1","Width",column_name))) %>%
+ na.omit()
+
+ #Filtered_proteins$Width <- paste("W",as.character(ntile(Filtered_proteins[,i], 30)),sep="")
+ Filtered_proteins$Ipath <- paste(Filtered_proteins$V1,
+ Filtered_proteins %>% pull(column_name),
+ Filtered_proteins$Width)
+
+ file_name <- here::here("Project_Output",
+ paste0(column_name,
+ "_ipath_all_enzymes_bins.tsv"))
+
+ selections <- paste('selection=',
+ paste(paste(Filtered_proteins$Ipath,
+ "%0A ",sep = ""),
+ collapse = " "),
+ collapse = " ")
+
+ export_type <- "export_type=svg"
+
+ file_ipath <- paste("./../Project_Output/",
+ column_name,"_ipath_all_enzymes_bins.svg",
+ sep="")
+
+ ipath_command <- paste(paste("curl -d ",
+ selections, " -d ",
+ export_type,
+ " https://pathways.embl.de/mapping.cgi -o ",
+ sep = '\"'),
+ file_ipath,
+ sep="")
+ system(ipath_command)
+ print(column_name)
+ write_tsv(Filtered_proteins,file_name,col_names = FALSE)
+ #pacman::p_load("rsvg")
+ bitmap <- rsvg::rsvg_raw( here::here("Project_Output",
+ paste0(column_name,"_ipath_all_enzymes_bins.svg")),
+ width = 3600)
+
+ cowplot::ggdraw()+cowplot::draw_image(bitmap)+ cowplot::draw_figure_label(column_name,"top", size = 65)
+
+
+}
+
+calculateCoveredProtein_sav <- function (sample_id,proteinIDs, markerproteins)
+{
+ compartments <- c("S1", "S2", "S3", "S4", "N1", "N2", "N3",
+ "N4", "C1", "C2", "C3", "C4", "C5", "M1", "M2")
+ color.code <- c("gold", "orange", "salmon", "tomato2", "grey90",
+ "grey70", "grey50", "grey30", "lightblue", "aquamarine",
+ "cyan", "deepskyblue2", "turquoise3", "burlywood4",
+ "tan4")
+ compartment.size <- c(358, 351, 252, 174, 192, 121, 231,
+ 198, 242, 132, 220, 215, 341, 69, 269)
+ covered.proteins <- intersect(proteinIDs, markerproteins)
+ if (length(covered.proteins) < 1)
+ warning("There is no overlap between marker proteins and data!")
+ c.marker.df <- SubCellBarCode::markerProteins[covered.proteins,
+ ]
+ coverageCompWise <- lapply(seq_len(length(compartments)),
+ function(x) {
+ temp.df <- c.marker.df[c.marker.df$Compartments ==
+ compartments[x], ]
+ values <- list(Compartments = compartments[x], ColorCode = color.code[x],
+ ProteinCoverage = 100 * ((dim(temp.df)[1])/compartment.size[x]))
+ })
+ coverage.df <- as.data.frame(do.call("rbind", coverageCompWise))
+ non.enriched.loc <- coverage.df[coverage.df$ProteinCoverage <
+ 20, ]
+ if (nrow(non.enriched.loc) == 1) {
+ warning("There is not enough enrichment at: ", as.character(non.enriched.loc$Compartments),
+ "\nWe recommend you to perform the fractionation, again.")
+ }
+ else if (nrow(non.enriched.loc) > 1) {
+ comp <- paste(as.character(non.enriched.loc$Compartments),
+ collapse = ",")
+ warning("There are not enough enrichments at: ", comp,
+ "\nWe recommend you to perform the fractionation!")
+ }
+ coverage.df$ProteinCoverage <- as.numeric(coverage.df$ProteinCoverage)
+ coverage.df$Compartments <- as.character(coverage.df$Compartments)
+ coverage.df$ColorCode <- as.character(coverage.df$ColorCode)
+ ggplot(data = coverage.df, aes(x = coverage.df$Compartments,
+ y = coverage.df$ProteinCoverage)) + geom_bar(stat = "identity",
+ fill = coverage.df$ColorCode) +
+ scale_x_discrete(limits = c(compartments)) +
+ theme_bw() + theme(text = element_text(size = 5), plot.title = element_text(hjust = 0.5),
+ axis.text.x = element_text(face = "bold", color = "black"),
+ axis.text.y = element_text(face = "bold", color = "black")) +
+ ylim(0, 100)+
+
+ labs(title = paste("Marker Protein Coverage Sample",sample_id),
+ y = "% Protein Coverage", x = "Compartment")
+
+}
diff --git a/Codes/functions_minimal.R b/Codes/functions_minimal.R
new file mode 100644
index 0000000..3c2272d
--- /dev/null
+++ b/Codes/functions_minimal.R
@@ -0,0 +1,27 @@
+pacman::p_load("biglm",
+ "readxl",
+ "rmarkdown",
+ "tarchetypes",
+ "targets",
+ "tidyverse")
+
+#' @title Plot ozone from the preprocessed air quality data.
+#' @description Plot a histogram of ozone concentration.
+#' @return A ggplot histogram showing ozone content.
+#' @param data Data frame, preprocessed air quality dataset.
+#' @examples
+#' library(ggplot2)
+#' library(tidyverse)
+#' data <- airquality %>%
+#' mutate(Ozone = replace_na(Ozone, mean(Ozone, na.rm = TRUE)))
+#' create_plot(data)
+create_plot <- function(data) {
+ ggplot(data) +
+ geom_histogram(aes(x = Ozone), bins = 12) +
+ theme_gray(24)+
+ ggtitle("Hist_1")
+}
+
+####
+
+
diff --git a/Codes/tests/testthat/test_functions.R b/Codes/tests/testthat/test_functions.R
new file mode 100644
index 0000000..e88c103
--- /dev/null
+++ b/Codes/tests/testthat/test_functions.R
@@ -0,0 +1,11 @@
+source_file_name <- here::here("Codes",
+ "functions.R")
+source(source_file_name)
+library(testthat)
+
+
+test_that("addition results is correct",{
+ expect_true(is.data.frame(addition(5,6) %>% as.data.frame()))
+ testthat::expect_error(addition("ab","cd"))
+})
+
diff --git a/Output/report.Rmd b/Output/report.Rmd
new file mode 100644
index 0000000..82faf7d
--- /dev/null
+++ b/Output/report.Rmd
@@ -0,0 +1,17 @@
+---
+title: report
+output: html_document
+---
+
+```{r}
+library(targets)
+tar_read(dataset)
+tar_read(dataset)
+tar_read(hist)
+```
+I have seen the hist, and it shows....
+
+```{r}
+
+```
+
diff --git a/Output/report.html b/Output/report.html
new file mode 100644
index 0000000..e3c06da
--- /dev/null
+++ b/Output/report.html
@@ -0,0 +1,485 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+report
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
library(targets)
+tar_read(dataset)
+
## x
+## 1 a
+## 2 b
+## 3 c
+## 4 d
+## 5 e
+## 6 f
+## 7 g
+## 8 h
+## 9 i
+## 10 j
+## 11 k
+## 12 l
+## 13 m
+## 14 n
+## 15 o
+## 16 p
+## 17 q
+## 18 r
+## 19 s
+## 20 t
+## 21 u
+## 22 v
+## 23 w
+## 24 x
+## 25 y
+## 26 z
+
tar_read(dataset)
+
## x
+## 1 a
+## 2 b
+## 3 c
+## 4 d
+## 5 e
+## 6 f
+## 7 g
+## 8 h
+## 9 i
+## 10 j
+## 11 k
+## 12 l
+## 13 m
+## 14 n
+## 15 o
+## 16 p
+## 17 q
+## 18 r
+## 19 s
+## 20 t
+## 21 u
+## 22 v
+## 23 w
+## 24 x
+## 25 y
+## 26 z
+
tar_read(hist)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Translation.Rproj b/Translation.Rproj
new file mode 100644
index 0000000..066341e
--- /dev/null
+++ b/Translation.Rproj
@@ -0,0 +1,13 @@
+Version: 1.0
+
+RestoreWorkspace: Default
+SaveWorkspace: Default
+AlwaysSaveHistory: Default
+
+EnableCodeIndexing: Yes
+UseSpacesForTab: Yes
+NumSpacesForTab: 4
+Encoding: UTF-8
+
+RnwWeave: Sweave
+LaTeX: pdfLaTeX
diff --git a/_targets.R b/_targets.R
new file mode 100644
index 0000000..3b08f1e
--- /dev/null
+++ b/_targets.R
@@ -0,0 +1,27 @@
+library(targets)
+library(tarchetypes)
+source(here::here("Codes","functions_minimal.R"))
+options(tidyverse.quiet = TRUE)
+tar_option_set(packages = c("biglm", "tidyverse"))
+#in the console run targets::tar_visnetwork()
+#and targets::tar_make()
+list(
+ tar_target(
+ raw_data_file,
+ here::here("Datasets","Raw","raw_data.csv"),
+ format = "file"
+ ),
+ tar_target(
+ raw_data,
+ read_csv(raw_data_file, col_types = cols())
+ ),
+ tar_target(
+ data,
+ raw_data %>%
+ mutate(Ozone = replace_na(Ozone, mean(Ozone, na.rm = TRUE)))
+ ),
+ tar_target(hist, create_plot(data)),
+ tar_render(report, here::here("Output","report.Rmd")),
+ tar_target(fit, biglm(Ozone ~ Wind + Temp, data)),
+ tar_target(dataset, data.frame(x = letters))
+ )
diff --git a/_targets/meta/meta b/_targets/meta/meta
new file mode 100644
index 0000000..d07a9d9
--- /dev/null
+++ b/_targets/meta/meta
@@ -0,0 +1,17 @@
+name|type|data|command|depend|seed|path|time|size|bytes|format|iteration|parent|children|seconds|warnings|error
+create_plot|function|e61c6a8da66f7057||||||||||||||
+raw_data_file|stem|eac4be650daf552d|cbbcdc99e6139936|c3b5fc02cdc369c1|2110307107|C:/Users/skourtis/OneDrive - CRG - Centre de Regulacio Genomica/Bioinformatics Projects/Project_Templates/Datasets/Raw/raw_data.csv|47c963b779fb1145|20920dbb1a6fc21c|3044|file|vector|||0||
+dataset|stem|f13566c79b81ce59|a8d01d6f5107071f|3231d3eb2c5eb031|914614260|_targets/objects/dataset|47ab10173825b87d|9b0159aade793684|179|rds|vector|||0.02||
+raw_data|stem|61d8681b3b24210f|000ed0cc054f0d35|30735c814d24b25d|-979620141|_targets/objects/raw_data|442cf825092ac5ee|a97d6e8847e768fe|1506|rds|vector|||0.09||
+data|stem|f48ef8b55643e0ae|df3101ce91c63e21|84389287dd8d2ca2|1588979285|_targets/objects/data|deafcece7dfda748|0379c188128bbe87|1505|rds|vector|||0.01||
+hist|stem|ed61f2dbfa66f5d8|68877181ab74e51e|4706135c2164f0f2|-1026346201|_targets/objects/hist|ca555af228141179|139c7eb6bf23fe1c|44875|rds|vector|||0.01||
+fit|stem|465fe038b645ff82|aa0df6c5dbd10537|7d53713f6a5cf419|1780184594|_targets/objects/fit|b7662c915418c14c|5f048c881922f08c|1966|rds|vector|||0||
+report|stem|660e1ac050b33815|9d217c579c37125f|3bc84b0a13b07e0f|-237041703|Output/report.html*Output/report.Rmd|f6ce6bf5b9e6944e||630612|file|vector|||0.95||need finite xlim values
+create_plot|function|e61c6a8da66f7057
+raw_data_file|stem|eac4be650daf552d|cbbcdc99e6139936|c3b5fc02cdc369c1|2110307107|C:/Users/skourtis/OneDrive - CRG - Centre de Regulacio Genomica/Bioinformatics Projects/Project_Templates/Datasets/Raw/raw_data.csv|47c963b779fb1145|20920dbb1a6fc21c|3044|file|vector|||0||
+dataset|stem|f13566c79b81ce59|a8d01d6f5107071f|3231d3eb2c5eb031|914614260|_targets/objects/dataset|47ab10173825b87d|9b0159aade793684|179|rds|vector|||0.02||
+raw_data|stem|61d8681b3b24210f|000ed0cc054f0d35|30735c814d24b25d|-979620141|_targets/objects/raw_data|442cf825092ac5ee|a97d6e8847e768fe|1506|rds|vector|||0.09||
+data|stem|f48ef8b55643e0ae|df3101ce91c63e21|84389287dd8d2ca2|1588979285|_targets/objects/data|deafcece7dfda748|0379c188128bbe87|1505|rds|vector|||0.01||
+hist|stem|ed61f2dbfa66f5d8|68877181ab74e51e|4706135c2164f0f2|-1026346201|_targets/objects/hist|ca555af228141179|139c7eb6bf23fe1c|44875|rds|vector|||0.01||
+fit|stem|465fe038b645ff82|aa0df6c5dbd10537|7d53713f6a5cf419|1780184594|_targets/objects/fit|b7662c915418c14c|5f048c881922f08c|1966|rds|vector|||0||
+report|stem|7998efce640388ac|9d217c579c37125f|3bc84b0a13b07e0f|-237041703|Output/report.html*Output/report.Rmd|aa3999e94c7afb52|4322b60e5c71f80a|663459|file|vector|||2.78||
diff --git a/_targets/meta/progress b/_targets/meta/progress
new file mode 100644
index 0000000..f78532a
--- /dev/null
+++ b/_targets/meta/progress
@@ -0,0 +1,3 @@
+name|type|parent|branches|progress
+report|stem|report|0|running
+report|stem|report|0|built
diff --git a/_targets/objects/data b/_targets/objects/data
new file mode 100644
index 0000000..b7584ba
Binary files /dev/null and b/_targets/objects/data differ
diff --git a/_targets/objects/dataset b/_targets/objects/dataset
new file mode 100644
index 0000000..8a00b1a
Binary files /dev/null and b/_targets/objects/dataset differ
diff --git a/_targets/objects/fit b/_targets/objects/fit
new file mode 100644
index 0000000..94b8fda
Binary files /dev/null and b/_targets/objects/fit differ
diff --git a/_targets/objects/hist b/_targets/objects/hist
new file mode 100644
index 0000000..4206189
Binary files /dev/null and b/_targets/objects/hist differ
diff --git a/_targets/objects/raw_data b/_targets/objects/raw_data
new file mode 100644
index 0000000..0c98e46
Binary files /dev/null and b/_targets/objects/raw_data differ
diff --git a/renv.lock b/renv.lock
new file mode 100644
index 0000000..a4abadb
--- /dev/null
+++ b/renv.lock
@@ -0,0 +1,1290 @@
+{
+ "R": {
+ "Version": "4.0.2",
+ "Repositories": [
+ {
+ "Name": "CRAN",
+ "URL": "https://cran.rstudio.com"
+ }
+ ]
+ },
+ "Bioconductor": {
+ "Version": null
+ },
+ "Packages": {
+ "AnnotationDbi": {
+ "Package": "AnnotationDbi",
+ "Version": "1.50.3",
+ "Source": "Bioconductor",
+ "Hash": "d19b3dfd917dff8a56151842e82fc098"
+ },
+ "BH": {
+ "Package": "BH",
+ "Version": "1.72.0-3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "8f9ce74c6417d61f0782cbae5fd2b7b0"
+ },
+ "Biobase": {
+ "Package": "Biobase",
+ "Version": "2.48.0",
+ "Source": "Bioconductor",
+ "Hash": "da9b1bc36fb35ebbec219dc007657f21"
+ },
+ "BiocGenerics": {
+ "Package": "BiocGenerics",
+ "Version": "0.34.0",
+ "Source": "Bioconductor",
+ "Hash": "ae191b5608f175de0f69b6302390c705"
+ },
+ "DBI": {
+ "Package": "DBI",
+ "Version": "1.1.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "4744be45519d675af66c28478720fce5"
+ },
+ "DT": {
+ "Package": "DT",
+ "Version": "0.15",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "85738c69035e67ec4b484a5e02640ef6"
+ },
+ "IRanges": {
+ "Package": "IRanges",
+ "Version": "2.22.2",
+ "Source": "Bioconductor",
+ "Hash": "1403fa5c98c5f48b989a6bc5a65c6c25"
+ },
+ "KernSmooth": {
+ "Package": "KernSmooth",
+ "Version": "2.23-17",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "bbff70c8c0357b5b88238c83f680fcd3"
+ },
+ "MASS": {
+ "Package": "MASS",
+ "Version": "7.3-51.6",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "1dad32ac9dbd8057167b2979fb932ff7"
+ },
+ "Matrix": {
+ "Package": "Matrix",
+ "Version": "1.2-18",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "08588806cba69f04797dab50627428ed"
+ },
+ "ModelMetrics": {
+ "Package": "ModelMetrics",
+ "Version": "1.2.2.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "40a55bd0b44719941d103291ac5e9d74"
+ },
+ "R6": {
+ "Package": "R6",
+ "Version": "2.4.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "292b54f8f4b94669b08f94e5acce6be2"
+ },
+ "RColorBrewer": {
+ "Package": "RColorBrewer",
+ "Version": "1.1-2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "e031418365a7f7a766181ab5a41a5716"
+ },
+ "RSQLite": {
+ "Package": "RSQLite",
+ "Version": "2.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "2e813101e637bfd423f763d20350ed3d"
+ },
+ "Rcpp": {
+ "Package": "Rcpp",
+ "Version": "1.0.5",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "125dc7a0ed375eb68c0ce533b48d291f"
+ },
+ "Rtsne": {
+ "Package": "Rtsne",
+ "Version": "0.15",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "f153432c4ca15b937ccfaa40f167c892"
+ },
+ "S4Vectors": {
+ "Package": "S4Vectors",
+ "Version": "0.26.1",
+ "Source": "Bioconductor",
+ "Hash": "c252d04c13a3a6667d3cc140360780f1"
+ },
+ "SQUAREM": {
+ "Package": "SQUAREM",
+ "Version": "2020.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "40b96d4302539a1b7c27d14702ab5006"
+ },
+ "SubCellBarCode": {
+ "Package": "SubCellBarCode",
+ "Version": "1.4.0",
+ "Source": "Bioconductor",
+ "Hash": "09e3ba1009d8926e556e00ba90e020d0"
+ },
+ "askpass": {
+ "Package": "askpass",
+ "Version": "1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "e8a22846fff485f0be3770c2da758713"
+ },
+ "assertthat": {
+ "Package": "assertthat",
+ "Version": "0.2.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "50c838a310445e954bc13f26f26a6ecf"
+ },
+ "backports": {
+ "Package": "backports",
+ "Version": "1.1.10",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "05ffd2d4acb51aee70f1de68ad7a6aed"
+ },
+ "base64enc": {
+ "Package": "base64enc",
+ "Version": "0.1-3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "543776ae6848fde2f48ff3816d0628bc"
+ },
+ "biglm": {
+ "Package": "biglm",
+ "Version": "0.9-2.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "fb9718b294f541ed3adae42b8c830ae7"
+ },
+ "bit": {
+ "Package": "bit",
+ "Version": "1.1-15.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "eb6c52d8cc44463085a4cde1c63df163"
+ },
+ "bit64": {
+ "Package": "bit64",
+ "Version": "0.9-7",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "3338d4a9b1352f5a613e2bdcefe784ea"
+ },
+ "blob": {
+ "Package": "blob",
+ "Version": "1.2.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "9addc7e2c5954eca5719928131fed98c"
+ },
+ "brew": {
+ "Package": "brew",
+ "Version": "1.0-6",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "92a5f887f9ae3035ac7afde22ba73ee9"
+ },
+ "broom": {
+ "Package": "broom",
+ "Version": "0.7.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "2ca5ae42f3bfd149504d63c833c2be26"
+ },
+ "callr": {
+ "Package": "callr",
+ "Version": "3.4.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "e56fe17ffeddfdcfcef40981e41e1c40"
+ },
+ "caret": {
+ "Package": "caret",
+ "Version": "6.0-86",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "77b0545e2c16b4e57c8da2d14042b28d"
+ },
+ "cellranger": {
+ "Package": "cellranger",
+ "Version": "1.1.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "f61dbaec772ccd2e17705c1e872e9e7c"
+ },
+ "class": {
+ "Package": "class",
+ "Version": "7.3-17",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "9267f5dab59a4ef44229858a142bded1"
+ },
+ "cli": {
+ "Package": "cli",
+ "Version": "2.0.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "ff0becff7bfdfe3f75d29aff8f3172dd"
+ },
+ "clipr": {
+ "Package": "clipr",
+ "Version": "0.7.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "08cf4045c149a0f0eaf405324c7495bd"
+ },
+ "clisymbols": {
+ "Package": "clisymbols",
+ "Version": "1.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "96c01552bfd5661b9bbdefbc762f4bcd"
+ },
+ "codetools": {
+ "Package": "codetools",
+ "Version": "0.2-16",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "89cf4b8207269ccf82fbeb6473fd662b"
+ },
+ "colorspace": {
+ "Package": "colorspace",
+ "Version": "1.4-1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "6b436e95723d1f0e861224dd9b094dfb"
+ },
+ "colourpicker": {
+ "Package": "colourpicker",
+ "Version": "1.1.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "fe0cb3d8854c168aef827aeab4b3b473"
+ },
+ "commonmark": {
+ "Package": "commonmark",
+ "Version": "1.7",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "0f22be39ec1d141fd03683c06f3a6e67"
+ },
+ "covr": {
+ "Package": "covr",
+ "Version": "3.5.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "6d80a9fc3c0c8473153b54fa54719dfd"
+ },
+ "cowplot": {
+ "Package": "cowplot",
+ "Version": "1.1.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "870b41daf1a4c3640f2e3407a40c31b9"
+ },
+ "cpp11": {
+ "Package": "cpp11",
+ "Version": "0.2.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "c4c83167f43ca762a9fa998d4fead3ae"
+ },
+ "crayon": {
+ "Package": "crayon",
+ "Version": "1.3.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "0d57bc8e27b7ba9e45dba825ebc0de6b"
+ },
+ "crosstalk": {
+ "Package": "crosstalk",
+ "Version": "1.1.0.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "ae55f5d7c02f0ab43c58dd050694f2b4"
+ },
+ "curl": {
+ "Package": "curl",
+ "Version": "4.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "2b7d10581cc730804e9ed178c8374bd6"
+ },
+ "data.table": {
+ "Package": "data.table",
+ "Version": "1.13.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "06d5863292e2e8ffbb063ce34e77bb2a"
+ },
+ "dbplyr": {
+ "Package": "dbplyr",
+ "Version": "1.4.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "2ba60a82dd9b6ca3cee0d8e2574cdf0e"
+ },
+ "desc": {
+ "Package": "desc",
+ "Version": "1.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "6c8fe8fa26a23b79949375d372c7b395"
+ },
+ "devtools": {
+ "Package": "devtools",
+ "Version": "2.3.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "415656f50722f5b6e6bcf80855ce11b9"
+ },
+ "digest": {
+ "Package": "digest",
+ "Version": "0.6.25",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "f697db7d92b7028c4b3436e9603fb636"
+ },
+ "dplyr": {
+ "Package": "dplyr",
+ "Version": "1.0.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "d0509913b27ea898189ee664b6030dc2"
+ },
+ "e1071": {
+ "Package": "e1071",
+ "Version": "1.7-4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "7e9462e3e3e565f51fbec181dfcab890"
+ },
+ "ellipsis": {
+ "Package": "ellipsis",
+ "Version": "0.3.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "fd2844b3a43ae2d27e70ece2df1b4e2a"
+ },
+ "evaluate": {
+ "Package": "evaluate",
+ "Version": "0.14",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "ec8ca05cffcc70569eaaad8469d2a3a7"
+ },
+ "fansi": {
+ "Package": "fansi",
+ "Version": "0.4.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "7fce217eaaf8016e72065e85c73027b5"
+ },
+ "farver": {
+ "Package": "farver",
+ "Version": "2.0.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "dad6793a5a1f73c8e91f1a1e3e834b05"
+ },
+ "fastmap": {
+ "Package": "fastmap",
+ "Version": "1.0.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "83ab58a0518afe3d17e41da01af13b60"
+ },
+ "forcats": {
+ "Package": "forcats",
+ "Version": "0.5.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "1cb4279e697650f0bd78cd3601ee7576"
+ },
+ "foreach": {
+ "Package": "foreach",
+ "Version": "1.5.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "8fb3ff01ee7d85893f56df8d77213381"
+ },
+ "fs": {
+ "Package": "fs",
+ "Version": "1.5.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "44594a07a42e5f91fac9f93fda6d0109"
+ },
+ "generics": {
+ "Package": "generics",
+ "Version": "0.0.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "b8cff1d1391fd1ad8b65877f4c7f2e53"
+ },
+ "ggExtra": {
+ "Package": "ggExtra",
+ "Version": "0.9",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "e1651e764e09a4ff25ff978e33f1d6fa"
+ },
+ "ggdendro": {
+ "Package": "ggdendro",
+ "Version": "0.1.22",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "bd0785a22c1d8eb187df2d06fab4d906"
+ },
+ "ggplot2": {
+ "Package": "ggplot2",
+ "Version": "3.3.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "4ded8b439797f7b1693bd3d238d0106b"
+ },
+ "ggrepel": {
+ "Package": "ggrepel",
+ "Version": "0.8.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "c013a50b19695daf04853679e1bc105a"
+ },
+ "gh": {
+ "Package": "gh",
+ "Version": "1.1.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "89ea5998938d1ad55f035c8a86f96b74"
+ },
+ "git2r": {
+ "Package": "git2r",
+ "Version": "0.27.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "531a82d1beed1f545beb25f4f5945bf7"
+ },
+ "glue": {
+ "Package": "glue",
+ "Version": "1.4.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "6efd734b14c6471cfe443345f3e35e29"
+ },
+ "gower": {
+ "Package": "gower",
+ "Version": "0.2.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "be6a2b3529928bd803d1c437d1d43152"
+ },
+ "gridExtra": {
+ "Package": "gridExtra",
+ "Version": "2.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "7d7f283939f563670a697165b2cf5560"
+ },
+ "gtable": {
+ "Package": "gtable",
+ "Version": "0.3.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "ac5c6baf7822ce8732b343f14c072c4d"
+ },
+ "haven": {
+ "Package": "haven",
+ "Version": "2.3.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "221d0ad75dfa03ebf17b1a4cc5c31dfc"
+ },
+ "here": {
+ "Package": "here",
+ "Version": "0.1-11",
+ "Source": "GitHub",
+ "RemoteType": "github",
+ "RemoteHost": "api.github.com",
+ "RemoteRepo": "here",
+ "RemoteUsername": "krlmlr",
+ "RemoteRef": "HEAD",
+ "RemoteSha": "d0feb09ec89dba81fabea11ee44385cda5f9c82f",
+ "Hash": "0760810a97a00b59b0ddf54e8ce9ba12"
+ },
+ "hexbin": {
+ "Package": "hexbin",
+ "Version": "1.28.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "3d59212f2814d65dff517e6899813c58"
+ },
+ "highr": {
+ "Package": "highr",
+ "Version": "0.8",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "4dc5bb88961e347a0f4d8aad597cbfac"
+ },
+ "hms": {
+ "Package": "hms",
+ "Version": "0.5.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "726671f634529d470545f9fd1a9d1869"
+ },
+ "htmltools": {
+ "Package": "htmltools",
+ "Version": "0.5.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "7d651b7131794fe007b1ad6f21aaa401"
+ },
+ "htmlwidgets": {
+ "Package": "htmlwidgets",
+ "Version": "1.5.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "41bace23583fbc25089edae324de2dc3"
+ },
+ "httpuv": {
+ "Package": "httpuv",
+ "Version": "1.5.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "4e6dabb220b006ccdc3b3b5ff993b205"
+ },
+ "httr": {
+ "Package": "httr",
+ "Version": "1.4.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "a525aba14184fec243f9eaec62fbed43"
+ },
+ "igraph": {
+ "Package": "igraph",
+ "Version": "1.2.6",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "7b1f856410253d56ea67ad808f7cdff6"
+ },
+ "ini": {
+ "Package": "ini",
+ "Version": "0.3.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "6154ec2223172bce8162d4153cda21f7"
+ },
+ "ipred": {
+ "Package": "ipred",
+ "Version": "0.9-9",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "816a7f746179f159f8faa87af730f3c1"
+ },
+ "isoband": {
+ "Package": "isoband",
+ "Version": "0.2.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "6e58bd3d6b3dd82a944cd6f05ade228f"
+ },
+ "iterators": {
+ "Package": "iterators",
+ "Version": "1.0.12",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "117128f48662573ff4c4e72608b9e202"
+ },
+ "jsonlite": {
+ "Package": "jsonlite",
+ "Version": "1.7.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "1ec84e070b88b37ed169f19def40d47c"
+ },
+ "knitr": {
+ "Package": "knitr",
+ "Version": "1.29",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "e5f4c41c17df8cdf7b0df12117c0d99a"
+ },
+ "labeling": {
+ "Package": "labeling",
+ "Version": "0.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "73832978c1de350df58108c745ed0e3e"
+ },
+ "later": {
+ "Package": "later",
+ "Version": "1.1.0.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "d0a62b247165aabf397fded504660d8a"
+ },
+ "lattice": {
+ "Package": "lattice",
+ "Version": "0.20-41",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "fbd9285028b0263d76d18c95ae51a53d"
+ },
+ "lava": {
+ "Package": "lava",
+ "Version": "1.6.8",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "f2e18160a8814fb2a94d43cff1cfc147"
+ },
+ "lazyeval": {
+ "Package": "lazyeval",
+ "Version": "0.2.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "d908914ae53b04d4c0c0fd72ecc35370"
+ },
+ "lifecycle": {
+ "Package": "lifecycle",
+ "Version": "0.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "361811f31f71f8a617a9a68bf63f1f42"
+ },
+ "limma": {
+ "Package": "limma",
+ "Version": "3.44.3",
+ "Source": "Bioconductor",
+ "Hash": "dd56ef73b83f3f9393ae28c7549d78ab"
+ },
+ "lubridate": {
+ "Package": "lubridate",
+ "Version": "1.7.9",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "fc1c91e2e8d9e1fc932e75aa1ed989b7"
+ },
+ "magrittr": {
+ "Package": "magrittr",
+ "Version": "1.5",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "1bb58822a20301cee84a41678e25d9b7"
+ },
+ "markdown": {
+ "Package": "markdown",
+ "Version": "1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "61e4a10781dd00d7d81dd06ca9b94e95"
+ },
+ "memoise": {
+ "Package": "memoise",
+ "Version": "1.1.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "58baa74e4603fcfb9a94401c58c8f9b1"
+ },
+ "mgcv": {
+ "Package": "mgcv",
+ "Version": "1.8-31",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "4bb7e0c4f3557583e1e8d3c9ffb8ba5c"
+ },
+ "mime": {
+ "Package": "mime",
+ "Version": "0.9",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "e87a35ec73b157552814869f45a63aa3"
+ },
+ "miniUI": {
+ "Package": "miniUI",
+ "Version": "0.1.1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "fec5f52652d60615fdb3957b3d74324a"
+ },
+ "modelr": {
+ "Package": "modelr",
+ "Version": "0.1.8",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "9fd59716311ee82cba83dc2826fc5577"
+ },
+ "munsell": {
+ "Package": "munsell",
+ "Version": "0.5.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "6dfe8bf774944bd5595785e3229d8771"
+ },
+ "networkD3": {
+ "Package": "networkD3",
+ "Version": "0.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "38310ec4ddb1398359abdd603c151067"
+ },
+ "nlme": {
+ "Package": "nlme",
+ "Version": "3.1-148",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "662f52871983ff3e3ef042c62de126df"
+ },
+ "nnet": {
+ "Package": "nnet",
+ "Version": "7.3-14",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "0d87e50e11394a7151a28873637d799a"
+ },
+ "numDeriv": {
+ "Package": "numDeriv",
+ "Version": "2016.8-1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "df58958f293b166e4ab885ebcad90e02"
+ },
+ "openssl": {
+ "Package": "openssl",
+ "Version": "1.4.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "a399e4773075fc2375b71f45fca186c4"
+ },
+ "org.Hs.eg.db": {
+ "Package": "org.Hs.eg.db",
+ "Version": "3.11.4",
+ "Source": "Bioconductor",
+ "Hash": "30e8ecad485994b19435671c36a36290"
+ },
+ "pROC": {
+ "Package": "pROC",
+ "Version": "1.16.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "285ca01e793958ac6f2c264c84dbb16b"
+ },
+ "pacman": {
+ "Package": "pacman",
+ "Version": "0.5.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "b37932b67288bc62bb81686b2f337a7d"
+ },
+ "piggyback": {
+ "Package": "piggyback",
+ "Version": "0.0.10.99",
+ "Source": "GitHub",
+ "RemoteType": "github",
+ "RemoteHost": "api.github.com",
+ "RemoteRepo": "piggyback",
+ "RemoteUsername": "ropensci",
+ "RemoteRef": "87f71e8",
+ "RemoteSha": "87f71e872099293cf8f99bcec7c89e6e2aae9a55",
+ "Hash": "084523f6c575d82a257b20daeda44c03"
+ },
+ "pillar": {
+ "Package": "pillar",
+ "Version": "1.4.6",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "bdf26e55ccb7df3e49a490150277f002"
+ },
+ "pkgbuild": {
+ "Package": "pkgbuild",
+ "Version": "1.1.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "404684bc4e3685007f9720adf13b06c1"
+ },
+ "pkgconfig": {
+ "Package": "pkgconfig",
+ "Version": "2.0.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "01f28d4278f15c76cddbea05899c5d6f"
+ },
+ "pkgload": {
+ "Package": "pkgload",
+ "Version": "1.1.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "b6b150cd4709e0c0c9b5d51ac4376282"
+ },
+ "plogr": {
+ "Package": "plogr",
+ "Version": "0.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "09eb987710984fc2905c7129c7d85e65"
+ },
+ "plyr": {
+ "Package": "plyr",
+ "Version": "1.8.5",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "3f1b0dbcc503320e6e7aae6c3ff87eaa"
+ },
+ "praise": {
+ "Package": "praise",
+ "Version": "1.0.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "a555924add98c99d2f411e37e7d25e9f"
+ },
+ "prettyunits": {
+ "Package": "prettyunits",
+ "Version": "1.1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "95ef9167b75dde9d2ccc3c7528393e7e"
+ },
+ "processx": {
+ "Package": "processx",
+ "Version": "3.4.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "03446ed0b8129916f73676726cb3c48f"
+ },
+ "prodlim": {
+ "Package": "prodlim",
+ "Version": "2019.11.13",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "c243bf70db3a6631a0c8783152fb7db9"
+ },
+ "progress": {
+ "Package": "progress",
+ "Version": "1.2.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061"
+ },
+ "promises": {
+ "Package": "promises",
+ "Version": "1.1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "a8730dcbdd19f9047774909f0ec214a4"
+ },
+ "proteus": {
+ "Package": "proteus",
+ "Version": "0.2.14",
+ "Source": "GitHub",
+ "RemoteType": "github",
+ "RemoteHost": "api.github.com",
+ "RemoteRepo": "Proteus",
+ "RemoteUsername": "bartongroup",
+ "RemoteRef": "HEAD",
+ "RemoteSha": "e223b7664bcbbf8503716e65daf34a0f46ab75d1",
+ "Hash": "15133f38eb51d4e2d220f047422ded36"
+ },
+ "ps": {
+ "Package": "ps",
+ "Version": "1.3.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "a54a7dfd68124abb2225dbfa9a85c457"
+ },
+ "purrr": {
+ "Package": "purrr",
+ "Version": "0.3.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "22aca7d1181718e927d403a8c2d69d62"
+ },
+ "rcmdcheck": {
+ "Package": "rcmdcheck",
+ "Version": "1.3.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "ed95895886dab6d2a584da45503555da"
+ },
+ "readr": {
+ "Package": "readr",
+ "Version": "1.3.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "af8ab99cd936773a148963905736907b"
+ },
+ "readxl": {
+ "Package": "readxl",
+ "Version": "1.3.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "63537c483c2dbec8d9e3183b3735254a"
+ },
+ "recipes": {
+ "Package": "recipes",
+ "Version": "0.1.13",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "f3ce68cd2bd38e508cbdcbec44c15d46"
+ },
+ "rematch": {
+ "Package": "rematch",
+ "Version": "1.0.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "c66b930d20bb6d858cd18e1cebcfae5c"
+ },
+ "rematch2": {
+ "Package": "rematch2",
+ "Version": "2.1.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "76c9e04c712a05848ae7a23d2f170a40"
+ },
+ "remotes": {
+ "Package": "remotes",
+ "Version": "2.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "430a0908aee75b1fcba0e62857cab0ce"
+ },
+ "renv": {
+ "Package": "renv",
+ "Version": "0.12.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "b5510c50c7f31d453c385c7b460af2b9"
+ },
+ "reprex": {
+ "Package": "reprex",
+ "Version": "0.3.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "b06bfb3504cc8a4579fd5567646f745b"
+ },
+ "reshape2": {
+ "Package": "reshape2",
+ "Version": "1.4.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "bb5996d0bd962d214a11140d77589917"
+ },
+ "rex": {
+ "Package": "rex",
+ "Version": "1.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "093584b944440c5cd07a696b3c8e0e4c"
+ },
+ "rlang": {
+ "Package": "rlang",
+ "Version": "0.4.8",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "843a6af51414bce7f8a8e372f11d6cd0"
+ },
+ "rmarkdown": {
+ "Package": "rmarkdown",
+ "Version": "2.5",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "20a0a94af9e8f7040510447763aab3e9"
+ },
+ "roxygen2": {
+ "Package": "roxygen2",
+ "Version": "7.1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "fcd94e00cc409b25d07ca50f7bf339f5"
+ },
+ "rpart": {
+ "Package": "rpart",
+ "Version": "4.1-15",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "9787c1fcb680e655d062e7611cadf78e"
+ },
+ "rprojroot": {
+ "Package": "rprojroot",
+ "Version": "1.3-2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "f6a407ae5dd21f6f80a6708bbb6eb3ae"
+ },
+ "rstudioapi": {
+ "Package": "rstudioapi",
+ "Version": "0.11",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "33a5b27a03da82ac4b1d43268f80088a"
+ },
+ "rsvg": {
+ "Package": "rsvg",
+ "Version": "2.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "f3d32ee70ee9e5ca65b06ee61b4ce813"
+ },
+ "rversions": {
+ "Package": "rversions",
+ "Version": "2.0.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "0ec41191f744d0f5afad8c6f35cc36e4"
+ },
+ "rvest": {
+ "Package": "rvest",
+ "Version": "0.3.6",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "a9795ccb2d608330e841998b67156764"
+ },
+ "scales": {
+ "Package": "scales",
+ "Version": "1.1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "6f76f71042411426ec8df6c54f34e6dd"
+ },
+ "scatterplot3d": {
+ "Package": "scatterplot3d",
+ "Version": "0.3-41",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "0d3e8c286b735517c2df4ed48848e732"
+ },
+ "selectr": {
+ "Package": "selectr",
+ "Version": "0.4-2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "3838071b66e0c566d55cc26bd6e27bf4"
+ },
+ "sessioninfo": {
+ "Package": "sessioninfo",
+ "Version": "1.1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "308013098befe37484df72c39cf90d6e"
+ },
+ "shiny": {
+ "Package": "shiny",
+ "Version": "1.5.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "ee4ed72d7a5047d9e73cf922ad66e9c9"
+ },
+ "shinyjs": {
+ "Package": "shinyjs",
+ "Version": "2.0.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "9ddfc91d4280eaa34c2103951538976f"
+ },
+ "sourcetools": {
+ "Package": "sourcetools",
+ "Version": "0.1.7",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "947e4e02a79effa5d512473e10f41797"
+ },
+ "stringi": {
+ "Package": "stringi",
+ "Version": "1.5.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "a063ebea753c92910a4cca7b18bc1f05"
+ },
+ "stringr": {
+ "Package": "stringr",
+ "Version": "1.4.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "0759e6b6c0957edb1311028a49a35e76"
+ },
+ "survival": {
+ "Package": "survival",
+ "Version": "3.1-12",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "1c5bb53bd428f3c42a25b7aeb983d8c7"
+ },
+ "sys": {
+ "Package": "sys",
+ "Version": "3.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "b227d13e29222b4574486cfcbde077fa"
+ },
+ "tarchetypes": {
+ "Package": "tarchetypes",
+ "Version": "0.0.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "be2b048ed0546462c12e89d59346fca6"
+ },
+ "targets": {
+ "Package": "targets",
+ "Version": "0.1.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "b5ea4afbcf2db5100a356358808898eb"
+ },
+ "testthat": {
+ "Package": "testthat",
+ "Version": "2.3.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "0829b987b8961fb07f3b1b64a2fbc495"
+ },
+ "tibble": {
+ "Package": "tibble",
+ "Version": "3.0.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "08bd36bd34b20d4f7971d49e81deaab0"
+ },
+ "tidyr": {
+ "Package": "tidyr",
+ "Version": "1.1.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "c40b2d5824d829190f4b825f4496dfae"
+ },
+ "tidyselect": {
+ "Package": "tidyselect",
+ "Version": "1.1.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "6ea435c354e8448819627cf686f66e0a"
+ },
+ "tidyverse": {
+ "Package": "tidyverse",
+ "Version": "1.3.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "bd51be662f359fa99021f3d51e911490"
+ },
+ "timeDate": {
+ "Package": "timeDate",
+ "Version": "3043.102",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "fde4fc571f5f61978652c229d4713845"
+ },
+ "tinytex": {
+ "Package": "tinytex",
+ "Version": "0.25",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "a4b9662282097d1033c60420dcb83350"
+ },
+ "usethis": {
+ "Package": "usethis",
+ "Version": "1.6.3",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "c541a7aed5f7fb3b487406bf92842e34"
+ },
+ "utf8": {
+ "Package": "utf8",
+ "Version": "1.1.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "4a5081acfb7b81a572e4384a7aaf2af1"
+ },
+ "vctrs": {
+ "Package": "vctrs",
+ "Version": "0.3.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "0bc90078aeee42f2520b1d0a33bd6758"
+ },
+ "viridis": {
+ "Package": "viridis",
+ "Version": "0.5.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "6f6b49e5b3b5ee5a6d0c28bf1b4b9eb3"
+ },
+ "viridisLite": {
+ "Package": "viridisLite",
+ "Version": "0.3.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "ce4f6271baa94776db692f1cb2055bee"
+ },
+ "visNetwork": {
+ "Package": "visNetwork",
+ "Version": "2.0.9",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "12545f2acf49d1d346d075580122d89c"
+ },
+ "whisker": {
+ "Package": "whisker",
+ "Version": "0.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "ca970b96d894e90397ed20637a0c1bbe"
+ },
+ "withr": {
+ "Package": "withr",
+ "Version": "2.2.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "ecd17882a0b4419545691e095b74ee89"
+ },
+ "xfun": {
+ "Package": "xfun",
+ "Version": "0.17",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "5016afba2a931ac92bbb3c6feb03d2c8"
+ },
+ "xml2": {
+ "Package": "xml2",
+ "Version": "1.3.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "d4d71a75dd3ea9eb5fa28cc21f9585e2"
+ },
+ "xopen": {
+ "Package": "xopen",
+ "Version": "1.0.0",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "6c85f015dee9cc7710ddd20f86881f58"
+ },
+ "xtable": {
+ "Package": "xtable",
+ "Version": "1.8-4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2"
+ },
+ "yaml": {
+ "Package": "yaml",
+ "Version": "2.2.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "2826c5d9efb0a88f657c7a679c7106db"
+ }
+ }
+}
diff --git a/renv/.gitignore b/renv/.gitignore
new file mode 100644
index 0000000..62e60ad
--- /dev/null
+++ b/renv/.gitignore
@@ -0,0 +1,4 @@
+library/
+lock/
+python/
+staging/
diff --git a/renv/activate.R b/renv/activate.R
new file mode 100644
index 0000000..6841a96
--- /dev/null
+++ b/renv/activate.R
@@ -0,0 +1,400 @@
+
+local({
+
+ # the requested version of renv
+ version <- "0.12.3"
+
+ # the project directory
+ project <- getwd()
+
+ # avoid recursion
+ if (!is.na(Sys.getenv("RENV_R_INITIALIZING", unset = NA)))
+ return(invisible(TRUE))
+
+ # signal that we're loading renv during R startup
+ Sys.setenv("RENV_R_INITIALIZING" = "true")
+ on.exit(Sys.unsetenv("RENV_R_INITIALIZING"), add = TRUE)
+
+ # signal that we've consented to use renv
+ options(renv.consent = TRUE)
+
+ # load the 'utils' package eagerly -- this ensures that renv shims, which
+ # mask 'utils' packages, will come first on the search path
+ library(utils, lib.loc = .Library)
+
+ # check to see if renv has already been loaded
+ if ("renv" %in% loadedNamespaces()) {
+
+ # if renv has already been loaded, and it's the requested version of renv,
+ # nothing to do
+ spec <- .getNamespaceInfo(.getNamespace("renv"), "spec")
+ if (identical(spec[["version"]], version))
+ return(invisible(TRUE))
+
+ # otherwise, unload and attempt to load the correct version of renv
+ unloadNamespace("renv")
+
+ }
+
+ # load bootstrap tools
+ bootstrap <- function(version, library) {
+
+ # read repos (respecting override if set)
+ repos <- Sys.getenv("RENV_CONFIG_REPOS_OVERRIDE", unset = NA)
+ if (is.na(repos))
+ repos <- getOption("repos")
+
+ # fix up repos
+ on.exit(options(repos = repos), add = TRUE)
+ repos[repos == "@CRAN@"] <- "https://cloud.r-project.org"
+ options(repos = repos)
+
+ # attempt to download renv
+ tarball <- tryCatch(renv_bootstrap_download(version), error = identity)
+ if (inherits(tarball, "error"))
+ stop("failed to download renv ", version)
+
+ # now attempt to install
+ status <- tryCatch(renv_bootstrap_install(version, tarball, library), error = identity)
+ if (inherits(status, "error"))
+ stop("failed to install renv ", version)
+
+ }
+
+ renv_bootstrap_download_impl <- function(url, destfile) {
+
+ mode <- "wb"
+
+ # https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17715
+ fixup <-
+ Sys.info()[["sysname"]] == "Windows" &&
+ substring(url, 1L, 5L) == "file:"
+
+ if (fixup)
+ mode <- "w+b"
+
+ download.file(
+ url = url,
+ destfile = destfile,
+ mode = mode,
+ quiet = TRUE
+ )
+
+ }
+
+ renv_bootstrap_download <- function(version) {
+
+ # if the renv version number has 4 components, assume it must
+ # be retrieved via github
+ nv <- numeric_version(version)
+ components <- unclass(nv)[[1]]
+
+ methods <- if (length(components) == 4L) {
+ list(renv_bootstrap_download_github)
+ } else {
+ list(
+ renv_bootstrap_download_cran_latest,
+ renv_bootstrap_download_cran_archive
+ )
+ }
+
+ for (method in methods) {
+ path <- tryCatch(method(version), error = identity)
+ if (is.character(path) && file.exists(path))
+ return(path)
+ }
+
+ stop("failed to download renv ", version)
+
+ }
+
+ renv_bootstrap_download_cran_latest <- function(version) {
+
+ repos <- renv_bootstrap_download_cran_latest_find(version)
+
+ message("* Downloading renv ", version, " from CRAN ... ", appendLF = FALSE)
+
+ info <- tryCatch(
+ download.packages("renv", repos = repos, destdir = tempdir(), quiet = TRUE),
+ condition = identity
+ )
+
+ if (inherits(info, "condition")) {
+ message("FAILED")
+ return(FALSE)
+ }
+
+ message("OK")
+ info[1, 2]
+
+ }
+
+ renv_bootstrap_download_cran_latest_find <- function(version) {
+
+ # check for renv on CRAN matching this version
+ all <- unique(c(
+ getOption("repos"),
+ getOption("renv.bootstrap.repos", default = "https://cloud.r-project.org")
+ ))
+
+ for (repos in all) {
+
+ db <- tryCatch(
+ as.data.frame(available.packages(repos = repos), stringsAsFactors = FALSE),
+ error = identity
+ )
+
+ if (inherits(db, "error"))
+ next
+
+ entry <- db[db$Package %in% "renv" & db$Version %in% version, ]
+ if (nrow(entry) == 0)
+ next
+
+ return(repos)
+
+ }
+
+ fmt <- "renv %s is not available from your declared package repositories"
+ stop(sprintf(fmt, version))
+
+ }
+
+ renv_bootstrap_download_cran_archive <- function(version) {
+
+ name <- sprintf("renv_%s.tar.gz", version)
+ repos <- getOption("repos")
+ urls <- file.path(repos, "src/contrib/Archive/renv", name)
+ destfile <- file.path(tempdir(), name)
+
+ message("* Downloading renv ", version, " from CRAN archive ... ", appendLF = FALSE)
+
+ for (url in urls) {
+
+ status <- tryCatch(
+ renv_bootstrap_download_impl(url, destfile),
+ condition = identity
+ )
+
+ if (identical(status, 0L)) {
+ message("OK")
+ return(destfile)
+ }
+
+ }
+
+ message("FAILED")
+ return(FALSE)
+
+ }
+
+ renv_bootstrap_download_github <- function(version) {
+
+ enabled <- Sys.getenv("RENV_BOOTSTRAP_FROM_GITHUB", unset = "TRUE")
+ if (!identical(enabled, "TRUE"))
+ return(FALSE)
+
+ # prepare download options
+ pat <- Sys.getenv("GITHUB_PAT")
+ if (nzchar(Sys.which("curl")) && nzchar(pat)) {
+ fmt <- "--location --fail --header \"Authorization: token %s\""
+ extra <- sprintf(fmt, pat)
+ saved <- options("download.file.method", "download.file.extra")
+ options(download.file.method = "curl", download.file.extra = extra)
+ on.exit(do.call(base::options, saved), add = TRUE)
+ } else if (nzchar(Sys.which("wget")) && nzchar(pat)) {
+ fmt <- "--header=\"Authorization: token %s\""
+ extra <- sprintf(fmt, pat)
+ saved <- options("download.file.method", "download.file.extra")
+ options(download.file.method = "wget", download.file.extra = extra)
+ on.exit(do.call(base::options, saved), add = TRUE)
+ }
+
+ message("* Downloading renv ", version, " from GitHub ... ", appendLF = FALSE)
+
+ url <- file.path("https://api.github.com/repos/rstudio/renv/tarball", version)
+ name <- sprintf("renv_%s.tar.gz", version)
+ destfile <- file.path(tempdir(), name)
+
+ status <- tryCatch(
+ renv_bootstrap_download_impl(url, destfile),
+ condition = identity
+ )
+
+ if (!identical(status, 0L)) {
+ message("FAILED")
+ return(FALSE)
+ }
+
+ message("Done!")
+ return(destfile)
+
+ }
+
+ renv_bootstrap_install <- function(version, tarball, library) {
+
+ # attempt to install it into project library
+ message("* Installing renv ", version, " ... ", appendLF = FALSE)
+ dir.create(library, showWarnings = FALSE, recursive = TRUE)
+
+ # invoke using system2 so we can capture and report output
+ bin <- R.home("bin")
+ exe <- if (Sys.info()[["sysname"]] == "Windows") "R.exe" else "R"
+ r <- file.path(bin, exe)
+ args <- c("--vanilla", "CMD", "INSTALL", "-l", shQuote(library), shQuote(tarball))
+ output <- system2(r, args, stdout = TRUE, stderr = TRUE)
+ message("Done!")
+
+ # check for successful install
+ status <- attr(output, "status")
+ if (is.numeric(status) && !identical(status, 0L)) {
+ header <- "Error installing renv:"
+ lines <- paste(rep.int("=", nchar(header)), collapse = "")
+ text <- c(header, lines, output)
+ writeLines(text, con = stderr())
+ }
+
+ status
+
+ }
+
+ renv_bootstrap_prefix <- function() {
+
+ # construct version prefix
+ version <- paste(R.version$major, R.version$minor, sep = ".")
+ prefix <- paste("R", numeric_version(version)[1, 1:2], sep = "-")
+
+ # include SVN revision for development versions of R
+ # (to avoid sharing platform-specific artefacts with released versions of R)
+ devel <-
+ identical(R.version[["status"]], "Under development (unstable)") ||
+ identical(R.version[["nickname"]], "Unsuffered Consequences")
+
+ if (devel)
+ prefix <- paste(prefix, R.version[["svn rev"]], sep = "-r")
+
+ # build list of path components
+ components <- c(prefix, R.version$platform)
+
+ # include prefix if provided by user
+ prefix <- Sys.getenv("RENV_PATHS_PREFIX")
+ if (nzchar(prefix))
+ components <- c(prefix, components)
+
+ # build prefix
+ paste(components, collapse = "/")
+
+ }
+
+ renv_bootstrap_library_root <- function(project) {
+
+ path <- Sys.getenv("RENV_PATHS_LIBRARY", unset = NA)
+ if (!is.na(path))
+ return(path)
+
+ path <- Sys.getenv("RENV_PATHS_LIBRARY_ROOT", unset = NA)
+ if (!is.na(path)) {
+ id <- substring(renv_bootstrap_hash_text(project), 1L, 8L)
+ name <- paste(basename(project), id, sep = "-")
+ return(file.path(path, name))
+ }
+
+ file.path(project, "renv/library")
+
+ }
+
+ renv_bootstrap_validate_version <- function(version) {
+
+ loadedversion <- utils::packageDescription("renv", fields = "Version")
+ if (version == loadedversion)
+ return(TRUE)
+
+ # assume four-component versions are from GitHub; three-component
+ # versions are from CRAN
+ components <- strsplit(loadedversion, "[.-]")[[1]]
+ remote <- if (length(components) == 4L)
+ paste("rstudio/renv", loadedversion, sep = "@")
+ else
+ paste("renv", loadedversion, sep = "@")
+
+ fmt <- paste(
+ "renv %1$s was loaded from project library, but this project is configured to use renv %2$s.",
+ "Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.",
+ "Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.",
+ sep = "\n"
+ )
+
+ msg <- sprintf(fmt, loadedversion, version, remote)
+ warning(msg, call. = FALSE)
+
+ FALSE
+
+ }
+
+ renv_bootstrap_hash_text <- function(text) {
+
+ hashfile <- tempfile("renv-hash-")
+ on.exit(unlink(hashfile), add = TRUE)
+
+ writeLines(text, con = hashfile)
+ tools::md5sum(hashfile)
+
+ }
+
+ renv_bootstrap_load <- function(project, libpath, version) {
+
+ # try to load renv from the project library
+ if (!requireNamespace("renv", lib.loc = libpath, quietly = TRUE))
+ return(FALSE)
+
+ # warn if the version of renv loaded does not match
+ renv_bootstrap_validate_version(version)
+
+ # load the project
+ renv::load(project)
+
+ TRUE
+
+ }
+
+ # construct path to library root
+ root <- renv_bootstrap_library_root(project)
+
+ # construct library prefix for platform
+ prefix <- renv_bootstrap_prefix()
+
+ # construct full libpath
+ libpath <- file.path(root, prefix)
+
+ # attempt to load
+ if (renv_bootstrap_load(project, libpath, version))
+ return(TRUE)
+
+ # load failed; inform user we're about to bootstrap
+ prefix <- paste("# Bootstrapping renv", version)
+ postfix <- paste(rep.int("-", 77L - nchar(prefix)), collapse = "")
+ header <- paste(prefix, postfix)
+ message(header)
+
+ # perform bootstrap
+ bootstrap(version, libpath)
+
+ # exit early if we're just testing bootstrap
+ if (!is.na(Sys.getenv("RENV_BOOTSTRAP_INSTALL_ONLY", unset = NA)))
+ return(TRUE)
+
+ # try again to load
+ if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) {
+ message("* Successfully installed and loaded renv ", version, ".")
+ return(renv::load())
+ }
+
+ # failed to download or load renv; warn the user
+ msg <- c(
+ "Failed to find an renv installation: the project will not be loaded.",
+ "Use `renv::activate()` to re-initialize the project."
+ )
+
+ warning(paste(msg, collapse = "\n"), call. = FALSE)
+
+})
diff --git a/renv/settings.dcf b/renv/settings.dcf
new file mode 100644
index 0000000..bf722e8
--- /dev/null
+++ b/renv/settings.dcf
@@ -0,0 +1,7 @@
+external.libraries:
+ignored.packages:
+package.dependency.fields: Imports, Depends, LinkingTo
+r.version:
+snapshot.type: implicit
+use.cache: TRUE
+vcs.ignore.library: TRUE
diff --git a/tests/testthat.R b/tests/testthat.R
new file mode 100644
index 0000000..ba8e366
--- /dev/null
+++ b/tests/testthat.R
@@ -0,0 +1,4 @@
+library(testthat)
+library(Project_Templates)
+
+test_check("Project_Templates")