Use new way of installing bioconductor
MODIFY
repo2docker/buildpacks/r.py
repo2docker/buildpacks/r.py
@@ -340,6 +340,8 @@ class RBuildPack(PythonBuildPack):
]
if "r" in self.stencila_contexts:
+ # new versions of R require a different way of installing bioconductor
+ if self.r_version.startswith("3.4"):
scripts += [
(
"${NB_USER}",
@@ -352,6 +354,19 @@ class RBuildPack(PythonBuildPack):
)
]
+ else:
+ scripts += [
+ (
+ "${NB_USER}",
+ # Install and register stencila library
+ r"""
+ R --quiet -e "install.packages('BiocManager'); BiocManager::install(); BiocManager::install(c('graph'))" && \
+ R --quiet -e "devtools::install_github('stencila/r', ref = '361bbf560f3f0561a8612349bca66cd8978f4f24')" && \
+ R --quiet -e "stencila::register()"
+ """,
+ )
+ ]
+
return super().get_build_scripts() + scripts
def get_preassemble_script_files(self):

Use new way of installing bioconductor