nice_scatter_plot: nice_scatter_plot

Description Usage Arguments Value

View source: R/nice_scatter_plot.R

Description

create a nice looking scatter plot comparing 2 variables, with optional linear regression and calculation of R and Rsq.

Usage

1
2
3
4
5
6
7
8
nice_scatter_plot(
  df,
  x_var,
  y_var,
  fit_line = T,
  calculate_rsq = T,
  calculate_R = T
)

Arguments

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.

Value

scatter plot. R and Rsq will be printed on plot if calculated.


mvhunter1/mvhspatialplots documentation built on April 24, 2021, 10:52 a.m.