knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Test for normality

First of all we load the package

require(normtest)

Then, I provide an example with normal data along with print and summary methods.

set.seed(101)
x <- rnorm(10^2, 7, 1)
test <- normtest(x)
test
summary(test)

Here is an example with missing data.

y <- x; y[7] <- NA
normtest(y, na.rm = TRUE)

Another example with non normal data

z <- rlnorm(100, 7, 2)
normtest(z)


Lucapersio1391/normtest documentation built on May 9, 2019, 3:26 a.m.