as_Composite_table {tatoo} | R Documentation |
Coerce to Composite Table
Description
Converts other R objects to Composite_tables
by automatically creating
multi-column names from the properties of the objects.
Usage
as_Composite_table(x, ...)
## S3 method for class 'Mashed_table'
as_Composite_table(
x,
id_vars = attr(x, "id_vars"),
meta = attr(x, "meta"),
...
)
## S3 method for class 'data.frame'
as_Composite_table(x, sep = ".", reverse = FALSE, ...)
is_Composite_table(x, ...)
Arguments
x |
Any R object. |
... |
Ignored |
id_vars |
If |
meta |
a TT_meta object. If specified, the resulting
|
sep |
a scalar character. Separator in the column names of |
reverse |
logical. if |
Value
as_Composte_table()
returns a Composite_table
is_Composite_table
returns TRUE
if its argument is a Composite_table
and FALSE
otherwise.
Examples
mash_table(
head = head(cars),
tail = tail(cars),
mash_method = 'col'
)
as_Composite_table(data.frame(
apple.fruit = 1,
kiwi.fruit = 2,
dog.animal = 1,
black.cat.animal = 2,
parrot.animal = 3
))