Skip to content
Prev 10255 / 20628 Next

MCMCglmm models stored as elements in a list

Hi,
You should not combine your objects with the c() function since this  
removes the model class from the objects. A list containing the three  
models can be created with the following command:

r <- list(m1, m2, m3)

Once you have this list, you can apply a function to all of its  
elements with lapply():

lapply(r, summary)

You can also select a single list element by its index:

summary(r[[1]])

Best,

Sven