Copied updates from jupyter lab branch
[ou-jupyter-r-demo.git] / plot_extensions.R
index b72ddb011aa504f9bacea80995732a2d1a1ef9de..11762c26704f75ae7ddd23907550287afacfb8c3 100644 (file)
@@ -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),