Re: [R] Cropping a matrix by rows

2012-11-12 Thread Jeff Newmiller
Seems irrelevant to me. You can export the data to separate files directly from the matrix using matrix indexing. i.e. for (i in 1:2) { write.table( mat[rowcropping[2*i-1]:rowcropping[2*i],],paste0("file",i,".dat") } Please use reply to all to keep the discussion on the list. -

Re: [R] Cropping a matrix by rows

2012-11-11 Thread Jeff Newmiller
I assiduously avoid automatically generating distinct objects, and recommend that you also do so. You have the data, and can refer to individual rows by index as you need them. --- Jeff NewmillerThe

[R] Cropping a matrix by rows

2012-11-11 Thread Hans Thompson
Hello r-help, I've been banging my head against the computer in an attempt to learn how to divide my matrix into segments by rows. I want to be able to return each segment as a newly named object. I've tried looking at the apply functions and creating a for loop but brain no work. Here's the bas