Hi,
if sf is not loaded, subsetting an sf object with square brackets loses the sf class in the geometry column:
sfobj[somerows,]
For usage in a package, I do not want to call library(sf) first.
[ is an S3 method in sf:
https://github.com/r-spatial/sf/blob/master/NAMESPACE#L6https://github.com/r-spatial/sf/blob/master/R/sf.R#L299
In my package (with an sf object from osmplotr), using
sf:::"[.sf"(obj, somerows, allcolumns)
works fine, but of course Rcmd check complains about the Unexported object imported by a ':::' call.
How can I use the sf [ method without completely loading sf?
(and also without depending on dplyr::select)
I guess I'm missing some really clever method import.
Can someone point me in the right direction?
Thanks ahead,
Berry