scatter: Create a scatter plot with a regression line

Description Usage Arguments Value

View source: R/Bivariate_plots.R

Description

This function creates a scatter plot using the package ggplot2. The scatter plot allows you to plot the distribution of two numeric variables and adds a regression line to indicate their correlation.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
scatter(
  data,
  x.var,
  y.var,
  title = NULL,
  subtitle = NULL,
  xlabel = NULL,
  ylabel = NULL,
  ...
)

Arguments

data

dataset

x.var

a numeric variable

y.var

a numeric variable

title

plot title

subtitle

subtitle

xlabel

x axis label

ylabel

y axis label

Value

A scatter plot of the two variables


AHWA-Lab-Frankfurt/bwsoplots documentation built on March 25, 2021, 2:35 p.m.