Maybe something along the following lines? m <- rep(list(rnorm(10)),3) # dummy data
data <- c() for (a in 1:length(m)) { data[a] <- m[[a]][1] } Muhammad On Tue, Oct 16, 2012 at 1:17 PM, Balqis <aehan3...@gmail.com> wrote: > Hi all, > > I have a list of 20000 data, and the list look like below. I wonder what is > the simplest way to extract 'kappa' value (or 'xi' or 'alpha' for the > matter) from each of the data. How can I simply code it without having to > change the list to a dataframe first? Many thanks! > > > $X19997 > xi alpha kappa > 784.7718640 165.4065141 -0.2709599 > > $X19998 > xi alpha kappa > 860.7832604 215.1144980 -0.1769741 > > $X19999 > xi alpha kappa > 839.7692675 196.0103874 -0.3848809 > > $X20000 > xi alpha kappa > 847.6117040 212.3279185 -0.2576029 > > regards, > aehan > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. > -- Muhammad Rahiz (za) +27 071 719 0104 (skype) muhammad.rahiz [[alternative HTML version deleted]] ______________________________________________ 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.