Skip to content
Prev 1902 / 12125 Next

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

Thanks for the examples. Personally, I have been struck out multiple times
by data frames dropping dimensions, so I have a distaste for this dropping
behaviour.

Personally, I prefer data frame *not* to drop dimensions. They are not
arrays, where slicing drops a dimension makes sense because all entries are
same data type.
You can pull out a column in vector form from both tribbles and data frame
with the $ index; subsetting a row from a data frame and forcing it into an
atomic vector will require cast all columns to lowest common denominator,
often character.

So I would argue that yes, tribbles are data.frame with extra bells and
whistles, even if I do not understand the use of list columns.

I suggest a defensive coding technique; if you need a data frame subset to
really be a vector, cast it as a vector. Users *will* attempt to throw
unexpected structures at your methods. When your methods fails in
mysterious ways because it didn't extract a vector, users will be
stupefied. Fail at `as.vector` will indicate why.

Kindly,
Stefan

Stefan McKinnon H?j-Edwards
ph.d. Genetics
+44 (0)776 231 2464
+45 2888 6598
Skype: stefan_edwards

2017-09-26 10:05 GMT+01:00 Joris Meys <Joris.Meys at ugent.be>:

  
  

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