R functions not working correctly on Linux (working well on windows)

I am trying to do the following:

subset_Portugal <- subset(data_frame, data_frame$iso_code == "PRT" & data_frame$date <= "2021-02-27" & data_frame$date >= "2020-04-01")

Works great on windows, but on Linux (a fresh install) I get the following error:

> subset_Portugal <- subset(data_frame, data_frame$iso_code == "PRT" & data_frame$date <= "2021-02-27" & data_frame$date >= "2020-04-01")
Warning messages:
1: In Ops.factor(data_frame$date, "2021-02-27") :
  ‘<=’ not meaningful for factors
2: In Ops.factor(data_frame$date, "2020-04-01") :
  ‘>=’ not meaningful for factors

Why is this happening on Linux? How may I fix it?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.