- I have df that contains columns "Value" and "Max Value"
- I add a column to my df using
mutate()
- I need the new column to output based on the equation output=119[(Max Value/value)-1]^1.231
CodePudding user response:
We may do
library(dplyr)
df <- df %>%
mutate(output = 119 * ((`Max Value`/Value)-1)^1.231)