How to install a R package into Sandbox?

Step 1:

Go to alphabetical list of all cran r-project packages at cran web page

Step 2:

Find your R package and click the package name to open the package page. For example, Reticulate package

Step 3:

Load the package to your local machine (from Package source line, red arrow in Figure 1)

  1. Fig 1)

Step 4:

Check if all dependences (green arrow) are already in your Sandbox

Step 5:

Open RStudio and type

ListOfPackages = library()$results[,1]

Step 6:

Then go through all dependences (indicated by green arrow in Figure 1) to check if they are already found.

'Name_of_package' %in% ListOfPackagesExample: 'Matrix' %in% ListOfPackages

Step 7:

If the package is found, R returns TRUE. If not, R returns FALSE.

Step 8:

If dependences are not found load them to your local machine as well.

Step 9:

After you have R packages you need on your local machine, load them to FinnGen green bucked by follow uploading instructions in section “How to upload to your own IVM via /finngen/green”.

Step 10:

Install your packages. In Sandbox RStudio console or in R type

install.packages("/finngen/green/reticulate_1.20.tar.gz ", 'path/to_your_gnu_library_folder', repos = NULL, type="source")

Step 11:

You can check the name and path of your gnu library folder with your file manager. It is something like /home/ivm/R/x86_64-pc-linux-gnu-library/4.1.

Step 12:

That’s it. You can now call your library in R / RStudio as usual, e.g. at the console: library(reticulate)

Last updated