Automatically detect row names column, if defined.
matchRownameColumn(object, ...) # S4 method for data.frame matchRownameColumn( object, choices = c("rn", "row.name", "row.names", "rowname", "rownames") ) # S4 method for DataFrame matchRownameColumn( object, choices = c("rn", "row.name", "row.names", "rowname", "rownames") )
object | Object. |
---|---|
choices |
|
... | Additional arguments. |
character(1)
or NULL
.
data.table: "rn"
.
tibble: "rowname"
.
The data.table package uses "rn" by default, whereas tibble uses "rowname".
Updated 2020-01-18.
#> [1] "rn"## tbl_df ==== matchRownameColumn(tbl_df)#> [1] "rowname"