[R] Appending Data to A n Existing List...
Bert Gunter
gunter.berton at gene.com
Fri Feb 19 00:37:09 CET 2010
?c
but you have to make sure z is a list:
c(pts,z) ## probably is not what you want
c(pts,list(z)) ## probably is, but z will be unnamed
c(pts,list(z=z) ## names z "z"
Cheers,
Bert Gunter
Genentech Nonclinical Biostatistics
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Jason Rupert
Sent: Thursday, February 18, 2010 3:16 PM
To: R-help at r-project.org
Subject: [R] Appending Data to A n Existing List...
What steps can be take to append data to a list?
Suppose I have the following list and want to append a z axist to the list?
pts <- list(x=cars[,1], y=cars[,2])
z<-rnorm(max(dim(cars)))
How would I go about appending z to an existing list?
Thanks a ton...
______________________________________________
R-help at 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.
More information about the R-help
mailing list