-
Notifications
You must be signed in to change notification settings - Fork 761
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
use_data() improvements #948
Conversation
krlmlr
commented
Oct 9, 2015
- Helper functions
- Unified code for data and sysdata
- Warn if duplicated objects
- Stop if no objects to save
- rename get_paths_for_objs() to get_save_info_for_objs() - also return dir_name
@@ -399,40 +399,75 @@ use_data <- function(..., pkg = ".", internal = FALSE, overwrite = FALSE, | |||
pkg <- as.package(pkg) | |||
|
|||
to_save <- dots(...) |
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.
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.
Doesn't seem worth it to me - use_data()
is purely for interactive use.
is_name <- vapply(to_save, is.symbol, logical(1)) | ||
if (any(!is_name)) { | ||
stop("Can only save existing named objects", call. = FALSE) | ||
} | ||
} | ||
|
||
get_objs_from_to_save <- function(to_save) { |
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.
How about integrating this with check_to_save()
?
Inlined functions, merged master, added NEWS. I'd rather not rebase, because I have other internal branches based on this. |
Thanks! |