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

Merged
merged 11 commits into from Jan 21, 2016

Conversation

Projects
None yet
2 participants
@krlmlr
Member

krlmlr commented Oct 9, 2015

  • Helper functions
  • Unified code for data and sysdata
  • Warn if duplicated objects
  • Stop if no objects to save
@@ -399,40 +399,75 @@ use_data <- function(..., pkg = ".", internal = FALSE, overwrite = FALSE,
pkg <- as.package(pkg)
to_save <- dots(...)

This comment has been minimized.

@krlmlr

krlmlr Nov 2, 2015

Member

@hadley: Do you mind if I import lazyeval and implement a corresponding use_data_ function, as in 9d38ccc? The above seems to be the only remaining instance of dots().

This comment has been minimized.

@hadley

hadley Jan 20, 2016

Member

Doesn't seem worth it to me - use_data() is purely for interactive use.

Kirill Müller
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) {

This comment has been minimized.

@hadley

hadley Jan 20, 2016

Member

How about integrating this with check_to_save()?

get_save_info_for_objs <- function(pkg, internal, objs) {

This comment has been minimized.

@hadley

hadley Jan 20, 2016

Member

I'd rather just inline this inside use_data()

@krlmlr

This comment has been minimized.

Member

krlmlr commented Jan 21, 2016

Inlined functions, merged master, added NEWS. I'd rather not rebase, because I have other internal branches based on this.

hadley added a commit that referenced this pull request Jan 21, 2016

Merge pull request #948 from krlmlr/use-data
use_data() improvements

@hadley hadley merged commit b86d258 into r-lib:master Jan 21, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hadley

This comment has been minimized.

Member

hadley commented Jan 21, 2016

Thanks!

@krlmlr krlmlr deleted the krlmlr:use-data branch Oct 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment