Skip to content
Prev 17749 / 63421 Next

Assigning a zero length vector to a list (PR#8157)

Duncan Murdoch <murdoch at stats.uwo.ca> writes:
Once upon a time, we had pairlists, and NULL was the empty list. This
looks like it might be a relic. If so, it likely also predates
consistent handling of zero-length vectors, so something is getting
confused. I think it would be reasonable to expect similar results to
this:
[[1]]
numeric(0)

 

S-PLUS also tries to handle NULL as a zero length list, with some
anomalies:
$value:
numeric(0)
[[1]]:
numeric(0)