blandr.display.and.draw: Bland-Altman display and draw for R

View source: R/blandr.display.and.draw.r

blandr.display.and.drawR Documentation

Bland-Altman display and draw for R

Description

Stub function: calls both the display and plots functions (in that order). Uses the same parameters as the plot and display functions to allow easy all-in-one use.

This function may be deprecated in future, as you really can use the functions easily separately.

Usage

blandr.display.and.draw(
  method1,
  method2,
  plotter = "ggplot",
  method1name = "Method 1",
  method2name = "Method 2",
  plotTitle = "Bland-Altman plot for comparison of 2 methods",
  sig.level = 0.95,
  annotate = FALSE,
  ciDisplay = TRUE,
  ciShading = FALSE,
  normalLow = FALSE,
  normalHigh = FALSE,
  lowest_y_axis = FALSE,
  highest_y_axis = FALSE,
  point_size = 0.8
)

Arguments

method1

A list of numbers.

method2

A list of numbers.

plotter

(Optional- default='ggplot') Selects which graphics engine to use to plot the Bland-Altman charts. 2 options are 'ggplot' or 'rplot'. If unknown parameter sent, will default to 'ggplot'

method1name

(Optional) Plotting name for 1st method, default 'Method 1'

method2name

(Optional) Plotting name for 2nd method, default 'Method 2'

plotTitle

(Optional) Title name, default 'Bland-Altman plot for comparison of 2 methods'

sig.level

(Optional) Two-tailed significance level. Expressed from 0 to 1. Defaults to 0.95.

annotate

(Optional) TRUE/FALSE switch to provides annotations to plot, default=FALSE

ciDisplay

(Optional) TRUE/FALSE switch to plot confidence intervals for bias and limits of agreement, default=TRUE

ciShading

(Optional) TRUE/FALSE switch to plot confidence interval shading to plot, default=TRUE

normalLow

(Optional) If there is a normal range, entering a continuous variable will plot a vertical line on the plot to indicate its lower boundary

normalHigh

(Optional) If there is a normal range, entering a continuous variable will plot a vertical line on the plot to indicate its higher boundary

lowest_y_axis

(Optional) Defaults to NULL If given a continuous variable will use this as the lower boundary of the y axis. Useful if need multiple plots with equivalent y-axes.

highest_y_axis

(Optional) Defaults to NULL If given a continuous variable will use this as the upper boundary of the y axis. Useful if need multiple plots with equivalent y-axes.

point_size

(Optional) Size of marker for each dot. Default is cex=0.8

Author(s)

Deepankar Datta deepankar.datta@gmail.com

Examples

# Generates two random measurements
measurement1 <- rnorm(100)
measurement2 <- rnorm(100)

# Generates a plot, with no optional arguments
blandr.display.and.draw( measurement1 , measurement2 )

# Generates a plot, with title
blandr.display.and.draw( measurement1 , measurement2 , plotTitle = 'Bland-Altman example plot' )


blandr documentation built on June 22, 2024, 10:58 a.m.