An interactive function that will generate a scatterplot of two variables, then allow the user to click the plot in two locations to draw a best fit line. Residuals are drawn by default; boxes representing the squared residuals are optional.
plot_ss(x, y, data, showSquares = FALSE, leastSquares = FALSE)
the name of numerical vector 1
the name of numerical vector 2
the dataframe in which x and y can be found
logical option to show boxes representing the squared residuals
logical option to bypass point entry and automatically draw the least squares line