Re: [R] naming the components of a list

2008-05-25 Thread Rolf Turner
On 26/05/2008, at 7:54 AM, joseph wrote: Hi I have a character vector with thousands of names which looks like this: V=c("Fred", "Mary", "SAM") V [1] "Fred" "Mary" "SAM" class(V) [1] "character" I would like to change it to a list: L=as.list(V) L [[1]] [1] "Fred" [[2]] [1] "Mary" [[3]]

[R] naming the components of a list

2008-05-25 Thread joseph
Hi I have a character vector with thousands of names which looks like this: > V=c("Fred", "Mary", "SAM") > V [1] "Fred" "Mary" "SAM" > class(V) [1] "character" I would like to change it to a list: > L=as.list(V) > L [[1]] [1] "Fred" [[2]] [1] "Mary" [[3]] [1] "SAM" but I need to name the compone