np_gt: Create an np table and display it with gt

Description Usage Arguments Examples

View source: R/np.R

Description

Create an np table and display it with gt

Usage

1
np_gt(df, x, ..., .fmt_p = gt::fmt_percent)

Arguments

df

a data frame

x

a variable whose levels are counted

...

additional variables to count by, defining also the grouping that is used to calculate percentages

.fmt_p

a gt formatter applied to the p column

Examples

1
2
3
np_gt(mtcars, cyl)
np_gt(mtcars, cyl, am)
np_gt(mtcars, cyl, am, vs)

fbc-studies/fbcutils documentation built on May 7, 2019, 7:41 a.m.