df1 <- data.frame(ID=paste("ID",101:110,sep=""),
scores=sample(70,10,TRUE)+30,age=sample(7,10,TRUE)+11)
shift.rownames(df1)
df2 <- data.frame(ID=paste(101:110),
scores=sample(70,10,TRUE)+30,age=sample(7,10,TRUE)+11)
shift.rownames(df2) # first col are all numbers, so no convert
shift.rownames(df2,override=TRUE) # override forces conversion
Run the code above in your browser using DataLab