readTable: Read in data.frame from tab-delimited format written by...

View source: R/writeMatrix.R

readTableR Documentation

Read in data.frame from tab-delimited format written by writeMatrix

Description

readTable reads a data.frame written by writeMatrix into a R session

Usage

readTable(file, row.names = TRUE, ...)

Arguments

file

file to be read in

row.names

Logical, whether the first column contains row names (should be consistent with the settign in writeMatrix)

...

Other parameters passed to read.table, for instance stringsAsFactors. Following parameters are not allowed to change: header, sep, quote, dec, check.names, strip.wrhite, comment.char.

Details

Default behaviour of read.table is adapted to the convention used in writeMatrix

Value

A data.frame object

Examples

test.df <- data.frame(Team=c("HSV", "BVB", "VFB"), Score=c(21, 19, 17))
tmpfile <- tempfile()
writeMatrix(test.df, tmpfile)
readin.df <- readTable(tmpfile)
stopifnot(identical(as.character(readin.df$Team), c("HSV", "BVB", "VFB")))
stopifnot(identical(readin.df$Score, c(21L, 19L, 17L)))

ribiosIO documentation built on Feb. 20, 2026, 5:09 p.m.