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

View source: R/tidy_table.R

tidy_tableR 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)

trinker/textshape documentation built on April 5, 2024, 11:39 a.m.