Skip to content

Commit

Permalink
Remove last bit of lazyeval
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Feb 17, 2017
1 parent fb1d546 commit 72c5bbf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Depends:
R (>= 3.1.0)
Imports:
assertthat,
lazyeval (>= 0.1.10),
methods,
rlang,
Rcpp (>= 0.12.3),
Expand Down
6 changes: 5 additions & 1 deletion R/dataframe.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ lst <- function(...) {
names(output) <- character(n)

for (i in seq_len(n)) {
res <- lazyeval::lazy_eval(xs[[i]], output)
res <- rlang::tidy_eval(xs[[i]], discard_unnamed(output))
if (!is_null(res)) {
output[[i]] <- res
}
Expand All @@ -91,6 +91,10 @@ lst <- function(...) {
output
}

discard_unnamed <- function(x) {
discard(x, names2(x) == "")
}

#' @export
#' @rdname tibble
lst_ <- function(xs) {
Expand Down
3 changes: 1 addition & 2 deletions tests/testthat/test-data-frame.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ test_that("dim attribute is stripped of 1D array (#84)", {
test_that("bogus columns raise an error", {
expect_error(as_tibble(list(1)), "named")
expect_error(tibble(a = NULL), "1d atomic vector or list")
expect_error(tibble(a = ~a), "1d atomic vector or list")
expect_error(tibble(a = new.env()), "1d atomic vector or list")
expect_error(tibble(a = quote(a)), "1d atomic vector or list")
})
Expand Down Expand Up @@ -54,7 +53,7 @@ test_that("empty input makes 0 x 0 tbl_df", {
})

test_that("SE version", {
expect_identical(tibble_(list(a = ~1:10)), tibble(a = 1:10))
expect_warning(expect_identical(tibble_(list(a = ~1:10)), tibble(a = 1:10)))
})

test_that("names are stripped from vectors", {
Expand Down

0 comments on commit 72c5bbf

Please sign in to comment.