Open rtapella opened 4 months ago
There are some tips and tricks to this.
import
(python) or library
(R) to the listFor R here's a little python code to take your list of package installs and scan conda for matches by adding a prefix of r-
# using a python notebook - we can also make an R variant
pkgs = ['sys', 'askpass', 'pkgbuild', 'rprojroot', 'diffobj', 'rematch2', 'curl', 'jsonlite', 'mime', 'openssl', 'base64enc', 'brio', 'callr', 'desc', 'evaluate', 'pkgload', 'praise', 'processx', 'ps', 'waldo', 'prettyunits', 'fs', 'httr', 'purrr', 'aws.signature', 'digest', 'testthat']
rpkgs = [f"r-{item}"for item in pkgs]
print(rpkgs)
# then notebook shell
!conda install -c conda-forge {" ".join(rpkgs)}
#once you have your list format it for the conda yml file
for item in rpkgs:
print(f"\t- {item}")
Note: some R packages will require the use of install.R instead of conda Here's an example:
I think this should be expanded into its own section with the other conda/environment docs.
For now I am updating some mentions of setting up requirements.txt/conda