test_that("conversion works",
{
expect_equal(epsg_to_crs(4326L), CRS("+init=epsg:4326"))
expect_equal(epsg_to_crs(3347L), CRS("+init=epsg:3347"))
expect_equal(epsg_to_crs(3348L), CRS("+init=epsg:3348"))
expect_equal(epsg_to_crs(3857L), CRS("+init=epsg:3857"))
})
test_that("proper errors are raised",
{
expect_error(epsg_to_crs(3L))
expect_error(epsg_to_crs(4376.242))
expect_error(epsg_to_crs(3347.242))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.