Learn R Programming

AnalysisLin (version 0.1.2)

qq_plot: QQ Plots for Numerical Variables

Description

This function generates QQ plots for all numerical variables in the input data frame. QQ plots are valuable for assessing the distributional similarity between observed data and a theoretical normal distribution. It acts as a guide, revealing deviations from the expected norm, outliers, and the contours of distribution tails.

Usage

qq_plot(
  data,
  color = "skyblue",
  subplot = FALSE,
  nrow = 2,
  margin = 0.1,
  html = FALSE
)

Value

A list of QQ plots.

Arguments

data

The input data frame containing numerical variables.

color

The color of the QQ plot line (default: "skyblue").

subplot

A logical argument (default: FALSE) indicating whether to create subplots.

nrow

Number of rows for subplots (if subplot is TRUE, default: 2).

margin

Margin for subplots (if subplot is TRUE, default: 0.1).

html

Whether the output should be in HTML format,used when knitting into HTML. Default is FALSE.

Examples

Run this code
data(mtcars)
qq_plot(mtcars)

Run the code above in your browser using DataLab