tests/testthat/test-get_SDA_cosurfmorph.R

test_that("get_SDA_cosurfmorph works", {
  
  skip_on_cran()
  
  skip_if_offline()
  
   # Summarize by 3D geomorphic components by component name (default `by='compname'`)
  x <- get_SDA_cosurfmorph(WHERE = "areasymbol = 'CA630'")
  skip_if(is.null(x))
  expect_true(inherits(x, 'data.frame'))
  
   # Whole Soil Survey Area summary (using `by = 'areasymbol'`)
  x <- get_SDA_cosurfmorph(WHERE = "areasymbol = 'CA630'", by = 'areasymbol')
  skip_if(is.null(x))
  expect_true(inherits(x, 'data.frame'))

   # 2D Hillslope Position summary(using `table = 'cosurfmorphhpp'`)
  x <- get_SDA_cosurfmorph(WHERE = "areasymbol = 'CA630'", table = 'cosurfmorphhpp')
  skip_if(is.null(x))
  expect_true(inherits(x, 'data.frame'))

   # Surface Shape summary (using `table = 'cosurfmorphss'`)
  x <- get_SDA_cosurfmorph(WHERE = "areasymbol = 'CA630'", table = 'cosurfmorphss')
  skip_if(is.null(x))
  expect_true(inherits(x, 'data.frame'))
})

Try the soilDB package in your browser

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

soilDB documentation built on June 22, 2024, 9:53 a.m.