Learn R Programming

MVN (version 6.1)

univariate_diagnostic_plot: Diagnostic Plots for Univariate and Multivariate Data

Description

Generates QQ plots, histograms with density overlays, boxplots, or scatterplot matrices for numeric data (vector, matrix, or data frame).

Usage

univariate_diagnostic_plot(
  data,
  type = c("qq", "histogram", "boxplot", "scatter"),
  title = NULL,
  interactive = FALSE
)

Arguments

data

A numeric vector, matrix, or data frame with observations in rows and variables in columns.

type

Character; type of plot. One of: "qq", "histogram", "boxplot", "scatter". Default selects the first.

title

Character; plot title.

interactive

Logical; if TRUE, renders the plot interactively using plotly.

Examples

Run this code
if (FALSE) {
data <- iris[1:50, 1:3]
univariate_diagnostic_plot(data, type = "histogram")
univariate_diagnostic_plot(data, type = "qq")
univariate_diagnostic_plot(data, type = "boxplot")
univariate_diagnostic_plot(data, type = "scatter", interactive = TRUE)
}

Run the code above in your browser using DataLab