matchRownameColumn: Match row name column

Description Usage Arguments Details Value Note Examples

Description

Automatically detect row names column, if defined.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
matchRownameColumn(object, ...)

## S4 method for signature 'data.frame'
matchRownameColumn(
  object,
  choices = c("rn", "row.name", "row.names", "rowname", "rownames")
)

## S4 method for signature 'DataFrame'
matchRownameColumn(
  object,
  choices = c("rn", "row.name", "row.names", "rowname", "rownames")
)

Arguments

object

Object.

choices

character. Column name choices to use internally for matching. Note that case-insensitive matching is performed against make.names() return internally. Either dots (".") or underscores ("_") used as word separators will match.

...

Additional arguments.

Details

The data.table package uses "rn" by default, whereas tibble uses "rowname".

Value

character(1) or NULL.

Note

Updated 2021-08-24.

Examples

1
2
3
4
5
6
7
data(data.table, tbl_df, package = "AcidTest")

## data.table ====
matchRownameColumn(data.table)

## tbl_df ====
matchRownameColumn(tbl_df)

acidgenomics/pipette documentation built on Sept. 27, 2021, 9:10 a.m.