Re: [R] splitting matrices

2013-01-03 Thread arun
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

Re: [R] splitting matrices

2013-01-03 Thread eliza botto
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

Re: [R] splitting matrices

2013-01-03 Thread arun
, 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

Re: [R] splitting matrices

2013-01-03 Thread Bert Gunter
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

Re: [R] splitting matrices

2013-01-03 Thread David L Carlson
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

Re: [R] splitting matrices

2013-01-03 Thread MacQueen, Don
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 --

[R] splitting matrices

2013-01-03 Thread eliza botto
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