Learn R Programming

normality (version 0.0.3)

is_normal: Normality test

Description

A handy wrapper for data normality assessment using the Shapiro-Wilk-Royston, D'Agostino-Pearson, and Anderson-Darling tests.

Usage

is_normal(data, formula = NULL, alpha = 0.05, sensitivity = 2, summary = FALSE)

Value

A boolean value (or a list if summary = TRUE).

Arguments

data

A data frame or a numeric vector.

formula

Formula (default: NULL). If data is a data frame, define the val ~ group.

alpha

Significance threshold, range from 0 to 1 (default: 0.05).

sensitivity

Numeric, range from 1 to 3 (default: 2). The greater the value, the greater chance to consider as non-normal.

summary

Logical (default: FALSE). If TRUE, show the summary table.

Examples

Run this code
is_normal(iris, Sepal.Length ~ Species)

Run the code above in your browser using DataLab