It looks like you're new here. If you want to get involved, click one of these buttons!
I have a data frame column that looks like this:
I would like to find the max date and the min date. How can I find that ?
Thanks in advance
Lets do it using lubridate package,
dates <- data.frame(
Creation_date = c("2018-1-22", "2017-10-25", "2016-12-26", "2014-01-26 "2018-2-15", "2017-08-16")
With data, we can easily perform the two necessary steps: convert to date format and summarize the information you want:
# transform to date format with lubridate
mutate(Creation_date = ymd(Creation_date )) %>%
# find min and max
summarise(min = min(Creation_date ),
max = max(Creation_date ))
© 2018 Kpro Solutions Pvt. Ltd. All Rights Reserved.