Hi! I'm using a PC with Windows 10. I keep running into this error. For example:
Error in diversity(trees, index = "shannon") : **
** could not find function "diversity"
this was when I was doing something very simple with the vegan package.This has also happened multiple times with ggplot2, ex.
Error in ggplot2(data = data, aes(x = MovieLens.Rating)) : **
** could not find function "ggplot2"
Even why I was trying to install rtools, it came up:
Error in install.Rtools(choose_version = TRUE, check = FALSE, GUI = TRUE, : **
** could not find function "install.Rtools"
I know to re-load packages such as vegan and ggplot2 every time I open a new R session, and I have the other pre-requisite packages loaded before I execute my code (eg. permute for vegan).
Also, I tried running this line of code I found while scouring the internet for help
ggplot2 : : ggplot(mtcars, ggplot2 : : aes(wt, mpg)) + ggplot2 : : geom_point()
and it produced a nice plot, so at least ggplot2 was actually loading.
Any ideas? Has anyone run into this before?