Hi. Have you tried 'help.search('list')' ?
See ?lapply
> lapply(z, function(s) s[2:3,,drop=F])
[[1]]
[,1] [,2]
[1,]25
[2,]36
[[2]]
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 19 22 25 28 31 34
[2,] 20 23 26 29 32 35
Marco Geraci
--- Federico Calboli <[E
On Tue, 2006-02-28 at 17:14 +, Federico Calboli wrote:
> Hi All,
>
> I have a list of matrices:
>
> > x
> [,1] [,2]
> [1,]14
> [2,]25
> [3,]36
> > y
> [,1] [,2] [,3] [,4] [,5] [,6]
> [1,] 18 21 24 27 30 33
> [2,] 19 22 25 28 31 34
> [3
Federico Calboli wrote:
> Hi All,
>
> I have a list of matrices:
>
>
>>x
>
> [,1] [,2]
> [1,]14
> [2,]25
> [3,]36
>
>>y
>
> [,1] [,2] [,3] [,4] [,5] [,6]
> [1,] 18 21 24 27 30 33
> [2,] 19 22 25 28 31 34
> [3,] 20 23 26 29
Try this:
lapply(z, "[", 2:3, TRUE)
On 2/28/06, Federico Calboli <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have a list of matrices:
>
> > x
> [,1] [,2]
> [1,]14
> [2,]25
> [3,]36
> > y
> [,1] [,2] [,3] [,4] [,5] [,6]
> [1,] 18 21 24 27 30 33
> [2,] 1
Hi All,
I have a list of matrices:
> x
[,1] [,2]
[1,]14
[2,]25
[3,]36
> y
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 18 21 24 27 30 33
[2,] 19 22 25 28 31 34
[3,] 20 23 26 29 32 35
> z =list(x,y)
I want to create a second list that is