Skip to content

Cropping a matrix by rows

1 message · 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.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
Hans Thompson <hans.thompson1 at gmail.com> wrote: