pachadotdev / pachadotdev/tinyroxygen
S3 methods
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
I'm not able to get S3 methods documented correctly.
Here's a small example. I'd expect the following to create an Rd for the generic only
#' A generic function
#'
#' This is a generic function.
#'
#' @param x An input.
#' @returns An output.
#' @export
my_func <- function(x) {
UseMethod("my_func")
}
#' @export
my_func.default <- function(x) x
and add the following to NAMESPACE
S3method(my_func,default)
export(my_func)
Instead, Rds are made for both the generic and the method, and NAMESPACE looks like so
export(my_func)
export(my_func.default)
Setup
- Ubuntu 24.04
- R 4.6.1
- tinyroxygen build from https://github.com/pachadotdev/tinyroxygen/commit/720bf0ec7a909c4fbf5d337cb34a9c196e4418d7
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied S3 generic and default-method example with tinyroxygen at the referenced commit, then trace how S3 methods are documented and exported. Done means only the generic gets an Rd file, while NAMESPACE contains export(my_func) and S3method(my_func,default).
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100