baumer-lab / fertile

creating optimal conditions for reproducibility
GNU General Public License v3.0
52 stars 4 forks source link

edited `proj_pkg_script` to address issue #69 #70

Closed ambertin closed 4 years ago

ambertin commented 4 years ago

In an attempt to address #69, proj_pkg_script() now differentiates between CRAN and GitHub packages during the process of generating its install script and also finds if packages are not available on either site.

The line that gets added to the install script is now different based on package location: CRAN packages get install.packages() GitHub packages get a comment saying the package is on GitHub but an author name and install_github() are required to install Packages on neither site get a comment saying just that.

This way, all of the packages that appear in an Rproj folder still receive a line in the package install script so it is clear that they were used, but not all receive calls to install.packages() that would fail if run.