tidy_table: Tidy a Table: Bind Its Values with Its Names

Description Usage Arguments Value Examples

View source: R/tidy_table.R

Description

cbind a table's values with its names to form id (from the names) and content columns.

Usage

1
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

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

textshape documentation built on May 29, 2021, 1:07 a.m.