parsnip (version 1.1.0)

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)

Value

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

Arguments

x

A data frame

Examples

Run this code
mtcars %>% add_rowindex()

Run the code above in your browser using DataLab