fix R DESCRIPTION installation
MODIFY
docs/source/config_files.rst
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-<YYYY>-<MM>-<DD>``, where YYYY-MM-DD is a snapshot at MRAN that will be
+ used for your R installation.
+
.. _postBuild:
``postBuild``

MODIFY
repo2docker/buildpacks/r.py
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('.')"
"""
)
]

MODIFY
tests/external/reproductions.repos.yaml
tests/external/reproductions.repos.yaml
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()'

fix R DESCRIPTION installation