powered by
This function plots a scatterplot (scatter) on a given data frame, and adds a fit-line to the data.
scatter(df, var1, var2)
data frame to read in.
the dependent/outcome variable, \(Y\).
the independent/predictor variable, \(X\).
# NOT RUN { data <- mtcars scatter(data,mpg,wt) # }
Run the code above in your browser using DataLab