regex - convert dateYYYY-MM-DD to yyyymmdd -
this question has answer here:
- factor date numeric 1 answer
i have dataframe in r dates being 1 of column
head(t) # date x #2013-04-05 32851 #2013-04-06 42523 #...
i need parse date , 20130405
, 20130506
column in same data frame. how do ?
how gsub
...
df$new <- gsub( "-" , "" , df$date ) date x new 1 2013-04-05 32851 20130405 2 2013-04-06 42523 20130406
Comments
Post a Comment