Sunday, March 22, 2015

Renumbering rows after ordering in R

Many a times after data cleaning and reordering, the dataset row numbers get jumbled up. To solve the issue simple run the following command:

> row.names(myDataFrame) <- 1:nrow(myDataFrame)

Happy programming!!

No comments:

Section 80C TMT 2023(PA) – Standard Deduction amounting to a maximum of Rs 8670 under IT rule

With the recently concluded Tax filing season (which if I may draw parallel to the Christmas holiday season enjoyed by one and all), Indians...