[R] multi-dimensional array with different number of dimensions?

David Winsemius dwinsemius at comcast.net
Sun Dec 13 00:20:54 CET 2009


On Dec 12, 2009, at 5:36 PM, parkbomee wrote:

>
> Hi,
>
> Is it possible to assign to an array with different dimensions?
> That is to say, supposing a three dimensional array,
> the third dimension of the array has matrices of different sizes?

Use a list. Or populate with NA's

>
>> array
> , , 1
>      [1] [2] [3]
> [1]  1    1    1
>
>
> , , 2
>      [1] [2] [3]
>
> [1]  1    1    1
>
> [2]  1    1    1
>
> , , 3
>      [1] [2] [3]
>
>
> [1]  1    1    1
>
>
> [2]  1    1    1
>
>
> [3]  1    1    1
>
>
> something like this??
>
>
> Thanks,
> B
> 		 	   		
> _________________________________________________________________
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list