In a regression or plotting context, the formula/tilde syntax is used to mean something like "The value of the LHS is dependent on the RHS". For example
lattice::xyplot(mpg ~ disp, data=mtcars)
displays disp as the x/independent variable and mpg as the y/dependent variable. However with dplyr::case_when() this logic seems reversed. The LHS contains the condition, while the RHS contains what is returned if the condition is TRUE. Hence the RHS is dependent on the LHS. Why is this dependency relationship reveresed for case_when() compared to other uses of formula syntax in R? Which is perhaps a different way of asking, why is my interpretation of what case_when() is doing wrong?