To convert the date into month, first i changed all the dates into one standard format using
list1<-as.Date(sample1$Date, "%d-%m-%Y")
but this gave me NAs -
[1] "2015-06-24" "2015-06-23" "2015-06-25" "2015-06-26" "2015-06-30" "2015-06-29"
[7] "2015-06-18" NA "2015-06-27" "2015-06-15" "2015-06-13" "2015-06-17"
[13] "2015-06-22" "2015-06-16" "2015-06-19" NA NA "2015-05-26"
[19] "2015-06-28" NA "2015-04-28" "2015-05-28" "2015-04-27" NA
[25] NA NA NA NA "2015-04-13" "2015-04-24"
[31] "2015-04-30" NA "2015-04-14" "2015-04-23" NA "2015-04-22"
[37] "2015-04-29" "2015-04-17" NA NA NA "2015-04-16"
[43] "2015-04-20" NA "2015-05-21" "2015-05-27" "2015-06-14" "2015-05-16"
[49] "2015-06-20" "2015-04-25" "2015-05-14" "2015-05-20" NA NA
[55] NA NA "2015-05-18" "2015-05-22" "2015-05-29" NA
[61] NA NA "2015-05-13" "2015-04-15" "2015-05-15" "2015-05-19"
[67] "2015-04-21" "2015-06-21" "2015-05-23" "2015-05-25" NA NA
[73] NA NA NA NA NA "2015-05-31"
[79] "2015-04-19" "2015-05-30" NA "2015-04-18" "2015-04-26" "2015-05-17"
[85] "2015-05-24" NA NA NA NA NA
[91] NA
How do I convert all the dates to Date and then change into month using dplyr? I am very new to R. Please provide some explanation if needed.