Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

add_rowindex

Add a column of row numbers to a data frame


Description

Add a column of row numbers to a data frame

Usage

add_rowindex(x)

Arguments

x

A data frame

Value

The same data frame with a column of 1-based integers named .row.

Examples

mtcars %>% add_rowindex()

parsnip

A Common API to Modeling and Analysis Functions

v0.1.5
GPL-2
Authors
Max Kuhn [aut, cre], Davis Vaughan [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.