Dear all,I have a R structure that was created with replicate.The data sets looks to be a matrix with each cell being a list. str(error_suburban_0[,1],max.level=1) List of 4 $ vaR :List of 20 ..- attr(*, "class")= chr "variogram" $ Shadowing:List of 2 ..- attr(*, "class")= chr "geodata" $ FIT :List of 1 $ propmodel:List of 12 ..- attr(*, "class")= chr "lm"
The error_suburban is a matrix that each field so error_suburban_0[,1], error_suburban_0[,2], error_suburban_0[,3], error_suburban_0[,4],... and so on, contains the four sublists $ vaR :List of 20 ..- attr(*, "class")= chr "variogram" $ Shadowing:List of 2 ..- attr(*, "class")= chr "geodata" $ FIT :List of 1 $ propmodel:List of 12 ..- attr(*, "class")= chr "lm" I would like to pick for each of these matrix elements to collect only the $Shadowing sublist error_suburban_0[,1], error_suburban_0[,2], error_suburban_0[,3], error_suburban_0[,4]... and so on Right now I am implementing this by a for loop that access each matrix element sequentially. Can you please advice me if there is a better approach to do that in R? Regards Alex [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.