Is there a way to use geom_smooth when the y variable in the formula is converted? For instance:
#This works: myplot <- qplot(speed, dist, data=cars) (myplot + geom_smooth(method="lm", formula=y~log(x))) #does not work (myplot + geom_smooth(method="lm", formula=log(y)~x))
What I get is a line like this:
myplot + geom_line(aes(x=speed, y=exp(predict(lm(log(dist)~speed)))))
source share