rownames: Tools for working with row names

Description Usage Arguments Details Examples

Description

While a tibble can have row names (e.g., when converting from a regular data frame), they are removed when subsetting with the [ operator. A warning will be raised when attempting to assign non-NULL row names to a tibble. Generally, it is best to avoid row names, because they are basically a character column with different semantics to every other column. These functions allow to you detect if a data frame has row names (has_rownames()), remove them (remove_rownames()), or convert them back-and-forth between an explicit column (rownames_to_column() and column_to_rownames()).

Usage

1
2
3
4
5
6
7

Arguments

df

A data frame

var

Name of column to use for rownames.

Details

In the printed output, the presence of row names is indicated by a star just above the row numbers.

Examples

1
2
3
4
5
6
7
8
9

Robertus100/tibble documentation built on May 9, 2019, 10:09 a.m.