tests/testthat/test_get_point_data.R

context('point_data_queries')


test_that(
  'get_soils_point fails where it oughta',
  c(
    expect_error(get_soils_point('NAT', 'CLY', 'VAL', 1, c(151, -27),
                                 buff_shp = 'phantom')),
    expect_error(get_soils_point('NAT', 'CLY', 'VAL', 1, c(151, -27),
                                 buff_shp = 'circle', stat = c('mean', 'median'))),
    expect_error(get_soils_point('TAS', 'CEC',  'VAL', 1, c(151, -27)))
  )
)

test_that(
  'get_lscape_point fails where it oughta',
  c(
    expect_error(get_lscape_point('SLPPC', c(151, -27),
                                  buff_shp = 'phantom')),
    expect_error(get_lscape_point('SLPPC', c(151, -27),
                                  buff_shp = 'circle', stat = c('mean', 'median')))
  )
)

Try the slga package in your browser

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

slga documentation built on June 12, 2021, 9:07 a.m.