tests/testthat/test_corPlot.r

#tests for various correlation functions
#corPlot

R <- corPlot(attitude)
r <- cor(attitude)
test_that("correlations from CorPlot match cor", 
    expect_equivalent(R,r))
    
R <- corPlot(ability)
r <- cor(ability,use="pairwise")
test_that("correlations from CorPlot match cor with missing data", 
    expect_equivalent(R,r))  
    
R <- lowerCor(ability,show=FALSE)
r <- cor(ability,use="pairwise")
test_that("correlations from lowerCor match cor with missing data", 
    expect_equivalent(R,r))  

Try the psych package in your browser

Any scripts or data that you put into this service are public.

psych documentation built on June 27, 2024, 5:07 p.m.