Fatima Chaudhary
Fatima Chaudhary

Reputation: 5

How to get rid of the first letter from row names

In this data frame I am trying to remove the letter S from in all the row names, so instead of S14 it would just be 14. Any advice?

Upvotes: 0

Views: 386

Answers (1)

David P
David P

Reputation: 114


rownames(df) <- gsub("S", "", rownames(df))

Upvotes: 1

Related Questions