Hello,
I have casually used R in the past but would consider myself definitely a novice. I am working with someone else's code (that I know has successfully worked) and I'm having issues installing and using the package "emtrends." Here is the code I've used:
install.packages("emtrends")
library(emtrends)
Here is the error I've received:
> install.packages("emtrends")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/gina7/AppData/Local/R/win-library/4.3’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘emtrends’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
> library(emtrends)
Error in library(emtrends) : there is no package called ‘emtrends’
>
Please note that (1) I have the emmeans package installed and working, which I've read is needed for emtrends; (2) I do have RTools installed, contradicting the error message I've received; (3) even though I received the same error messages yesterday, I was still able to get the emtrends function to work at that time - but not anymore.
I am baffled by the message "there is no package called ‘emtrends’" given that my friends' code has worked, and their are several websites describing the emtrends package. I even used the code "help(emtrends, package="emtrends")" and received the error "Error in find.package(if (is.null(package)) loadedNamespaces() else package, :
there is no package called ‘emtrends’".
I have the latest version of RStudio installed. Can someone help? Thank you.