knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.