You can use matrix:

A=matrix(c(1,4,7,10,2,5,8,11,3,6,9,12),c(3,4))
B <- matrix(A, 2, 6)

On Mon, Apr 26, 2010 at 4:58 PM, anderson nuel <anderson....@gmail.com>wrote:

> I would find function which change the size automatically.
>
> For example:
>
> > A=matrix(c(1,4,7,10,2,5,8,11,3,6,9,12),c(3,4))
> > A
>     [,1] [,2] [,3] [,4]
> [1,]    1   10    8    6
> [2,]    4    2   11    9
> [3,]    7    5    3   12
>
> B=func(A,2,6)
>
> B becomes:
>
>    1    3    5    7    9   11
>    2    4    6    8   10   12
>
> Best
>
> 2010/4/26 David Winsemius <dwinsem...@comcast.net>
>
> >
> > On Apr 26, 2010, at 3:18 PM, anderson nuel wrote:
> >
> >  Dear r-help,
> >>
> >> Could you help me to find the function which change the size of matrix .
> >>
> >
> > ?dim
> >
> >
> >>
> >> Best Regards
> >>
> >
> >
> > David Winsemius, MD
> > West Hartford, CT
> >
> >
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@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.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to