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

Move as.data.frame to separate function page and deprecate parameter "quantities" #364

Closed
4 tasks done
peterdesmet opened this issue Apr 19, 2020 · 4 comments
Closed
4 tasks done
Assignees
Milestone

Comments

@peterdesmet
Copy link
Collaborator

peterdesmet commented Apr 19, 2020

Currently this function is listed on vp.R and vpts.R, with duplicate documentation.

  • Move to separate page
  • Join documentation
  • Markdown documentation
  • Deprecated quantities
@peterdesmet peterdesmet added this to the 0.6.0 milestone Apr 19, 2020
@peterdesmet peterdesmet self-assigned this Apr 19, 2020
@peterdesmet
Copy link
Collaborator Author

Tackle this after or with #356

@peterdesmet
Copy link
Collaborator Author

I've started with this on https://github.com/adokter/bioRad/tree/as.data.frame, but it is unclear to how I should bundle as.data.frame.vp and as.data.frame.vpts in one page without creating a:

as.data.frame <- function(x, row.names = NULL, optional = FALSE,
                          quantities = names(x$data), suntime = TRUE,
                          geo = TRUE, elev = -0.268, lat = NULL,
                          lon = NULL, ...) {
  UseMethod("as.data.frame", x)
}

(similar to rcs()) which then masks as.data.frame from base on bioRad install. @adokter any suggestions?

@peterdesmet peterdesmet changed the title Move as.data.frame to separate function page Move as.data.frame to separate function page and deprecate parameter "quantities" May 1, 2020
@adokter
Copy link
Owner

adokter commented May 1, 2020

Indeed I believe you should only define the S3 method, because as.data.frame method dispatch is already defined in base R.

But you can document both in the same same page, for example by adding @rdname as.data.frame.vp in the roxygen header of as.data.frame.vpts(), and only document as.data.frame.vp().

This is an example of a S3 as.data.frame method of a different ropensci package:

https://github.com/ropensci/git2r/blob/1206ea384132f6e1503da1667f129e1bbf90c0e6/R/repository.R#L17-L81

@peterdesmet
Copy link
Collaborator Author

Ok, great! Will try to adapt.

@peterdesmet peterdesmet modified the milestones: 0.6.0, 0.5.2 May 11, 2020
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