-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Re-document with latest roxygen2 features #310
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
08101b8
Dev roxygen2
hadley 91d37fc
Merged origin/main into dev-roxygen2
hadley 58f2d2a
Remove now-unusued deprecated doc
hadley 0970609
Re-document
hadley e2651e8
Merge commit '9f88e2179fc7aa6ff11214271fd61bba169f925c'
hadley c5683a4
Merged origin/main into dev-roxygen2
hadley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#' @keywords internal | ||
"_PACKAGE" | ||
|
||
## usethis namespace: start | ||
## usethis namespace: end | ||
NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
|
||
# Registered in .onLoad() | ||
|
||
#' @exportS3Method vctrs::vec_ptype2 | ||
vec_ptype2.glue.glue <- function(x, y, ...) { | ||
x | ||
} | ||
#' @exportS3Method vctrs::vec_ptype2 | ||
vec_ptype2.glue.character <- function(x, y, ...) { | ||
x | ||
} | ||
#' @exportS3Method vctrs::vec_ptype2 | ||
vec_ptype2.character.glue <- function(x, y, ...) { | ||
y | ||
} | ||
|
||
# Note order of class is the opposite as for ptype2 | ||
#' @exportS3Method vctrs::vec_cast | ||
vec_cast.glue.glue <- function(x, to, ...) { | ||
x | ||
} | ||
#' @exportS3Method vctrs::vec_cast | ||
vec_cast.glue.character <- function(x, to, ...) { | ||
as_glue(x) | ||
} | ||
#' @exportS3Method vctrs::vec_cast | ||
vec_cast.character.glue <- function(x, to, ...) { | ||
unclass(x) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
glue doesn't (and cannot) depend on testthat, vctrs, waldo, etc. It feels like we're dismantling the conditional and delayed export of these methods and are, instead, assuming that these packages are available.
Am I out of the loop and this is actually OK now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's exactly the point of this form of
S3method()
😄There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upon further research, this is roxygen2 newly taking advantage of a feature that appeared in R 3.6:
https://rstudio.github.io/r-manuals/r-exts/Creating-R-packages.html#registering-s3-methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, really old then 😆