Skip to content
Prev 1925 / 12125 Next

[R-pkg-devel] tibbles are not data frames

On Tue, Sep 26, 2017 at 2:30 AM, G?ran Brostr?m <goran.brostrom at umu.se> wrote:
Changing df[, x] to df[[x]] is not very hard and makes your code
easier to understand because it more clearly conveys the intent that
you want a single column.
If it not inherit from data frame, it would be not work with the 99%
of functions that work with data frames and don't deliberately take
advantage of the dropping behaviour of [. In other words, it would be
pointless.

I decided to make [.tibble type-stable (i.e. always return a data
frame) because this behaviour causes substantial problems in real data
analysis code. I did it understanding that it would cause some package
developers frustration, but I think it's better for a handful of
package maintainers to be frustrated than hundreds of users creating
dangerous code.

Hadley

Thread (48 messages)

Göran Broström tibbles are not data frames Sep 26 Stefan McKinnon Høj-Edwards tibbles are not data frames Sep 26 Alexandre Courtiol tibbles are not data frames Sep 26 Göran Broström tibbles are not data frames Sep 26 Joris Meys tibbles are not data frames Sep 26 Stefan McKinnon Høj-Edwards tibbles are not data frames Sep 26 Joris Meys tibbles are not data frames Sep 26 Gábor Csárdi tibbles are not data frames Sep 26 Göran Broström tibbles are not data frames Sep 26 Göran Broström tibbles are not data frames Sep 26 Daniel Lüdecke tibbles are not data frames Sep 26 Gábor Csárdi tibbles are not data frames Sep 26 David Hugh-Jones tibbles are not data frames Sep 26 Stefan McKinnon Høj-Edwards tibbles are not data frames Sep 26 Alexandre Courtiol tibbles are not data frames Sep 26 Joris Meys tibbles are not data frames Sep 26 Thierry Onkelinx tibbles are not data frames Sep 26 Holger Hoefling tibbles are not data frames Sep 26 CJ Yetman tibbles are not data frames Sep 26 Iñaki Ucar tibbles are not data frames Sep 26 Daniel Lüdecke tibbles are not data frames Sep 26 Pedro J. Aphalo tibbles are not data frames Sep 26 Göran Broström tibbles are not data frames Sep 26 Gábor Csárdi tibbles are not data frames Sep 26 Göran Broström tibbles are not data frames Sep 26 Jeroen Ooms tibbles are not data frames Sep 26 Hadley Wickham tibbles are not data frames Sep 26 Joris Meys tibbles are not data frames Sep 26 Hadley Wickham tibbles are not data frames Sep 26 Hadley Wickham tibbles are not data frames Sep 26 Pedro J. Aphalo tibbles are not data frames Sep 26 Hadley Wickham tibbles are not data frames Sep 26 Joris Meys tibbles are not data frames Sep 26 Göran Broström tibbles are not data frames Sep 26 Hadley Wickham tibbles are not data frames Sep 26 Joris Meys tibbles are not data frames Sep 26 Hadley Wickham tibbles are not data frames Sep 26 Jens Oehlschlägel tibbles are not data frames Sep 26 Hadley Wickham tibbles are not data frames Sep 26 John C Nash tibbles are not data frames Sep 26 Dirk Eddelbuettel tibbles are not data frames Sep 26 Duncan Murdoch tibbles are not data frames Sep 26 John C Nash tibbles are not data frames Sep 26 Jim Lemon tibbles are not data frames Sep 26 Jens Oehlschlägel tibbles are not data frames Sep 27 Jens Oehlschlägel tibbles are not data frames Sep 27 Duncan Murdoch tibbles are not data frames Sep 27 Göran Broström Summary: tibbles are not data frames Sep 29