df <- tablefreq(iris[, c("Sepal.Length","Petal.Length")])
identical(meanfreq(df[,c(1,3)]), mean(iris[,1]))
identical(sdfreq(df[,c(1,3)]), sd(iris[,c("Sepal.Length")]))
all.equal(covfreq(df), cov(iris[,c("Sepal.Length","Petal.Length")],use="pairwise.complete.obs"))
Run the code above in your browser using DataLab