Replace “S3 method for default”?
I noticed that the latest pkgdown shows “S3 method for default” in Usage for any foo.default() function, e.g. as_tibble.default:
https://tibble.tidyverse.org/reference/as_tibble.html
# S3 method for table
as_tibble(x, `_n` = "n", ..., n = `_n`, .name_repair = "check_unique")
# S3 method for `NULL`
as_tibble(x, ...)
# S3 method for default
as_tibble(x, ...)
The R documentation (at least R4) says “S3 method for class ‘bar’” and for the default function “Default S3 method”, e.g.:
https://stat.ethz.ch/R-manual/R-devel/library/base/html/format.html
## Default S3 method:
format(x, trim = FALSE, digits = NULL, nsmall = 0L,
justify = c("left", "right", "centre", "none"),
width = NULL, na.encode = TRUE, scientific = NA,
big.mark = "", big.interval = 3L,
small.mark = "", small.interval = 5L,
decimal.mark = getOption("OutDec"),
zero.print = NULL, drop0trailing = FALSE, ...)
## S3 method for class 'data.frame'
format(x, ..., justify = "none")
Small thing of course, but “S3 method for default” does not sound very natural and is now different from the current R documentation.
I rather like the R4 way. What do you think?
For reference this is where this behavior is defined https://github.com/r-lib/pkgdown/blob/956f076f661eb2de9413f64ea24a580cf444466d/R/rd-html.R#L204
Ah great. Shall I do a PR?
I think it'd be a good idea to open a small PR but I'm not the maintainer :smile_cat:
I'll do it and then we'll see what happens 😄
This is now continued in the PR, this one can be closed.
Note that because of the keyword in your PR's first comment, merging the PR would have closed this issue.
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
Yeah, saw that a couple of seconds later 😅