You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plot() S3 generic function is now in package base rather than package graphics, as it is reasonable to have methods that do not use the graphics package. The generic is currently re-exported from the graphics namespace to allow packages importing it from there to continue working, but this may change in future.
Packages which define S4 generics for plot() should be re-installed and package code using such generics from other packages needs to ensure that they are imported rather than rely on their being looked for on the search path (as in a namespace, the base namespace has precedence over the search path).
This led to me being contacted by a user who has a local package that stopped working in R 4, because inside his package which depended on maptools, which depends on sp (but his package didn't depend on sp), in R<4, plot() from sp was found in the search path, but in R4, baseplot() was found. I advised adding sp:: to the plot call to disambiguate (this worked), or doing NAMESPACE properly (I didn't try).
A side note: should we consider importing plot from base in sp rather than graphics in R>=4?
The text was updated successfully, but these errors were encountered:
R 4.0.0 News says (https://cran.r-project.org/doc/manuals/r-release/NEWS.html):
This led to me being contacted by a user who has a local package that stopped working in R 4, because inside his package which depended on maptools, which depends on sp (but his package didn't depend on sp), in R<4,
plot()
from sp was found in the search path, but in R4, baseplot()
was found. I advised addingsp::
to the plot call to disambiguate (this worked), or doing NAMESPACE properly (I didn't try).A side note: should we consider importing plot from base in sp rather than graphics in R>=4?
The text was updated successfully, but these errors were encountered: