From 3a3249ec08795769808072395943394ba7394b69 Mon Sep 17 00:00:00 2001 From: hadley Date: Fri, 17 Jun 2016 16:42:04 -0500 Subject: [PATCH] Support dev tibble Which throws error when subsetting with NULL --- NEWS.md | 2 ++ R/rows.R | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index d6d08251..53e8e477 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # purrr 0.2.1.9000 +* Fix for dev tibble support. + * `as_function()` now supports list arguments which allow recursive indexing using either names or positions. They now always stop when encountering the first NULL (#173). diff --git a/R/rows.R b/R/rows.R index 234e0bcc..e1174b50 100644 --- a/R/rows.R +++ b/R/rows.R @@ -100,7 +100,7 @@ set_sliced_env <- function(df, labels, collate, to, env, x_name) { env$.collate <- collate env$.to <- to env$.labels_cols <- attr(df, "labels") - env$.slicing_cols <- df[names(env$.labels_cols)] + env$.slicing_cols <- df[names(env$.labels_cols) %||% character(0)] indices <- attr(df, "indices") env[[x_name]] <- df[!names(df) %in% names(env$.labels_cols)]