to_row_names: To row names

View source: R/dataframes.R

to_row_namesR Documentation

To row names

Description

Converts a column to row names

Usage

to_row_names(data, row_names = 1L)

Arguments

data

A data.frame

row_names

The numeric position of the column.

Value

A data.frame

Examples


x <- data.frame(
  a = 1:4,
  b = letters[1:4]
)

to_row_names(x)
to_row_names(x, "b")

mark documentation built on May 29, 2024, 5:13 a.m.