io_table {yamlet} | R Documentation |
Import and Export Documented Tables
Description
Imports or exports documented tables. Generic, with methods
that extend read.table
and write.table
.
Usage
io_table(x, ...)
Arguments
x |
object |
... |
passed arguments |
Value
See methods.
See Also
Other io:
io_csv.character()
,
io_csv.data.frame()
,
io_csv()
,
io_res.character()
,
io_res.decorated()
,
io_res()
,
io_table.character()
,
io_table.data.frame()
,
io_yamlet.character()
,
io_yamlet.data.frame()
,
io_yamlet.yamlet()
,
io_yamlet()
Examples
# generate some decorated data
file <- system.file(package = 'yamlet', 'extdata','quinidine.csv')
x <- decorate(file)
# get a temporary filepath
out <- file.path(tempdir(), 'out.tab')
# save file using io_table (returns filepath)
foo <- io_table(x, out)
stopifnot(identical(out, foo))
# read using this filepath
y <- io_table(foo, as.is = TRUE)
# lossless round-trip
attr(x, 'source') <- NULL
rownames(x) <- NULL
rownames(y) <- NULL
stopifnot(identical(x, y))
[Package yamlet version 1.0.3 Index]