I have this dataframe
df = data.frame(x = c('01','02','03','04','05')) df
And the objective is to have the output as follows :
x 1 1 2 2 3 3 4 4 5 5
Use this
df$x <- as.integer(df$x)