textshape (version 1.7.5)

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", ...)

Value

Returns a data.table with the names

from the table as an id column.

Arguments

x

A table.

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.

Examples

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

Run the code above in your browser using DataLab