regex - convert dateYYYY-MM-DD to yyyymmdd -


this question has answer here:

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

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -