Submitted by IndeterminateYogurt t3_zzp93v in dataisbeautiful
IndeterminateYogurt OP t1_j2dkrsx wrote
Reply to comment by MMAgeezer in [OC] Around 30% of countries spend more than 2% of GDP on their military by IndeterminateYogurt
I used this:
# geom_smooth(
# method = "glm",
# formula = y ~ x,
# method.args = list(family = gaussian(link = 'log')),
is that not how to do a log-log-transformation in ggplot2? So far haven't worked with a lot of log-scaled data
EDIT: ah, seems to only log y. That explains the curvature.
MMAgeezer t1_j2dqnod wrote
Actually, if the plot is already using transformed data inside the ‘aes()’ call, then you should be able to just use this if I’m not mistaken:
> geom_smooth(formula = y ~ x, method='lm')
Viewing a single comment thread. View all comments