mtleis
mtleis

Reputation: 732

R - How to re-order row index number

Simply put, I have the following data frame:

        Signal
    4   9998
    3   549
    1   18
    5   2.342
    2   0.043

and I want to reset the index numbers to be like :

        Signal
    1   9998
    2   549
    3   18
    4   2.342
    5   0.043

Upvotes: 10

Views: 38513

Answers (1)

akrun
akrun

Reputation: 887501

You can use

 row.names(yourdf) <- NULL

to reset the row names

Upvotes: 29

Related Questions