tests/testthat/test-no_scientific.R

pacman::p_load("testthat","popgen.stats")

context("no_scientific function")

test_that("Converted away from scientific notation correctly",{
  x<-2.4e8
  test<-no_scientific(x)
  expect_equal(test,format(x,scientific = F,trim = T))

  x<-0
  test<-no_scientific(x)
  expect_equal(test,format(x,scientific = F,trim = T))

  x<--6.7e-10
  test<-no_scientific(x)
  expect_equal(test,format(x,scientific = F,trim = T))
} )
deponent-verb/popgen.stats documentation built on Nov. 4, 2019, 10:26 a.m.