textshape (version 1.6.0)

tidy_table: 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
id.name

The name to use for the column created from the table names.

content.name

The name to use for the column created from the table values.

ignored.

Value

Returns a data.table with the names from the table as an id column.

Examples

Run this code
# NOT RUN {
x <- table(sample(LETTERS[1:6], 1000, TRUE))
tidy_table(x)
# }

Run the code above in your browser using DataCamp Workspace