inst/tinytest/test_get_ratio.R

mtq <- mf_get_mtq()
expect_silent(mf_get_ratio(mtq, height = 6))
expect_silent(mf_get_ratio(mtq, width = 7))
expect_silent(mf_get_ratio(mtq))
expect_equal(mf_get_ratio(mtq, theme = "default"), c(7, 8.4))
expect_silent(mf_get_ratio(mtq, width = 3, expandBB = c(0, 0, 0, .3),
                           theme = "dark"))
expect_silent(mf_get_ratio(sf::st_transform(mtq, 4326)))
r <- terra::rast(system.file("ex/elev.tif", package = "terra"))
expect_silent(mf_get_ratio(r))

Try the mapsf package in your browser

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

mapsf documentation built on Nov. 21, 2023, 5:09 p.m.