ply(mls,function(x) matrix(as.vector(as.matrix(x)),nrow=372))
A.K.
From: eliza botto
To: "smartpink...@yahoo.com"
Sent: Thursday, January 3, 2013 8:31 PM
Subject: RE: [R] splitting matrices
Actually, you will see that 465 elements are there
Dear Arun, David, Bert and Macqueen,thankyou very much for your replies and
your kind suggestions have been noted.thanks once again
elisa
> Date: Thu, 3 Jan 2013 09:12:11 -0800
> From: smartpink...@yahoo.com
> Subject: Re: [R] splitting matrices
> To: macque...@llnl.gov
&g
, January 3, 2013 11:56 AM
Subject: Re: [R] splitting matrices
This example illustrates a method that may do what you want.
## split a 20x5 matrix into five 4x5 matrices
xmat <- matrix(1:100, nrow=20, ncol=5, byrow=TRUE)
xsplit <- rep( 1:5, times= rep(4,5))
tmp <- split.data.frame(xmat,xspl
Have you read "An Introduction to R" or consulted ?"[" . This is simply a
matter of indexing matrices. I think you have an obligation to do some
homework before posting what appear to be trivialities (others may
disagree).
-- Bert
On Thu, Jan 3, 2013 at 8:40 AM, eliza botto wrote:
>
>
> Dear us
sday, January 03, 2013 10:57 AM
> To: eliza botto; r-help@r-project.org
> Subject: Re: [R] splitting matrices
>
> This example illustrates a method that may do what you want.
>
> ## split a 20x5 matrix into five 4x5 matrices
> xmat <- matrix(1:100, nrow=20, ncol=5, by
This example illustrates a method that may do what you want.
## split a 20x5 matrix into five 4x5 matrices
xmat <- matrix(1:100, nrow=20, ncol=5, byrow=TRUE)
xsplit <- rep( 1:5, times= rep(4,5))
tmp <- split.data.frame(xmat,xsplit)
You will need to change xsplit to fit your dimensions.
-Don
--
Dear useRs,
i want to split a matrix having 1116rows and 12 columns. i want to split that
matrix into 36 small matrices each having 12 columns and 31 rows. The big
matrix should be splitted row wise. which means that the first small matrix
should copy values which are in first 31 rows and 12 c
7 matches
Mail list logo