[R-pkg-devel] tibbles are not data frames
alexandre.courtiol at gmail.com
Tue Sep 26 11:02:30 CEST 2017
I could not agree more with Göran and we had to change code in our packages
because if this too. I also see students often facing bugs because of it.
Again, with all the respect I have for Hadley.
On 26 Sep 2017 9:32 a.m., "Göran Broström" <goran.brostrom at umu.se> wrote:
I am beginning to get complaints from users of my CRAN packages (especially
'eha') to the effect that they get error messages like "Error: Unsupported
use of matrix or array for column indexing".
It turns out that they are sticking in tibbles into functions that expect
data frames as input. And I am using the kind of subsetting that Hadley
dislikes (eha is an old package, much older than tibbles). It is of course
a simple matter to change the code so it handles both data frames and
tibbles correctly, but this affects many functions, and it will take some
time. And when the next guy introduces 'troubles' as an improvement of
'tibbles', I will have to rewrite the code again.
While I like Hadley's way of doing it, I think it is a mistake to let a
tibble also be of class data frame. To me it is a matter of inheritance and
backwards compability: A tibble should add nice things to a data frame, not
change basic behaviour, in order to call itself a data frame.
Is it correct to let a tibble be of class "data.frame"?
R-package-devel at r-project.org mailing list
[[alternative HTML version deleted]]
More information about the R-package-devel