Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. In your home directory (the directory you access when logging onto Teton), create a directory called “R_LIBS”.

  2. In your home directory create a hidden file called “.Renviron”

    1. Edit this hidden file by using “vim .Renviron”

    2. The only text in this hidden file shoudl be “R_LIBS=/home/Yourhomedirectory/R_LIBS”

  3. Navigate into the R_LIBS directory and make sure you can load R

    1. Type “R” to load R. If successful quit by typing “q()” and select “n” to avoid saving the workspace.

  4. You will then need to download the tarball for whatever package you would like to install.

    1. Dada2 example: “wget https://github.com/benjjneb/dada2/archive/v1.16.tar.gz

    2. This will download the files into the R_LIBS folder. If its downloaded to your home folder move it to the R_LIBS directory.

  5. Use “ls” to check that the package was downloaded and to check the name of the file.

  6. To install the package use “R CMD INSTALL v1.16.tar.gz”

    1. This will likely fail the first time as you will need to install the required dependencies by hand.

    2. For packages available via CRAN you can download the tarballs from the manual page (e.g. for the psych package: https://cran.r-project.org/web/packages/psych/index.html)

    3. for packages that are available through bioconductor, search the package name and navigate to the bioconductor page. The binaries are located at the bottom of the page (*.tgz). You can then click and drag the link to your terminal window. This will give you the right address to pull the binaries from. You can then put “wget” infront of the address to download the file.

    4. This step is what takes forever.

      1. MIGHT WORK? As a work around, you could copy the R_LIBS folder found at “//project/microbiome/R_LIBS” to your own home folder. While some of these packages are outdated, it will allow you to work with tidyverse, ggplot, dada2 and DESeq2 among other.

    5. You will have to install each package that is not found.

      1. The error reads “ERROR: dependencies ‘pckgname’ are not available

        1. This means you will have to install each package listed manually.

        2. The folder R_LIBS includes all the necessary packages to do this but the names of packages aren’t clear. It might be best to install them fresh from CRAN.

...