I’m trying to load the ‘raster’ package into my R session.
I already have it downloaded, but I used the install.packages() anyways at the beginning of the session. It gives me this output:
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/NAME/AppData/Local/R/win-library/4.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.4/raster_3.6-30.zip'
Content type 'application/zip' length 3682866 bytes (3.5 MB)
downloaded 3.5 MB
package ‘raster’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:UsersNAMEAppDataLocalTempRtmpC88ZETdownloaded_packages
Error in .External(list(name = "CppMethod__invoke_notvoid", address = <pointer: (nil)>, :
NULL value passed as symbol address
Error in .External(list(name = "CppMethod__invoke_notvoid", address = <pointer: (nil)>, :
NULL value passed as symbol address
Error in .External(list(name = "CppMethod__invoke_notvoid", address = <pointer: (nil)>, :
NULL value passed as symbol address
Error in .External(list(name = "CppMethod__invoke_notvoid", address = <pointer: (nil)>, :
NULL value passed as symbol address
I then try to use the library() function to call the raster package, and it returns this error code:
Error: package or namespace load failed for ‘raster’:
Functions found when exporting methods from the namespace ‘raster’ which are not S4 generic: ‘colSums’, ‘rowSums’
Then, when I try to use the raster() function, it returns an error code it could not find that function.
I’ve tried using update.packages() but that hasn’t fixed it. I am running R version 4.4.2 and RStudio version 2024.9.1.394 if that could affect anything.
I do really need this package for its ‘raster’ function and haven’t found a workaround to use another package, so any help is appreciated. Thanks.
1