I have ordered a set of rows to get this:
2 1983 TRI-COUNTY TRAUTH 0.1495 0.1395 NA 452 0.0764 4 0 06/02/83
4 1983 TRI-COUNTY
This is the easiest way to do it:
rownames(dataset) = NULL
Another solution, normally used when binding rows:
dataset <- rbind( dataset , make.rows.names=FALSE )
Are you just looking for something like this?:
row.names(datasetname) <- 1:nrow(datasetname)
Alternatively, if the first column in your example data is a variable (say V1
) in a dataframe and not the row.names
, this will work:
datasetname$V1 <- 1:nrow(datasetname)