tests/testthat/test-taxonomic_functions.R

# test for pbdb_subtaxa

context("pbdb_subtaxa")
test_that("pbdb_subtaxa output is a dataframe, and the names are characters", {
  data<-  pbdb_occurrences (limit="100", vocab="pbdb",
                            base_name="Canidae", show=c('phylo', 'ident') )
  
  response<- pbdb_subtaxa (data, do.plot=F)
  expect_true(is.data.frame (response))
  expect_is (names (response)[1], "character")
  expect_true (dim (response)[1]==1)
})

Try the paleobioDB package in your browser

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

paleobioDB documentation built on July 26, 2020, 1:07 a.m.