scatterBlandAltman: generates a variant of the scatterplot when one needs to...

View source: R/generalStat.R

scatterBlandAltmanR Documentation

generates a variant of the scatterplot when one needs to compare two sets of data (x & y): Bland-Altman / Tukey mean-difference plot

Description

generates a variant of the scatterplot when one needs to compare two sets of data (x & y): Bland-Altman / Tukey mean-difference plot

Usage

scatterBlandAltman(
  data,
  xColumn = 1,
  yColumn = 2,
  removeNA = FALSE,
  xLabel = "Mean",
  yLabel = "Difference",
  title = paste(c("Bland-Altman plot/Tukey mean-difference plot: ", yLabel, " vs ",
    xLabel), collapse = ""),
  xLog = FALSE,
  yLog = FALSE,
  ...
)

Arguments

data

the data tp be plotted, data.frame or similar

xColumn

specifies which column in the data argument contains the x-data (refer to column via number or character vector (column name))

yColumn

specifies which column in the data argument contains the y-data (refer to column via number or character vector (column name))

removeNA

if TRUE, the NA 'values' in the vector will be removed prior to plotting. Note: this has consquence that ROWS will be removed when using multiple columns with data.frame's

xLabel

defines x-axis label

yLabel

defines y-axis label

title

specifies the title

xLog

if TRUE then logarithmic scale is used for the x-axis

yLog

if TRUE then logarithmic scale is used for the y-axis, note: this will lead to errors if the difference is eg 0

...

can be used to pass on other arguments to graphAdjust()

Value

a ggplot object

Note

work in progress...


BenBruyneel/BBPersonalR documentation built on Aug. 23, 2024, 8:28 p.m.