if (FALSE) {
# Change one column to numeric and another to character
mtcars %>%
convert(num(gear),
chr(mpg))
# Changing multiple data types on multiple columns
mtcars %>%
convert(int(hp,
wt),
fct(qsec,
cyl,
drat))
# Also works with tidyselect convenience functions
mtcars %>%
convert(int(vs:carb),
fct(last_col()))
}
Run the code above in your browser using DataLab