R/qqNormalPlot.R

Defines functions qqNormalPlot

Documented in qqNormalPlot

################################################################################
#
#' Normal quantile-quantile plot
#'
#' @param x A numeric vector
#'
#' @returns NULL
#'
#' @examples
#' # qqNormalPlot() with data from a SMART survey in Kabul, Afghanistan
#' # (dist.ex01)
#' svy <- dist.ex01
#' qqNormalPlot(svy$muac)
#' qqNormalPlot(svy$haz)
#' qqNormalPlot(svy$waz)
#' qqNormalPlot(svy$whz)
#'
#' @export
#'
#
################################################################################

qqNormalPlot <- function(x) {
  main = paste("Normal Q-Q plot for ", deparse(substitute(x)), sep = "")
  stats::qqnorm(x, main = main,
                xlab = "Expected", ylab = "Observed",
                frame.plot = FALSE)
  stats::qqline(x)
}

Try the nipnTK package in your browser

Any scripts or data that you put into this service are public.

nipnTK documentation built on June 22, 2024, 11:06 a.m.