Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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.
Use mutate in combination with row_number as follows:
df %>% mutate(row = row_number())
Required, but never shown