title: Handling "as" in R package builds
body: <p>Is there a standard convention for handling <code>as()</code> coercion in package builds that is CRAN compliant? What I am wanting to do is have an if statement <code>if(any(class(x) == "sf")) { x &lt;- as(x, "Spatial") }</code> that will allow and coerce sf class objects that are passed to a function that uses sp classes. I do not really want to import the entire sf library but also cannot use sf::as() because it is not exported from the namespace so, how to I deal with importing this coercion method without importing the package?</p>