My data set has 2 columns, Start date and End date. I want to check if any of the rows have start date greater than the end date.
Tried below code, it failed.
Mydata$New = ifelse(Mydata$Planned.Start.Date < Mydata$Planned.Substantial.Completion.Date, 0, 1))
Error:
In Ops.factor(Mydata$Planned.Start.Date, Mydata$Planned.Substantial.Completion.Date) : ‘<’ not meaningful for factors