# 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))
Run the code above in your browser using DataLab