rstudio/rmarkdown-cookbook

Use `.S3method()` rather than `registerS3method()`

Opened this issue · 0 comments

fkohrt commented

The cookbook currently encourages the use of registerS3method(). The documentation at help("registerS3method", "base") says, however, that it is “not intended to be called directly”. As an alternative, the method .S3method() can be used (see also Kurt Hornik: S3 Method Lookup).

registerS3method(
"knit_print", "data.frame", knit_print.data.frame,
envir = asNamespace("knitr")
)

See also #186