I checked for NA values in the data set and I got this.
colSums(is.na(flight_data))
journey_date
216333
And I checked the column's data. This looks weird. Only 122 observations are converted to date. Rest all are filled with NA.
flight_data$journey_date
[1] "2022-11-02" "2022-11-02" "2022-11-02" "2022-11-02" "2022-11-02" "2022-11-02" "2022-11-02" "2022-11-02"
.
.
.
[121] "2022-12-02" "2022-12-02" NA NA NA NA NA NA NA NA NA NA
However, look at the str. The column type is date. (Not sure what is ", format")
str(flight_data)
'data.frame': 300261 obs. of 11 variables:
$ journey_date: Date, format: "2022-11-02" "2022-11-02"