-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/0.1-4' into production
- Non-scalar input to `frame_data()` and `tibble()` creates list-valued columns (#7). - `frame_data()` and `tibble()` create empty `data_frame` if no rows are given (#20). - `as_data_frame(NULL)` is 0-row 0-column data frame (#17, @jennybc). - `lst(NULL)` doesn't raise an error anymore (#17, @jennybc), but always uses deparsed expression as name (even for `NULL`). - `trunc_mat()` and `print()` use `width` argument also for zero-row and zero-column data frames (#18).
- Loading branch information
Showing
11 changed files
with
106 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Encoding: UTF-8 | ||
Package: tibble | ||
Type: Package | ||
Version: 0.1-3 | ||
Date: 2016-01-05 | ||
Version: 0.1-4 | ||
Date: 2016-01-07 | ||
Title: Simple data frames | ||
Description: Data frames and data sources in "dplyr" style. | ||
Authors@R: c( person("Hadley", "Wickham", , "[email protected]", role | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
compact <- function(x) Filter(Negate(is.null), x) | ||
|
||
names2 <- function(x) { | ||
names(x) %||% rep("", length(x)) | ||
} | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
context("lst") | ||
|
||
test_that("lst handles named and unnamed NULL arguments", { | ||
expect_equivalent(lst(NULL), list("NULL" = NULL)) | ||
expect_identical(lst(a = NULL), list(a = NULL)) | ||
expect_identical(lst(NULL, b = NULL, 1:3), | ||
list("NULL" = NULL, b = NULL, "1:3" = 1:3)) | ||
}) | ||
|
||
test_that("lst handles internal references", { | ||
expect_identical(lst(a = 1, b = a), list(a = 1, b = 1)) | ||
expect_identical(lst(a = NULL, b = a), list(a = NULL, b = NULL)) | ||
}) |
This file contains 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
This file contains 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