Skip to content
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

bind_list if no names add names #7

Closed
trinker opened this issue Jan 27, 2017 · 0 comments
Closed

bind_list if no names add names #7

trinker opened this issue Jan 27, 2017 · 0 comments

Comments

@trinker
Copy link
Owner

trinker commented Jan 27, 2017

Basically a step of setNames(1:length(.)) is needed:

(vs_change <- change_index(mtcars[["vs"]]))
split_index(mtcars, vs_change) %>%
#setNames(1:length(.))%>%
    tidy_list()

## > split_index(mtcars, vs_change) %>%
## + #setNames(1:length(.))%>%
## +     tidy_list()
## Error in data.frame(list.names, do.call(rbind, x), row.names = NULL, check.names = FALSE,  : 
##   arguments imply differing number of rows: 0, 32


(vs_change <- change_index(mtcars[["vs"]]))
split_index(mtcars, vs_change) %>%
setNames(1:length(.))%>%
    tidy_list()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant