This function creates a flat tabular file of cell values and corresponding paths via path_enriched_df()
. It then
writes that data frame out as a tsv
file.
export_as_tsv(
tt,
file = NULL,
path_fun = collapse_path,
value_fun = collapse_values,
sep = "\t",
...
)import_from_tsv(file)
export_as_tsv
returns NULL
silently.
import_from_tsv
returns a data.frame
with re-constituted list values.
(TableTree
or related class)
a TableTree
object representing a populated table.
(string
)
the path of the file to written to or read from.
(function
)
function to transform paths into single-string row/column names.
(function
)
function to transform cell values into cells of a data.frame
. Defaults to
collapse_values
, which creates strings where multi-valued cells are collapsed together, separated by |
.
(string
)
defaults to \t
. See utils::write.table()
for more details.
(any
)
additional arguments to be passed to utils::write.table()
.
By default (i.e. when value_func
is not specified, list columns where at least one value has length > 1 are
collapsed to character vectors by collapsing the list element with "|"
.
path_enriched_df()
for the underlying function that does the work.