could not find function "validate_key" using MODISTools in R

412 Views Asked by At

I am getting the below error and don't know what is causing it.

I am following this vignette to learn MODISTools.

https://cran.r-project.org/web/packages/MODISTools/vignettes/modistools-vignette.html

library(MODISTools)

products <- mt_products()

Warning: namespace ‘cachem’ is not available and has been replaced
by .GlobalEnv when processing object ‘<unknown>’
Error in validate_key(key) : could not find function "validate_key"
1

There are 1 best solutions below

0
On

I had the same problem.

validate_key() is a function from the cachem package. It seems like MODISTools depends on this package but not always installs it. For me, installing and loading the cachem package manually resolved the error.