X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=plot_extensions.R;h=11762c26704f75ae7ddd23907550287afacfb8c3;hb=HEAD;hp=b72ddb011aa504f9bacea80995732a2d1a1ef9de;hpb=42eadd5803ad1ca3804d800cd25dd72071c751eb;p=ou-jupyter-r-demo.git diff --git a/plot_extensions.R b/plot_extensions.R index b72ddb0..11762c2 100644 --- a/plot_extensions.R +++ b/plot_extensions.R @@ -51,7 +51,7 @@ require(ggplot2) ggplot(fit$model, aes_string(x = names(fit$model)[2], y = names(fit$model)[1])) + geom_point() + - stat_smooth(method = "lm", col = "red") + + geom_smooth(method = "lm", col = "red") + labs(title = paste("Adj R2 = ",signif(summary(fit)$adj.r.squared, 5), "Intercept =",signif(fit$coef[[1]],5 ), " Slope =",signif(fit$coef[[2]], 5),