I'm looking for a tidy way to perform the following:
iris %>% mutate(
petal_width_pct = Petal.Width/Sepal.Width,
petal_length_pct = Petal.Length/Sepal.Width,
sepal_length_pct = Sepal.Length/Sepal.Width,
sepal_width_pct = Sepal.Width/Sepal.Width)
I'd like to add a percentage column for each numeric column, in a way which doesn't require the listing of each variable. I imagine I need a purrr map of some kind, but I haven't figured it out yet!