matrix(a, ncol=3, nrow=4, byrow=TRUE)
or
> dim(a) <- c(3,4)
> a <- t(a)
> a
[,1] [,2] [,3]
[1,]123
[2,]456
[3,]789
[4,] 10 11 12
Depending on the context of the problem.
Sarah
On Thu, Mar 17, 2011 at 7:59 AM, Bodnar Laszlo EB_HU
wrote:
> Hi again
t(matrix(a,3,4))
for more complex arrays, see ?aperm
> Hi again,
>
> I'd like to ask you a question again.
>
> I have a matrix like this:
> a <-matrix(c(1,2,3,4,5,6,7,8,9,10,11,12))
> a
>
> [,1]
> [1,]1
> [2,]2
> [3,]3
> [4,]4
> [5,]5
> [6,]6
> [7,]7
>
Hi again,
I'd like to ask you a question again.
I have a matrix like this:
a <-matrix(c(1,2,3,4,5,6,7,8,9,10,11,12))
a
[,1]
[1,]1
[2,]2
[3,]3
[4,]4
[5,]5
[6,]6
[7,]7
[8,]8
[9,]9
[10,] 10
[11,] 11
[12,] 12
Is there a proper way to change t
3 matches
Mail list logo