Currently, column references must be named explicitly:
mutate(
total = as.integer((EmOff15 + EmIns15 + EmInd15 + EmSer15 + EmOth15) / per_dot)
)
For the function to work generically, column references must be made dynamically. The syntactic freebies from tidyr and the Magrittr pipe syntax make this a little more awkward.
Ultimately, we need to be able to do something like this:
mutate(
total = as.integer((columns) / per_dot)
)
Where columns is some list of column names passed to the function.
Named column references occur twice in the script.