Say I have a dataframe data with 5 variables, var1,var2,var3,var4,var5. Imagine I want to do the following operation:
sqrt(data$var2)*(data$var4+data$var1)/data$var3 + data$var5/log(data$var3)
Is there a simpler way to just call the formula as follows?
sqrt(var2)*(var4+var1)/var3 + var5/log(var3)
Perhaps within another function? apply or the like? Can't get how to do it properly. Removing variables from the dataframe is not a desirable option.