[R] data type for block data?

H. Paul Benton hpbenton at scripps.edu
Tue Jun 19 00:06:54 CEST 2007


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



More information about the R-help mailing list