I'm using qplot to plot and fit a slope to my data:
qplot(log(X),log(Y),geom=c("point","smooth"),method="gam",formula=y~ns(x,2))
It works fine. But how do I get the coefficients of the plotted regression slope? I'm aware I can get the slope explicitly using, e.g., nls. Nonetheless, I'd like to know what slope qplot is fitting to my data. I'm grateful for any advice.