Function to cast datasets columns if they have differing types Restricted to specific cases, currently integer and double, and character and factor
cast_variables(BASE, COMPARE, ignore_vars = NULL, cast_integers = FALSE, cast_factors = FALSE)
BASE | base dataset |
---|---|
COMPARE | comparison dataset |
ignore_vars | Variables not to be considered for casting |
cast_integers | Logical - Whether integers should be cased to double when compared to doubles |
cast_factors | Logical - Whether characters should be casted to characters when compared to characters |