column.2.row.names | R Documentation |
Converts the first column (or a specified column) of a dataframe or tibble into row names.
This function differs from tibble::column_to_rownames
in that it takes column names or inices and
it offers the option to sanitize row names using make.names
, provides a warning if there are
duplicated values in the row name column
column.2.row.names(
tibble,
rowname_column = 1,
make_names = FALSE,
as_df = TRUE,
warn = TRUE,
overwrite = TRUE,
...
)
tibble |
A dataframe or tibble without row names. Default: No default value, a dataframe must be provided. |
rowname_column |
Index of the column to be used as row names. Default: 1. |
make_names |
Boolean indicating whether to call |
as_df |
Boolean indicating whether to convert the input to a dataframe if it's not already one. Default: TRUE. |
warn |
Warn user if row names pre-exist. Default: TRUE. |
overwrite |
Overwrite row names if they already exist. Default: TRUE. |
... |
Pass arguments to make.names().. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.