2
votes

install.packages('forecast')

Installing package into ‘/usr/lib64/R/library’ (as ‘lib’ is unspecified) trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/forecast_5.4.tar.gz' Content type 'application/x-gzip' length 150965 bytes (147 Kb) opened URL downloaded 147 Kb

installing source package ‘forecast’ ... package ‘forecast’ successfully unpacked and MD5 sums checked libs g++ -m64 -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppArmadillo/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c calcBATS.cpp -o calcBATS.o

In file included from calcBATS.cpp:1:0: calcBATS.h:36:27: fatal error: RcppArmadillo.h: No such file or directory

#include ^ compilation terminated. make: * [calcBATS.o] Error 1 ERROR: compilation failed for package ‘forecast’ * removing ‘/usr/lib64/R/library/forecast’

The downloaded source packages are in ‘/tmp/RtmpJRX18M/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done Warning message: In install.packages("forecast") : installation of package ‘forecast’ had non-zero exit status

1
Can someone help me figure out this problem? I guess I am missing the RcppArmadillo package or it's not in the system path.user3645950

1 Answers

1
votes

Looks like there is a missing package dependence, RcppArmadillo.

install.packages("RcppArmadillo")

Then:

install.packages('forecast')