-
Notifications
You must be signed in to change notification settings - Fork 129
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 alternative variant for list columns in frame_data() #32
Conversation
Cherry-picked from tidyverse/dplyr@25e95da83.
Cherry-picked from tidyverse/dplyr@25e95da83.
Tests now pass (after adb9400). You decide. |
Current coverage is
|
frame_mat <- matrix(frame_rest, ncol = frame_ncol, byrow = TRUE) | ||
frame_col <- lapply(seq_len(ncol(frame_mat)), function(i) { | ||
col <- frame_mat[, i] | ||
if (any(vapply(col, function(x) is.list(x) || length(x) != 1L, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about pulling this out into is_atomic_scalar()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extracted needs_list_col()
(8ed51d8).
- `frame_data()` now also creates a list column if one of the entries is a list (#32).
- `frame_data()` now also creates a list column if one of the entries is a list (#32). - New `rownames_to_column()` and `column_to_rownames()` functions, replace `add_rownames()` (#11, @zhilongjia).
- Features - New `as_data_frame.table()` with argument `n` to control name of count column (#22, #23). - New function `repair_names()` fixes missing and duplicate names (#10, #15, @r2evans). - `frame_data()` now also creates a list column if one of the entries is a list (#32). - New `rownames_to_column()` and `column_to_rownames()` functions, replace `add_rownames()` (#11, @zhilongjia). - Use `tibble` prefix for options (#13, #36). - Documentation - Add pre-tibble NEWS (#39, #40). - Include vignette (#38). - Expand README. - Fix typos in documentation. - Remove use of `src()` from examples. - Prepare CRAN release - Use new-style `.travis.yml` - Use AppVeyor for testing. - Finer coverage analysis (#37). - Check with win-builder and valgrind. - Fix NOTE from `R CMD check`.
@hadley: This is your implementation, but it fails one of the existing tests. I have an alternative, longer implementation, which passes everything.