View source: R/nice_scatter_plot.R
| nice_scatter_plot | R Documentation | 
create a nice looking scatter plot comparing 2 variables, with optional linear regression and calculation of R and Rsq.
nice_scatter_plot(
  df,
  x_var,
  y_var,
  fit_line = T,
  calculate_rsq = T,
  calculate_R = T
)
df | 
 dataframe containing the data you want to plot.  | 
x_var | 
 variable to be plotted on the x axis, as string.  | 
y_var | 
 variable to be plotted on the y axis, as string.  | 
fit_line | 
 if T, will fit a line using linear regression.  | 
calculate_rsq | 
 if T, will calculate Rsq.  | 
calculate_R | 
 if T, will calculate R.  | 
scatter plot. R and Rsq will be printed on plot if calculated.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.