1

The sp package was installed using RStudio (through CRAN) but when R evaluates the code:

library(sp)

It throws an error

Error in library(sp) : there is no package called 'sp'

I noticed that it works for R versions 4.* but does not work for versions 3.*. What could be causing this?

Abel Callejo
  • 13,779
  • 10
  • 69
  • 84
  • Different environments? – user2974951 Oct 20 '21 at 05:47
  • Does this answer your question? [After I upgrade my R version, how can I easily reinstall all the packages that were installed in the old version?](https://stackoverflow.com/questions/3974488/after-i-upgrade-my-r-version-how-can-i-easily-reinstall-all-the-packages-that-w) – Limey Oct 20 '21 at 07:08
  • Possible duplicate https://stackoverflow.com/q/19407092/680068 and https://stackoverflow.com/q/47395807/680068 – zx8754 Oct 20 '21 at 07:19

1 Answers1

0

If you first time to use 'sp', install.... :)

install.packages("sp")
library(sp)
CookAtRice
  • 990
  • 9
  • 10