readTNT {genomic} | R Documentation |
A function to read TNT style data from a file or connection. The format a value for the length of the array, then the rest of the array in free format. For Array2D data the format gives the number of rows, the number of columns and then the rest of the matrix in free format.
readTNT(con, skip = 0, close.con = FALSE) readTNT2D(con, skip = 0, close.con = FALSE)
con |
a connection of a filesname |
skip |
how many lines to skip |
close.con |
close connection on exit ? |
returns a vector or matrix (for readTNT and readTNT2D respectively)
Ian J. Wilson
readsima
cat("30",rnorm(30),sep="\n",file="/tmp/testfile") readTNT("/tmp/testfile") cat("10 3",rnorm(30),file="/tmp/testfileb") readTNT2D("/tmp/testfileb")