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

'rbind', 'cbind' not detected as S3 generics for export tag #488

Closed
kevinushey opened this issue Jul 14, 2016 · 1 comment
Closed

'rbind', 'cbind' not detected as S3 generics for export tag #488

kevinushey opened this issue Jul 14, 2016 · 1 comment

Comments

@kevinushey
Copy link
Contributor

E.g.

#' @export
rbind.foobar <- function(..., deparse.level = 1) {
  print("hello")
}

roxygen2 doesn't detect that rbind is an S3 generic, and so emits export(rbind.foobar) rather than S3method(rbind,foobar).

@kevinushey
Copy link
Contributor Author

This occurs because roxygen2:::is_s3_generic hides its S3 method check in is.primitive, but rbind is an internal function, not a primitive:

https://github.com/klutometis/roxygen/blob/master/R/s3.R#L22-L26

I think that bit needs to accept both primitive functions and 'internal' functions (perhaps some special casing is needed for rbind, cbind?)

kevinushey added a commit to kevinushey/roxygen that referenced this issue Jul 14, 2016
kevinushey added a commit to kevinushey/roxygen that referenced this issue Jul 14, 2016
kevinushey added a commit to kevinushey/roxygen that referenced this issue Aug 29, 2016
@hadley hadley closed this as completed in 7ac80d8 Aug 29, 2016
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

1 participant