#### Load extra libraries
library(sp)
library(sf)
### Read in a shapefile of the contiguous U.S. from package data
system.path <- system.file("extdata", "us.shape48.shp", package = "ref.ICAR", mustWork = TRUE)
shp.layer <- gsub('.shp','',basename(system.path))
shp.path <- dirname(system.path)
us.shape48 <- st_read(dsn = path.expand(shp.path), layer = shp.layer)
shp.data <- shape.H(system.path)
names(shp.data)
Run the code above in your browser using DataLab