wLinRegression: wLinRegression

Description Usage Arguments Examples

View source: R/MarkdownReportsDev.R

Description

Add linear regression, and descriptors to line to your scatter plot. Provide the same dataframe as you provided to wplot() before you called this function

Usage

1
2
3
4
5
6
7
8
wLinRegression(
  DF,
  coeff = c("pearson", "spearman", "r2")[3],
  textlocation = "topleft",
  cex = 1,
  OverwritePrevPDF = unless.specified("b.save.wplots"),
  ...
)

Arguments

DF

The same dataframe as you provided to wplot() before you called this function

coeff

What coefficient to display? Either "all", "pearson", "spearman" correlation values or "r2" for the Coefficient of Determination.

textlocation

where to put the legend?

cex

font size; 1 by default

OverwritePrevPDF

Save the plot immediately with the same name the last wplot* function made (It is stored in plotnameLastPlot variable). Never inserts an mdlink.

...

Additional parameters for the line to display.

Examples

1
2
try.dev.off(); x = cbind(a = rnorm(1:10), b = rnorm(10)); wplot(x)
# wLinRegression(x, coeff = c("pearson", "spearman", "r2")[3])

vertesy/MarkdownReportsDev documentation built on Nov. 15, 2021, 9:59 a.m.