tests/testthat/test.newCdadata.R

context(".newCdadata")

test_that("check class of new object",  {


  newObject = .newCdadata()

  expect_is(newObject, "cdadata")

  expect_output(str(newObject), "List of 10")

  expect_named(newObject, c('objects', 'eigenvalues', 'eigenvaluesAsPercentages', 'cumulativePercentageOfEigenvalues', 'groupMeans', 'rank',
                            'coeffs.std', 'coeffs.raw', 'totalCanonicalStructure', 'canrsq'))

  expect_named(newObject$objects, c('ID', 'Population', 'Taxon', 'scores'))

})

Try the MorphoTools2 package in your browser

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

MorphoTools2 documentation built on March 7, 2023, 6:18 p.m.