raster
raster copied to clipboard
Error in x$.self$finalize() : attempt to apply non-function
I am tried to read a shapefile:
raster::shapefile("myshape.shp")
And show an error Error in x$.self$finalize() : attempt to apply non-function.
I tried to reinstall the package; uninstall R and RStudio and all packages, but doesn´t resolve the problem.
Any suggestion?
These are annoying messages that I understand to be emitted by the R garbage collection process. They are not errors in the sense that your code runs and your results are not affected. So you can ignore them.
It looks like this problem has now been solved by making a change in Rcpp, but it will take a couple of months until that is released
But if you can install "terra" from source, the problem will go away if you use the development version of Rcpp
install.packages("Rcpp", repos="https://rcppcore.github.io/drat")
install.packages("terra")
These messages no longer appear if you use the current CRAN version of Rcpp.