On Fri, Feb 17, 2012 at 3:37 PM, Ajay Askoolum <aa2e...@yahoo.co.uk> wrote: > Hi Sarah, > > Thanks you for the clarifications; I had worked round the > problem by switching to a data.frame. > > However, I am still unclear about 'list': as it exists, it must > have a purpose. When is the use of the list data structure appropriate?
I gave one example: storing lm() objects. Here's another: I'm doing a lot of spatial processing, and I read a single multispectral image into a list. Each list component is a SpatialGridDataFrame. That way each band from a single image is part of the same R object, and I can use lapply() to perform an operation on each band in turn. Using lists for things is a very Rish way of working, but it may take a while to get the hang of it. -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ 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.