On Sat, Jun 16, 2012 at 06:14:38PM +0100, Onur Uncu wrote: > Thank you. But isn't a data frame already a list?
Data frame is a list of columns. The suggestion was to use a list, whose length is the number of rows and which contains a matrix for each row. > What is wrong with > adding a column to the existing data frame (a column with the > mortality curve matrices)? The elements of a data frame cannot be matrices. If the matrices may be unfolded to vectors, then these vectors can be included into the rows. Something like Gender Age x1 x2 x3 y1 y2 y3 M 70 ... F 65 ... M 70 ... where ... represent six numbers in each row, which form a matrix x1 y1 x2 y2 x3 y3 However, i think, a list of matrices is more flexible. Petr Savicky. ______________________________________________ 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.