View source: R/convert_tibbles.R
Transpose tibble, adding a new column to store the old column names and drawing new column names from a given column. Currently doesn't have type checking so new types have to be assigned to columns manually if there is more than one type in the tibble.
1 | transpose_tibble(tbl, col_names, id_col = "columns")
|
tbl |
Tibble to transpose. |
col_names |
Column containing the transposed column headers. |
id_col |
Name of the new column containing the old column headers. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.