r-spatial / sf

Simple Features for R
https://r-spatial.github.io/sf/
Other
1.35k stars 299 forks source link

New approach to register tidyverse S3 class #2341

Closed olivroy closed 8 months ago

olivroy commented 9 months ago

Use new way to register S3 methods with usethis::use_standalone("r-lib/rlang", "s3-register"). https://r-pkgs.org/dependencies-in-practice.html#imports-and-exports-related-to-s3

~I also removed some S3 methods from docs, for which it is not very necessary. format(), is.na(), or print methods as they are obvious.~

As you see in the preview, the man page looks cleaner! (no more .sf suffix) image

olivroy commented 9 months ago

Works now. sf suggests dplyr 1.0, which is 4 years old. I think this is fine. here is a switch that was made recently https://github.com/r-lib/bench/commit/4dbd656e2ede2c8195f5b269e53e870cf8102e41#diff-fbc888a8d95ca11d7f17e5eaa27a08a3d3cb183803ae509deea6aa51f61183fb

olivroy commented 8 months ago

I reverted unrelated changes and just included the S3 register refactor!