0

I am new to R and would like to insert a new column that numbers the row to a large dataset.

I have no idea how to use 'mutate()' to insert this. Would appreciate any help.

Thanks.

Ethan
  • 1,625
  • 8
  • 23
  • 39
BioIsaac
  • 23
  • 4

1 Answers1

1

Use mutate in combination with row_number as follows:

df %>% mutate(row = row_number())
Oxbowerce
  • 7,077
  • 2
  • 8
  • 22