table_data_table: Counts and percentages table by a specified colname(s)

Description Usage Arguments Value Examples

View source: R/data.table_misc.R

Description

Counts and percentages table by a specified colname(s)

Usage

1
table_data_table(data_in, colname)

Arguments

data_in

data.table to process

colname

Column name(s) to calculate counts and parcentages

Value

data.table with counts and parcentages

Examples

1
2
3
4
5
6
set.seed(2016)
dt <- data.table::data.table(A = sample(LETTERS[1:10], 200, replace = TRUE),
                             B = sample(LETTERS[1:10], 200, replace = TRUE))
table_data_table(dt, "A")
table_data_table(dt, "B")
table_data_table(dt, c("A", "B"))

m-dz/mdmisc documentation built on May 22, 2019, 12:23 p.m.