normalQQPlot: creates a ggplot object showing a normal quantile plot with...

View source: R/generalStat.R

normalQQPlotR Documentation

creates a ggplot object showing a normal quantile plot with confidence intervals qqplot: https://github.com/aloy/qqplotr

Description

creates a ggplot object showing a normal quantile plot with confidence intervals

qqplot: https://github.com/aloy/qqplotr

Usage

normalQQPlot(
  data,
  column,
  removeNA = TRUE,
  sampleSize = NA,
  pointColor = "black",
  pointFill = "green",
  pointShape = 21,
  pointSize = 3,
  pointAlpha = 0.75,
  lineColor = "red",
  lineType = "solid",
  lineWidth = 1,
  lineAlpha = 1,
  title = NULL,
  distribution = "norm",
  distributionParameters = list(),
  bandType = c("pointwise", "boot", "ks", "ts")[3],
  bandFill = "blue",
  bandAlpha = 0.1,
  xAxis = TRUE,
  yAxis = TRUE,
  vertical = FALSE,
  xDefault = TRUE,
  xLimits = c(0, NA),
  yDefault = TRUE,
  yLimits = c(0, NA),
  xLabel = "Theoretical",
  yLabel = "Sample",
  ...
)

Arguments

data

the data to be plotted, can be a numeric/character/etc vector or data.frame like (or tibble etc). If it is data.frame or similar the column argument defines which column is to be used

column

defines which columns are to be used for the plot. Can be integer or character (column name)

removeNA

if TRUE, the NA 'values' in the vector will be removed prior to plotting. @note this will remove warning messages and errors

sampleSize

allows to the use of a sample of the data to be used for the boxplot. By default sampleSize = NA, in which case all data is used

pointColor

defines the color of the border of the data points

pointFill

defines the color of the data points themselves

pointShape

shape of the data points

pointSize

size of the data points

pointAlpha

alpha ('see through' value) of the data points

lineColor

color of the normal distribution 'line'

lineType

type of the normal distribution 'line'

lineWidth

width of the normal distribution 'line'

lineAlpha

alpha ('see through' value) of the normal distribution 'line'

title

sets title of graph

distribution

character vector, default is 'norm', see qqplotr::geom_qq_band for more info

distributionParameters

list of additional parameters passed on to the previously chosen distribution function, see qqplotr::geom_qq_band for more info

bandType

sets the type of confidence bands calculations. Default = "ks" (Kolmogorov-Smirnov test), for descriptions of the other options ("pointwise","boot","ts") see ?geom_qq_band

bandFill

sets the color of the confidence interval band

bandAlpha

sets the alpha ('see through' value) of the confidence interval band

xAxis

defines if the x-axis is shown

yAxis

defines if the x-axis is shown

vertical

if TRUE, flips x- and y-axis

xDefault

default is set to TRUE, together with xLimits, this can be used to define the exact range of the X-axis

xLimits

default = c(0,NA), together with xDefault, this can be used to define the exact range of the Y-axis

yDefault

default is set to TRUE, together with yLimits, this can be used to define the exact range of the Y-axis

yLimits

default = c(0,NA), together with yDefault, this can be used to define the exact range of the Y-axis

xLabel

specifies the label on the x-axis (theoretical)

yLabel

specifies the label on the y-axis (sample)

...

can be used to pass on other arguments to graphAdjust() (like xLimits, xExpand, etc)

Value

a ggplot object


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