io_csv {yamlet}R Documentation

Import and Export Documented Tables as CSV

Description

Imports or exports documented tables as comma-separated variable. Generic, with methods that extend as.csv.

Usage

io_csv(x, ...)

Arguments

x

object

...

passed arguments

Value

See methods.

See Also

Other io: io_csv.character(), io_csv.data.frame(), io_res.character(), io_res.decorated(), io_res(), io_table.character(), io_table.data.frame(), io_table(), 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.csv')

# save file using io_csv (returns filepath)
foo <- io_csv(x, out)
stopifnot(identical(out, foo))

# read using this filepath
y <- io_csv(foo)

# lossless round-trip (ignoring source attribute)
attr(x, 'source') <- NULL
attr(y, 'source') <- NULL
stopifnot(identical(x, y))

[Package yamlet version 1.0.3 Index]