Skip to content
Prev 563 / 63424 Next

R-alpha: ?bug in [.data.frame

Thomas Lumley <thomas@biostat.washington.edu> writes:
This is a generic list thing. Nothing keeps you from having several
elements with the same name, you just get certain problems accessing
them.
$a
[1] 1

$b
[1] 2

$b
[1] 3
[1] 2

I rather strongly suspect that coding for the possibility, that in a
list of vectors l$b could mean another list, would be a real pain.
I.e. you deserve what you get...

If you must have identically named columns, try something along the
lines of
$b
[1] 2

$b
[1] 3
$a
[1] 1

$b
[1] 4

$b
[1] 4