DecisionPlot: DecisionPlot: 2D contour plot of breath-test variables

Description Usage Arguments Value Author(s) Examples

View source: R/DecisionPlot.R

Description

Creates a 2D percentile plot of a pair of breath test variables. By default, the green central regions contains 50 determined using a highest-density-interval (HDI) method.

Usage

1
2
3
4
5
6
DecisionPlot(con = NULL, pars = dbGetQuery(con,
  "SELECT * from BreathTestParameter")[, -1], methods = "Maes",
  parameters = c("t50", "tlag"), prob = c(0.01, 0.05, 0.25, 0.5),
  main = "Breath test parameters", kde.package = c("ash", "ks"),
  brewerPalette = "RdYlGn", outlierFak = 3, showColors = NULL,
  showPoints = TRUE, showDateLabels = TRUE)

Arguments

con

connection to sqlite database; if missing, uses default database.

pars

all parameters in the form as read from table BreathTestParameters.

methods

if one entry is given, e.g ExpBeta, BluckCoward, WN, MaesPop, it is combined with both parameters; if two are given, method and parameters are paired.

parameters

two parameter names, e.g. c("t50","tlag").

prob

quantile probabilities; color for these is determined by Brewer palette, default RdYlGn.

main

title for graph

kde.package

package to use for HDI 2D kernel smoothing

brewerPalette

color palette name from RBrewerColor to use

outlierFak

the multiples of standard deviations to use for outlier removal. Note outliers removed from computation. It cannot be ruled out the data point you are focussing on has been removed. If in doubt, try higher values, i.e. wider ranges to include.

showColors

e.g. c("green","blue","red","orange") to show all marked items.

showPoints

should data points contributing to decision be shown?

showDateLabels

If TRUE, the record date of the showPointss records are added as label.

Value

None; as a side effect, a plot using standard graphics is generated. Note that the image may contain aliasing lines when Cairo is avaialable on your system. https://groups.google.com/forum/?fromgroups#!topic/shiny-discuss/ysac9FqOQLI

Author(s)

Dieter Menne, dieter.menne@menne-biomed.de

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
databasePath = CreateSimulatedBreathTestDatabase()
con = OpenSqliteConnection(databasePath)
opt = par(mfrow=c(2,2))
DecisionPlot(con, showColors="red", main="Method ash")
# DecisionPlot(con, showColors=c("orange","blue"),main= "Method ks", kde.package="ks")
DecisionPlot(con, method="BluckCowardPop",showColors=c("red"), main= "BluckCoward Population" )
# For Wagner-Nelson, there is no lag, we must use it from a different source
DecisionPlot(con, method=c("MaesPop","Maes"),parameters=c("t50","t50"),
 showColors=c("green","blue"),showPoints=FALSE,
   main="No points, Spectral", brewerPalette = "Spectral")
par(opt)
dbDisconnect(con)

dmenne/d13cbreath documentation built on March 1, 2020, 3:41 a.m.