Also, the statement that as.numeric(f) is meaningless is a bit strong.
Probably should say "meaningless without knowledge of the levels and
their order". And you can actually compare factors with their levels in
different order: