[R] Matrix problems

Mmarques INESC mmarques at inescporto.pt
Thu Mar 20 12:48:35 CET 2003


Hi all.
I do not know if it is a bug in the windows version but i have this
problem.
Reading a file with 200000 rows, 2 columns and transforming into a
200000 x 2 matrix.
If I try to find an element by using the which command which gives
some correct indexes plus some others passing the 200000 row
boundaries.
If I try to reach those "outbound" indexs I get an "Error: subscript out
of bounds" .
Is this a limitation of matrix function ? or am i doing something
wrong ?
Example :

 > str(mat1)
 num [1:200000, 1:2] 185 212 222 269 342 349 361 367 397 423 ...
 > which(mat1 == 185)
  [1]      1 201920 203792 205211 206604 220417 223767 225169 239420 243768 249351 249395 252077
 What could be happening ?

 Thanks in advance
 Mark Marques



More information about the R-help mailing list