tests/testthat/test-reconcileOSDGeomorph.R

context("reconcileOSDGeomorph")

## tests
library(aqp, quietly = TRUE)


test_that("reconcileOSDGeomorph works as expected", {
  
  # use local data
  data("OSDexamples")
  
  # test entire suite of geomorphic proportion matrices
  for(i in c('hillpos', 'geomcomp', 'flats', 'mtnpos', 'terrace', 'shape_across', 'shape_down')) {
    o <- reconcileOSDGeomorph(OSDexamples, selection = i)
  
    # number of profiles in SPC should equal number of rows in geom prop mat  
    expect_true(
      length(o$SPC) == nrow(o$geom)
    )
  }
  
})

Try the sharpshootR package in your browser

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

sharpshootR documentation built on Oct. 23, 2024, 1:06 a.m.