diff --git a/DESCRIPTION b/DESCRIPTION index 6b9bf7d..2068517 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: projecttemplates Title: Project Templates for Reproducible Research and Analyses -Version: 0.6.1 +Version: 0.6.2 Authors@R: person(given = "Jasen", family = "Finch", diff --git a/NEWS.md b/NEWS.md index 34ba075..3c5f348 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# projecttemplates 0.6.2 + +* Fix for [`renv`](https://rstudio.github.io/renv/index.html) when Bioconductor dependencies are included in argument `dependencies`. + # projecttemplates 0.6.1 * Added the `sandbox` argument to `renvInitialise()` to allow the selection of whether sandboxing is used during [`renv`](https://rstudio.github.io/renv/index.html) initialisation. diff --git a/R/renv.R b/R/renv.R index bd68f7c..42f583d 100644 --- a/R/renv.R +++ b/R/renv.R @@ -29,8 +29,20 @@ renvInitialise <- function(project_directory, bare = TRUE) if (length(dependencies) > 0) { - renv::install(dependencies,project = project_directory) - } + + if (!isFALSE(bioconductor)){ + dependencies <- c( + 'BiocManager', + dependencies + ) + } + + lapply( + dependencies, + function(x,project_directory){renv::install(x,project = project_directory)}, + project_directory = project_directory + ) + } renv::hydrate(project = project_directory)