plotlm: plot a linear regression figure and return a list of...

Description Usage Arguments Value Examples

View source: R/beginr.R

Description

plot a linear regression figure and return a list of parameters.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
plotlm(
  x,
  y,
  xlim = range(as.numeric(x), na.rm = TRUE),
  ylim = range(as.numeric(y), na.rm = TRUE),
  plot.title = "linear regression",
  xlab = "x",
  ylab = "y",
  refline = FALSE,
  slope = 1,
  intercept = 0,
  showr2 = TRUE,
  showleg = TRUE
)

Arguments

x

numeric

y

numeric

xlim

numeric

ylim

numeric

plot.title

character

xlab

character

ylab

character

refline

logical. if a reference line is plotted

slope

slope of refline

intercept

intercept of refline

showr2

logical

showleg

logical

Value

a figure

Examples

1
plotlm(1:10, 1:10 + rnorm(10))

pzhaonet/beginr documentation built on March 27, 2021, 1:20 p.m.