Skip to content
Prev 317748 / 398506 Next

Select components of a list

Sorry, I just noticed that in the first line of the solution 'l' got stripped off, it should be read as 'lapply` instead of 'apply`.

lapply(1:length(models),function(i) lapply(models[[i]],function(x) summary(x)$p.table[2,]))[[1]] #1st list component
Thanks,

A.K.
Message-ID: <1361114786.9002.YahooMailNeo@web142601.mail.bf1.yahoo.com>
In-Reply-To: <CAFqDh9+aMFvdgk_Nomr4TYDFbF64U_F-cqjLSjVKvMRwe9Fttg@mail.gmail.com>