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 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.

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]