# load iris dataset
data(iris)
# estimated within-class covariance matrix (dividing by n-k)
getWithin(iris[,1:4], iris[,5])
# compared to the within-class covariance matrix (dividing by n-1)
withinCov(iris[,1:4], iris[,5])Run the code above in your browser using DataLab