Installing package (“forecast”) in R

I already have RHive installed, then for the next step, I woul like try to install forecast package of R. This is my share thought while installing forecast package in R

1. Open R shell

$ sudo R

2. In the R shell, install forecast package

> install.packages(“forecast”)

while installing forecast package, in the console will print this following information

” also installing the dependencies ‘quadprog’, ‘tseries’, ‘fracdiff’, ‘RcppArmadillo’ ”

However, i found some problem, for example

  • Cannot find /Install Rcpp
    Solution : install packages Rcpp inside R shell  : > install.packages(“Rcpp”)
  • Cannot find some compiler

    /usr/bin/ld: cannot find -llapack
    /usr/bin/ld: cannot find -lblas

  • Cannot install RcppArmadillo
    Solution : install packages RcppArmadillo inside R shell –> install.packages(“RcppArmadillo”)
  • RcppArmadillo cannot be installed
    solution : try to install this package : $ sudo apt-get install r-base-dev , then once again try to install RcppArmadillo inside R shell

This following step will be the best practice for installing packages (“forecast”) in R (version 3.0.2)

  1. Install / re install specific version of R
  2. Install this following packages, by following these step
  • Go to R shell
  • $ sudo R
  • > install.packages(“Rcpp”)
  • > install.packages(“RcppArmadillo”)
  • > install.packages(“quadprog”)
  • > install.packages(“fracdiff”)
  • > install.packages(“forecast”)

Note : when installing package forecast also installing the dependencies ‘quadprog’, ‘tseries’, ‘fracdiff’, ‘RcppArmadillo’

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s