On Feb 18, 2010, at 6:15 PM, Jason Rupert wrote:
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?
"Appending" is a bit vague, but why not:
pts$z <- z # waht I think you meant
? or
pts[[3]] <- z # not exactly the same and probably not what you wanted
--
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
______________________________________________
[email protected] 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.