plot_reg function

Plot points with the corresponding linear regression line

Plot points with the corresponding linear regression line

Plots points with the corresponding linear regression line

plot_reg(x, y, pch = 19, xlab = NULL, ylab = NULL, ...)

Arguments

  • x: numeric vector
  • y: numeric vector
  • pch: type of points
  • xlab: character string, label of the x axis, NULL by default
  • ylab: character string, label of the y axis, NULL by default
  • ...: other arguments to be passed in plot

Returns

None

Examples

plot_reg(cgd$age, cgd$height, xlab="Age (years)", ylab="Height")

Author(s)

Hugo Varet

  • Maintainer: Hugo Varet
  • License: GPL (>= 2)
  • Last published: 2025-03-24

Useful links