tests/testthat/test_NEC.R

library(statanacoseq)
context("Check for the correct calculation of effective numbers of codons")

  test_that("Check if Nc calculation form Fuglsang 2004 equals the one from Wright 1990",
            expect_equal(vhica::CUB(sequence=mylist(whatout=1)),  unlist(lapply(mylist(whatout=1), function(x) {ComputeNEC(c2s(x))})))
  )
fredysiegrist/statanacoseq documentation built on May 16, 2019, 2:44 p.m.