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

ungroup() strips off tbl_df class of a rowwise_df #936

Closed
davechilders opened this issue Jan 30, 2015 · 1 comment
Closed

ungroup() strips off tbl_df class of a rowwise_df #936

davechilders opened this issue Jan 30, 2015 · 1 comment
Assignees
Milestone

Comments

@davechilders
Copy link

@davechilders davechilders commented Jan 30, 2015

This chain returns the class I would expect:

> tbl_df(mtcars) %>% rowwise %>% class
## [1] "rowwise_df" "tbl_df"     "data.frame"

However, if we add ungroup(), the tbl_df class is stripped off:

> tbl_df(mtcars) %>% rowwise %>% ungroup %>% class
## [1] "data.frame"

Is "data.frame" the expected result here?

Note that tbl_df and tbl are preserved when ungroup() is applied to a grouped_df

> tbl_df(mtcars) %>% group_by(cyl) %>% ungroup %>% class
## [1] "tbl_df"     "tbl"        "data.frame"

> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] dplyr_0.4.1

loaded via a namespace (and not attached):
[1] assertthat_0.1 DBI_0.3.1      magrittr_1.0.1 parallel_3.1.2 Rcpp_0.11.3    tools_3.1.2   
@eibanez
Copy link
Contributor

@eibanez eibanez commented Feb 9, 2015

I proposed an update to solve this in #553

@hadley hadley added this to the 0.5 milestone May 19, 2015
@romainfrancois romainfrancois self-assigned this Aug 16, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jun 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants