1

I am using the latest R package and geosptaial modelling environment 0.7.3 to create kernel density estimates for the data I have. When I try to install the kernelsmooth package, I get this:

packages("ks", dependencies=TRUE) library("ks") Error: unexpected symbol in "install.packages("ks", dependencies=TRUE) library"

I have installed the ks package, but not the library. When I try to create a KDE in GME, it says it could not create a KDE because 'the ks library does not appear to be installed in R. Please install it and rerun this command.'

Anyone know how to rectify this?

Thanks

1 Answers1

1

You either need to seperate your commands with a ; or put them on different lines:

install.packages("ks", dependencies=TRUE); library("ks")

install.packages("ks", dependencies=TRUE)
library("ks")
admccurdy
  • 694
  • 3
  • 11
  • I separated them and it says: package ‘ks’ successfully unpacked and MD5 sums checked. But then it says - library("ks") Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called ‘Rcpp’ Error: package or namespace load failed for ‘ks’ – Penny Banham Oct 30 '15 at 15:35
  • Try installing and loading Rcpp the same way you did ks, I would think that loading ks would have done that but it appears not. – admccurdy Oct 30 '15 at 15:44
  • I installed Rcpp and this came up - package ‘Rcpp’ successfully unpacked and MD5 sums checked, so then I ran the ks package again, but I got the same error message above – Penny Banham Oct 30 '15 at 16:14
  • Run `find.package("Rcpp")` and `find.package("ks")` to make sure they're installed in the same directory. – admccurdy Oct 30 '15 at 16:27
  • > find.package("Rcpp") Error in find.package("Rcpp") : there is no package called ‘Rcpp’ > find.package("ks") [1] "C:/Users/Penny/Documents/R/win-library/3.2/ks" that's what I'm getting – Penny Banham Oct 30 '15 at 16:42
  • It looks like Rccp I would try running `install.packages("Rccp")` again. If that doesn't work I'm out of suggestions maybe someone else has a different idea. – admccurdy Oct 30 '15 at 18:30
  • Try this http://stackoverflow.com/questions/19407092/r-not-finding-package-even-after-package-installation – admccurdy Oct 30 '15 at 18:32