mat_add_row_num: Add row number

Description Usage Arguments Examples

Description

Add row number

Usage

1
mat_add_row_num(df, ..., col_name = "n_row")

Arguments

df

data

col_name

Name of the new col, defaults to n_row

...

group by variables

Examples

1
2
3
df <- data.frame(group = rep(letters[1:2], each=3), values= 1:6)
mat_add_row_num(df)
mat_add_row_num(df, group)

MatthieuStigler/matPkg documentation built on Aug. 10, 2021, 11:01 a.m.