> compare(factor("a"), 1L)
`old` is an S3 object of class <factor>
`new` is an integer vector (1)

> compare(factor("a"), globalenv())
`old` is an S3 object of class <factor>
`new` is an environment

> compare(factor("a"), as.Date("1970-01-02"))
`class(old)`: "factor"
`class(new)`: "Date"  

`levels(old)` is a character vector ('a')
`levels(new)` is absent

