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

jussi.jousimo@ktl.fi jussi.jousimo at ktl.fi
Mon Sep 26 13:34:23 CEST 2005


Full_Name: Jussi Jousimo
Version: 2.2.0 beta
OS: Windows XP
Submission from: (NULL) (193.167.195.60)


I'm trying to assign a zero length vector to a list:

x<-numeric()
length(x)
foo<-list()
foo$bar[[1]]<-x
length(foo$bar[[1]])
foo

But in the list this vector turns out to be length one with random content.
x<-character() makes R to crash.



More information about the R-devel mailing list