Fruits
john bought banana and kept 7 days from 15 apr 2015
marker bought apple and kept 10 days from 11 jan 2015
shannon bought apple, banana and kept 12 days from 11 feb 2015
mckinsey bought banana and kept 19 days from 11 dec 2015
george bought banana and kept 17 days from 11 feb 2015
mesa bought banana and kept 10 days from 11 jan 2015
mac bought banana and kept 7 days from 11 sep 2015
henric didn’t buy the fruit
This is column content in the dataframe. I wanted to extract the information of date month year (eg,11 jan 2015) and store it another column.Then I want to extract the number of days("19 days) store it another column in the same dataframe.
i have tried so far.
date <- gsub("[^0-9]", " ", dataframe$fruits)# wrong
but the code doesnt seem to be right. can anyone help me please? Thanks in advance.