pachadotdev / pachadotdev/tinyroxygen

S3 methods

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.