dataset - How to modify the cells in a column in R -


i working on dataset kaggle , here's parts of data set

enter image description here

so delete time in "date" column, show "15-05-13" instead of "15-05-13 17:00". wondering how code this?

i think should this:

train$dates <- sub("15-05-13 17:00", "15-05-13", train$dates) 

but in way, it's going take me forever because data set huge...

wendy, need is:

train$date <- format(as.date(train$date,'%y-%m-%d'),'%y-%m-%d’)  > train       date 1 15-05-13 2 15-05-13 3 15-05-13 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -