-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update documentation for R package management with conda #393
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,24 +71,7 @@ Installing Miniconda | |
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
If you have Miniconda already installed, you can skip ahead to the next | ||
section, if Miniconda is not installed, we start with that. Download the | ||
Bash script that will install it from | ||
`conda.io <https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh>`_ | ||
using, e.g., ``wget``:: | ||
|
||
$ wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | ||
|
||
Once downloaded, run the installation script:: | ||
|
||
$ bash Miniconda3-latest-Linux-x86_64.sh -b -p $VSC_DATA/miniconda3 | ||
|
||
Optionally, you can add the path to the Miniconda installation to the | ||
PATH environment variable in your ``.bashrc`` file. This is convenient, but | ||
may lead to conflicts when working with the module system, so make sure | ||
that you know what you are doing in either case. The line to add to your | ||
``.bashrc`` file would be:: | ||
|
||
export PATH="${VSC_DATA}/miniconda3/bin:${PATH}" | ||
section, if Miniconda is not installed please follow our :ref:`guide to installing miniconda <install_miniconda_python>`. | ||
|
||
.. _create_r_conda_env: | ||
|
||
|
@@ -105,17 +88,19 @@ If the result is blank, or reports that conda can not be found, modify | |
the \`PATH\` environment variable appropriately by adding miniconda's bin | ||
directory to PATH. | ||
|
||
Creating a new conda environment is straightforward:: | ||
The next step is to create a new conda environment which can be done as follows:: | ||
|
||
$ conda search -c conda-forge r-base # select one of available versions for the step below | ||
$ conda create -n science -c conda-forge r-base=<version> r-essentials | ||
|
||
|
||
$ conda create -n science -c r r-essentials r-rodbc | ||
This command creates a new conda environment called "science", and installs your prefered R | ||
version from the conda-forge channel as well as the r-essentials bundle which includes number | ||
of commonly used R packages such as ggplot2, glmnet, dplyr, tidyr, and shiny. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. following our style for the vsc pages, please change the typesetting for the package names by sandwiching them with opening/closing double-backticks; so that instead of ggplot2, we eventually render |
||
|
||
This command creates a new conda environment called science, and | ||
installs a number of R packages that you will probably want to have | ||
handy in any case to preprocess, visualize, or postprocess your data. | ||
You can of course install more, depending on your requirements and | ||
personal taste. | ||
.. note:: | ||
|
||
A lot of bioconda and bioconductor packages are not in sync with their dependencies, therefore you may need to create a separate environment for each of those packages to avoid conflicts. | ||
A lot of bioconda and bioconductor packages are not in sync with their dependencies, therefore you may need to create a separate environment for each of those packages to avoid conflicts. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For bioconda I'm not sure, but with bioconductor this is because there are 2 releases per year, so dependencies can become somewhat older at some point. I would rather say here: start with installing the bioconductor (and bioconda?) packages and let conda figure out the dependencies. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did not change the content of this remark, I just made it a propper There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know where this comment comes from, but it is a very relevant one. So, I'd keep it. |
||
|
||
Working with the environment | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
@@ -133,7 +118,7 @@ Here, science is the name of the environment you want to work in. | |
Install an additional package | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
To install an additional package, e.g., \`pandas`, first ensure that the | ||
To install an additional package, e.g., \`rodbc`, first ensure that the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instead of `rodbc |
||
environment you want to work in is activated. | ||
|
||
:: | ||
|
@@ -144,7 +129,7 @@ Next, install the package: | |
|
||
:: | ||
|
||
$ conda install -c r r-ggplot2 | ||
$ conda install -c conda-forge r-rodbc | ||
|
||
Note that conda will take care of all dependencies, including non-R | ||
libraries. This ensures that you work in a consistent environment. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some users are dummies. For such, we have to also mention that they need to pick a specific R version in advance, and substitute that below when
<version>
. Can you please include a sentence to cover this?