diff --git a/docs/source/config_files.rst b/docs/source/config_files.rst index b13a3932..64047eba 100644 --- a/docs/source/config_files.rst +++ b/docs/source/config_files.rst @@ -109,6 +109,17 @@ While one can specify dependencies in ``setup.py``, repo2docker **requires configuration files such as** ``environment.yml`` or ``requirements.txt`` to install dependencies during the build process. +``DESCRIPTION`` +~~~~~~~~~~~~~~~ + +To install your repository like an R package, you may include a +``DESCRIPTION`` file. repo2docker installs the package and dependencies + from the ``DESCRIPTION`` by running ``devtools:install_git(".")``. + + You also need to have a ``runtime.txt`` file that is formatted as + ``r---
``, where YYYY-MM-DD is a snapshot at MRAN that will be + used for your R installation. + .. _postBuild: ``postBuild`` diff --git a/repo2docker/buildpacks/r.py b/repo2docker/buildpacks/r.py index 26c5737e..8010874f 100644 --- a/repo2docker/buildpacks/r.py +++ b/repo2docker/buildpacks/r.py @@ -263,8 +263,7 @@ class RBuildPack(PythonBuildPack): ( "${NB_USER}", r""" - R CMD build . && \ - R CMD install . + R --quiet -e "devtools::install_git('.')" """ ) ] diff --git a/tests/external/reproductions.repos.yaml b/tests/external/reproductions.repos.yaml index b434d229..311cd39f 100644 --- a/tests/external/reproductions.repos.yaml +++ b/tests/external/reproductions.repos.yaml @@ -30,3 +30,7 @@ url: https://github.com/QuantStack/xeus-cling ref: 0.4.5 verify: jupyter kernelspec list +- name: Test compiling R package + url: https://github.com/gedankenstuecke/binder-r-description + ref: master + verify: R --quiet -e 'binderdescription::print_something()'