Skip to content
Prev 295544 / 398502 Next

R does not recognise columns and rows as they are supposed to be

Note that 2-dimensional subscripts are given as
    mat[ROWS, COLUMNS]
and you are using the reverse order, hence you get the
error message that you are asking for rows 364:369 of
a 360-row matrix.
The file may well contain single precision numbers and using
  what="double", size=4
will read them and convert them to doubles so other functions
in R can use them.  (Likewise, readBin can read files containing
1- or 2-byte signed or unsigned integers and store them as the
4-byte signed integers that the rest of R can deal with.)

If the file was created on another sort of machine, then you may
have worry about the byte order - try adding endian="big" or
endian="little".