-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: 'aggregate' is not an exported object from 'namespace:sp #43
Comments
It is exported as an S3 generic for |
Hi, thanks for the reply, and thanks for the bit stupid question. There were a lot of old questions about this on various forums, so I thought to bring it here. What you write makes sense and works. I just moved sp from Imports to Dependencies, and unlike with other functions imported the whole sp package. I also added methods to imports, because the handling of S3 methods is in fact a package that is part of the basic R infrastructure. Thanks. |
Good to hear that it works. It shouldn't be needed to have sp in Depends: if you only need to use this in your package. |
This issue is a little bit tricky because the disaggregate method is exported but the aggregate method does not. So, someone can use sp::disaggregate() but can't use sp::aggregate(). |
I am trying to use sp in a package and would need to refer to the aggregate function. However, I get this error, that had been around on various forums.
cnames <- sp::aggregate(cbind(long, lat) ~ id, data=final.plot, FUN=function(x) mean(range(x)))
I am getting
Error: 'aggregate' is not an exported object from 'namespace:sp'
In this case no packages are reloaded (no raster) so there is no name conflict. How can I refer to aggregate?
The text was updated successfully, but these errors were encountered: