transpose_crosstable {crosstable} | R Documentation |
Transpose a crosstable
Description
Pivot a crosstable so the label
column is swapped with the by
row.
This requires the variable
column to be the same for every data column, like when all columns are numeric of when all columns are factors with the same levels
Usage
transpose_crosstable(x)
## S3 method for class 'crosstable'
t(x)
Arguments
x |
a crosstable |
Value
a tibble of class transposed_crosstable
Examples
ct = crosstable(mtcars2, c(mpg, drat, wt, qsec), by=am)
t_ct = t(ct)
as_flextable(t_ct)
[Package crosstable version 0.7.0 Index]