tests/testthat/test-aw.R

context("aw")

data(net)
net <- sf::st_as_sf(net[1:10, ])

data(pc_profile)
p1 <- pc_profile[, 1]

test_that("aw works", {
  aw1 <- aw(pc = net$ldv*0.75,
            lcv = net$ldv*0.1,
            hgv = net$hdv,
            bus = net$hdv*0.1,
            mc = net$ldv*0.15,
            p_pc = p1,
            p_lcv = p1,
            p_hgv = p1,
            p_bus = p1,
            p_mc = p1)
  expect_equal(round(aw1$V1[1]), 1)
})

Try the vein package in your browser

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

vein documentation built on May 29, 2024, 7:20 a.m.