If the list is simple enough, then you probably want the "unlist" function, otherwise you will probably need to use the "sapply" function to grab and/or process the important pieces in each list element.
-- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of jiliguala > Sent: Tuesday, June 14, 2011 4:24 PM > To: r-help@r-project.org > Subject: Re: [R] automatically generate the output name of my "for" > loops > > > thanks, Greg Snow-2. > > here i hav a question, how can i save the value of a list to a vector > or a > matrix? say, > i have a list (data1) and a vector or a matrix (data2). > > if i made like this, > > data2 <- as.vector(data1) > > it does not change anything, the data2 is still a list. > > what i want to do is to creat a vector or a matrix to save the value of > the > list. > > thanks for helping > > daniel > > > -- > View this message in context: > http://r.789695.n4.nabble.com/automatically-generate-the-output-name- > of-my-for-loops-tp3592160p3598027.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@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. ______________________________________________ R-help@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.