tidy_table {textshape} | R Documentation |
Tidy a Table: Bind Its Values with Its Names
Description
cbind
a table
's values with its
names
to form id
(from the names) and
content
columns.
Usage
tidy_table(x, id.name = "id", content.name = "content", ...)
Arguments
x |
A |
id.name |
The name to use for the column created from the |
content.name |
The name to use for the column created from the |
... |
ignored. |
Value
Returns a data.table
with the names
from the table
as an id
column.
Examples
x <- table(sample(LETTERS[1:6], 1000, TRUE))
tidy_table(x)
[Package textshape version 1.7.5 Index]