Bug/unhelpful error message when rbinding data frames containing data frame columns

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Bug/unhelpful error message when rbinding data frames containing data frame columns

Ant F
Dear rdevel,

See the example below :

x <- data.frame(a=1)
x$b <- data.frame(z=1)
y <- x
rbind(x,y)
# Error in `.rowNamesDF<-`(x, value = value) :
#   duplicate 'row.names' are not allowed
# In addition: Warning message:
#   non-unique value when setting 'row.names': ‘1’

I believe, that either it is a bug, and the data frame columns should be
rbind-ed themselves, or
an error should explicitly state that we can't use rbind on data frames
containing data frame columns (and it should be documented).

Thanks and happy 2020!

Antoine

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel