View source: R/colnames_to_row.R
colnames_to_row | R Documentation |
Moving the column names of a data frame to a row is sometimes useful when formatting a table for export. This function does that and the user can specify which row they'd like the column names to be insterted before.
colnames_to_row(df, row = 1)
df |
the data frame |
row |
the row number before which the column names will be inserted, default is (i.e., the names would become the first row of the data frame). |
a data frame with column names in tact but added as a row
colnames_to_row(iris)
colnames_to_row(iris, row = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.