[R] data type for block data?

From: H. Paul Benton <hpbenton_at_scripps.edu>
Date: Mon, 18 Jun 2007 15:06:54 -0700


Dear All,

    I have a matrix with data that is not organised. I would like to go through this and extract it. Each feature has 2 vectors which express the data. I also have an index of the places where the data should be cut. eg.
>class(cc)
"matrix"
>cc

      [,1] [,2]
[1,] 1 26
[2,] 2 27
[3,] 3 28
[4,] 4 29
[5,] 5 30
[6,] 6 31
[7,] 7 32
[8,] 8 33
[9,] 9 34

[10,]    1   27
[11,]    1   28
[12,]    2   30
[13,]    3   34

ect......
> index
[1] "10" "40"

Is there a way to take cc[i:index[i-1],] to another format as to where each block could be worked on separately. ie so in one block would be rows1:10 the next block would be rows11:40 and so on.

Thanks,

Paul

-- 
Research Technician
Mass Spectrometry
   o The
  /
o Scripps
  \
   o Research
  /
o Institute

______________________________________________
R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 18 Jun 2007 - 22:13:25 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 19 Jun 2007 - 07:32:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.