How do I test for equality of an object with a scales transformation object?

x <- scales::transform_identity()

if (x == scales::transform_identity()) {
  print("Yes!")
}
#> Error in x == scales::transform_identity(): comparison of these types is not implemented

Created on 2025-01-21 with reprex v2.1.1

Also

x <- scales::transform_identity()

identical(x, scales::transform_identity())
#> [1] FALSE

Created on 2025-01-21 with reprex v2.1.1

> setequal(x, scales::transform_identity())
[1] TRUE
1 Like

This topic was automatically closed 7 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.