Skip to content

interesting feature

1 message · Liaw, Andy

#
I give it a shot...
rownames for data.frame need not be 1, 2, ..., and we need something that's
going to work regardless.
This one seems curious to me.  Trying to access non-existing column result
in error:
Error in "[.data.frame"(d, 1, 11) : undefined columns selected

OTOH, try:
[1] 11  2
Error in data.frame(x = c(" 1", "10", "14", "NA", "NA", "NA", "NA", "NA",  :

        duplicate row.names: 11

so that destroys the integrity of the data frame!
I believe the rationale is explained in ?make.unique (which
rbind.data.frame() calls to create the rownames).
 
HTH,
Andy
------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments,...{{dropped}}