GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
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
tibble::tibble(a = 1:3, b = 4:6)[1,, drop = TRUE]
#>  1
#>  4
Created on 2018-07-30 by the reprex package (v0.2.0).
What's the expected behavior here? Is tibble not supposed to work like data.frame in this regard?
> data.frame(a = 1:3, b = 4:6)[1,, drop = TRUE]
Thanks, in this case we just keep the data frame behavior (but add a comment to the surprising section in the code).
I'm not sure how we got to this place - I strongly believe that [ should only ever return a data frame, and this list special case is a bad idea.
Looks like we reimplemented the behavior of "[.data.frame"() by accident. More than happy to change this.