tests/testthat/test-spacejamr.R

library(spacejamr)

skip_on_os("solaris")

test_that("we can create spacejamr objects", {

    path <- system.file("shape", "ri.shp", package = "spacejamr")
    ri <- as.spacejamr(path)

    # Ensures the correct class
    expect_identical(class(ri), c("spacejamr", "owin"))

    # Ensures the correct length
    expect_equal(length(ri), 2)

    # Ensures the correct names for elements in the spacejamr class
    expect_identical(names(ri), c("window", "crs"))
})

Try the spacejamr package in your browser

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

spacejamr documentation built on April 2, 2022, 1:07 a.m.