software,

Installing R Packages

Follow Sep 06, 2015 · 1 min read

Install R Packages

Let consider the installation of Knowledge Space Theory kst package.

Renviron File First we create a file .Renviron in our home area

Add the line R_LIBS=/data/Rpackages/ to it.

This means that whenever you start R, the directory /data/Rpackages/ is added to the list of places to look for R packages and so:

**CommandLine Installation ** We just fire up an R shell and type:

install.packages(“kst”)

or you can explicitly pass installation path

install.packages(“kst”, lib=”/data/Rpackages/”) library(kst, lib.loc=”/data/Rpackage=s/”)

The installation can also be done using GUI of RStudio by selecting the option Tools->Install Packages

References

  • http://www.r-bloggers.com/installing-r-packages/
Written by