sf Package installs but doesn't load.

Please help!!!
I can install the sf package, but whenever I try to load the package, it returns the following error:

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/sf_1.0-4.zip'
Content type 'application/zip' length 42008733 bytes (40.1 MB)
downloaded 40.1 MB

package ‘sf’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in

Error: package or namespace load failed for ‘sf’:
.onLoad failed in loadNamespace() for 'units', details:
call: udunits_init(path)
error: function 'Rcpp_precious_remove' not provided by package 'Rcpp'
In addition: Warning message:
package ‘sf’ was built under R version 4.1.2

What can I do in this respect? Please help!!!

Is Rcpp installed? You could install/reinstall that, then restart and try again.

1 Like

Thanks a lot. Reinstalling Rcpp did the trick. It was installed already, but dont know why wasnt working/responding. I reinstalled it as u said and now the sf package is loading smoothly. Thanks again.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.