R: tidyverse: how to change the datatype of a column using least charset channels
Pipes and tidyverse are sometimes very handy. The user wants to convert one column from one type to another.
Same:
mtcars$qsec <-as.integer(mtcars$qsec)
This requires entering twice what I need. Please do not suggest the "c" command, as I find it confusing.
What would be the tidvern and magrittr% <>% way to do the same with the least amount of input? Also, if qsec is the 6th column, how can I do this by simply referencing the column position. Something like (not correct code)
mtcars %<>% mutate(as.integer,qsec)
mtcars %<>% mutate(as.integer,[[6]])
+3
source to share