Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

properly document non-function object #714

Closed
clarkliming opened this issue Dec 14, 2023 · 3 comments
Closed

properly document non-function object #714

clarkliming opened this issue Dec 14, 2023 · 3 comments

Comments

@clarkliming
Copy link
Contributor

currently chevron_tlg objects are documented as objects, and the corresponding pre,main functions are documented in the same Rd file.

CRAN requires for function value should be included in documentation, but for objects it do not have that slot.

survival::survreg.distributions and emmeans::emm_defaults do not have value in docs, but our case is a bit more complicated as other functions are also inside this doc.

any idea of how we should properly document these objects?

@clarkliming
Copy link
Contributor Author

PS: a simple function to find the non-function and non-data frame objs. just no good place to store this code

find_non_function_obj <- function(x) {
  library(package = x, character.only = TRUE)
  nmsp <- sprintf("package:%s", x)
  objs <- ls(pos = nmsp)
  objs <- setNames(objs, objs)
  obj <- lapply(objs, function(s) {get(s, nmsp)})
  non_fun <- Filter(function(s) {!is.function(s) && !is.data.frame(s)}, obj)
  non_fun
}
find_non_function_obj("emmeans")

@BFalquet
Copy link
Contributor

@BFalquet
Copy link
Contributor

The package has been accepted on CRAN and doesn't require anymore a change in the way objects are documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants