4
votes

While working on outlier detection on a time series data. I came across [tsoutliers][1] packages that does implement Chen and Liu's time series outlier detection. But I am unable to install tsoutliers in R

install.packages("tsoutliers")

I am getting the following dependency errors

In file included from KF-deriv.cpp:1:0: KFKSDS.h:14:28: fatal error: gsl/gsl_vector.h: No such file or directory compilation terminated. /usr/lib/R/etc/Makeconf:143: recipe for target 'KF-deriv.o' failed make: *** [KF-deriv.o] Error 1 ERROR: compilation failed for package ‘KFKSDS’ * removing ‘/home/atoffy/R/x86_64-pc-linux-gnu-library/3.2/KFKSDS’ Warning in install.packages : installation of package ‘KFKSDS’ had non-zero exit status ERROR: dependency ‘KFKSDS’ is not available for package ‘stsm’ * removing ‘/home/atoffy/R/x86_64-pc-linux-gnu-library/3.2/stsm’ Warning in install.packages : installation of package ‘stsm’ had non-zero exit status ERROR: dependencies ‘stsm’, ‘KFKSDS’ are not available for package ‘tsoutliers’ * removing ‘/home/atoffy/R/x86_64-pc-linux-gnu-library/3.2/tsoutliers’ Warning in install.packages : installation of package ‘tsoutliers’ had non-zero exit status

More specifically

recipe for target 'KF-deriv.o' failed

Can anyone help me to install the same?

1
> version system x86_64, linux-gnu status major 3 minor 2.3 year 2015 month 12 day 10 svn rev 69752 language R version.string R version 3.2.3 (2015-12-10) - Anoop Toffy

1 Answers

5
votes

I was able to solve the same by installing

libgsl0

sudo apt-get install libgsl0-dev