Question
How do I install R packages in a virtual conda environment via command line interface?
Answer
1. From the Anaconda Prompt command line (CLI) in an active virtual conda environment, enter "conda config --show channels" to list channels in order of priority.
- This will ensure the conda-forge channel is the top of the channel list in the environment.
- Using the conda-forge channel will ensure the R package and dependencies will come from the CRAN repository.

2. Add new R package.
a. Enter "conda install r-<package-name>" to install package.The below screenshots show the beginning and end output of installation of the example R package.
Example package: dplyr
b. A prompt to proceed will be displayed and require entering "y".
c. The new package is added.

