readTNT {genomic}R Documentation

Read TNT data

Description

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.

Usage

readTNT(con, skip = 0, close.con = FALSE)
readTNT2D(con, skip = 0, close.con = FALSE)

Arguments

con a connection of a filesname
skip how many lines to skip
close.con close connection on exit ?

Value

returns a vector or matrix (for readTNT and readTNT2D respectively)

Author(s)

Ian J. Wilson

See Also

readsima

Examples

cat("30",rnorm(30),sep="\n",file="/tmp/testfile")
readTNT("/tmp/testfile")
cat("10 3",rnorm(30),file="/tmp/testfileb")
readTNT2D("/tmp/testfileb")

[Package genomic version 1.0 Index]