[R] Creating a list by just using start and final component
Holger.steinmetz at web.de
Sun May 24 12:01:07 CEST 2009
Wow, thank you so much!
Where can I learn such creative approaches?
Romain Francois-2 wrote:
> Hollix wrote:
>> Hi there,
>> say, I have 100 matrices (m1,m2,...,m100) which I want to combine in a
>> The list, thus, shall contain the matrices as components.
>> Is it necessary to mention all 100 matrices in the list() command? I
>> like to use just the first and last matrix or something similar.
> you can do something like that:
> matrices <- ls( pattern = "m[0-9]+" )
> res <- lapply( matrices, get )
> Romain Francois
> Independent R Consultant
> +33(0) 6 28 91 30 30
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
View this message in context: http://www.nabble.com/Creating-a-list-by-just-using-start-and-final-component-tp23691673p23692141.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help