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 components as name1, name2, name3, …
so it should look like this:
$name1
[1] "Fred"
$name2
[1] "Mary"
$name3
[1] "SAM"
Any help will be much appreciated
Joseph
[[alternative HTML version deleted]]
names(L) <- paste("name",1:3,sep="")
cheers,
Rolf Turner
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
______________________________________________
R-h...@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.