[R] Matrixes inside matrixes
baptiste auguie
baptiste.auguie at googlemail.com
Wed Sep 8 17:39:55 CEST 2010
Hi,
You can have each cell of a matrix contain a matrix, but for a reason
that is just not clear to me the matrices are wrapped in a list,
m = matrix(replicate(4,matrix(1:9,3,3),simplify=FALSE), 2,2)
m[1,2][[1]]
str(m)
and even more surprising to me, m itself has become a list for some reason.
baptiste
On 8 September 2010 17:22, Alaios <alaios at yahoo.com> wrote:
> Hello everyone,
>
> Could you please help me find out if R supports matrixes inside matrixes?
> This is what I would like to do
>
> I have an area map of humidity per km. I would like at every cell to keep also
> information about the height of this area, the current temperature etc.
>
> Is something like that supported?
>
> I would like to thank you in advance for your help
>
> Best Regards
> Alex
>
>
>
>
> [[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.
>
More information about the R-help
mailing list