Last active
May 18, 2022 07:36
-
-
Save jsta/3fabde8c4a57bbe86aae1a41280d8674 to your computer and use it in GitHub Desktop.
Import from datasets package
This file contains hidden or 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
#' datasets.test | |
#' @importFrom datasets co2 | |
#' @export | |
ds_test <- function(x){ | |
datasets::co2[x] | |
} |
This file contains hidden or 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
Package: datasets.test | |
Title: What the Package Does (one line, title case) | |
Version: 0.0.0.9000 | |
Authors@R: c(person("Joseph", "Stachelek", email = "[email protected]", role = c("aut", "cre"))) | |
Description: What the package does (one paragraph). | |
Depends: | |
R (>= 3.3.3) | |
Imports: | |
datasets | |
License: GPL (>= 2) | |
Encoding: UTF-8 | |
LazyData: true | |
RoxygenNote: 5.0.1 |
Had the same problem. What worked for me:
- Delete the line "#' @importFrom datasets co2"
- No entry "datasets" in the "Imports" list
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you ever get an answer on this? I'm having the same issue.
Undefined global functions or variables:
state.abb state.name
Consider adding
importFrom("datasets", "state.abb", "state.name")
to your NAMESPACE file.