transpose_crosstable | R Documentation |
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
transpose_crosstable(x)
## S3 method for class 'crosstable'
t(x)
x |
a crosstable |
a tibble of class transposed_crosstable
ct = crosstable(mtcars2, c(mpg, drat, wt, qsec), by=am)
ct %>% t() %>% as_flextable()
ct2 = crosstable(mtcars2, c(mpg, drat, wt, qsec), by=c(am, vs))
ct2 %>% t() %>% as_flextable()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.