-
Notifications
You must be signed in to change notification settings - Fork 131
tibble() and zero-row data frames #20
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
Comments
- 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).
- 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).
- Functions related to `tbl` and `src` stay in `dplyr` (#26). Remove unused `make_tbl()`. - Non-scalar input to `frame_data()` and `tibble()` (including lists) creates list-valued columns (#7). - Use C++ implementation for `as_data_frame.matrix()` (#14). Also add former `matrixToDataFrame()` tests, and fix unwanted conversion to factor. - `as_data_frame(NULL)` is 0-row 0-column data frame (#17, @jennybc). `frame_data()` and `tibble()` create empty `data_frame` if no rows are given (#20). - `data_frame(NULL)` raises error "must be a 1d atomic vector or list". - `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). - `glimpse()` now (invisibly) returns `x`, so it can be used within a chain of `dplyr` verbs (@edwindj). - `base::getElement()` now works with tibbles (#9). - Remove spurious usage of "dplyr" in documentation (#3). - Almost full test coverage.
A regression in v1.1? > tibble(~a, ~b)
# Error: Each variable must be a 1d atomic vector or list.
# Problem variables: '~a', '~b' Is this desired behaviour? I am trying to understand the following: > tibble(a = numeric(), b = character())
# A tibble: 0 x 2
# ... with 2 variables: a <dbl>, b <chr> But > tibble(a = NULL, b = NULL)
# Error: Each variable must be a 1d atomic vector or list.
# Problem variables: 'a', 'b' Related to: imanuelcostigan/RSQLServer#73 |
To be clear, running these two equivalent calls (in SQL space) result in two different outcomes: DBI:
dplyr:
I'm trying to work out what I should expect from upstream dependencies. |
Pinging @krlmlr. Should I open a new ticket? |
I think this is intended, but please open a new ticket. What type should the new NULL columns have? Also, tibble() is the same as data_frame() now, but was an alias for frame_data() in 1.0. |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary. |
This should probably return an empty data frame.
CC @kevinushey
The text was updated successfully, but these errors were encountered: