Learn R Programming

sandwichr (version 1.0.4)

load.data.shp: Load shapefiles into sfs

Description

Convert shapefiles into a list of sf objects.

Usage

load.data.shp(sampling.file,
       ssh.file,
       reporting.file)

Value

A list of sf objects.

Arguments

sampling.file

Path to the sampling layer. The sampling layer should be a point sf object that contains an attribute to be interpolated.

ssh.file

Path to the SSH layer. The SSH layer should be a polygon sf object.

reporting.file

Path to the reporting layer. The reporting layer should be a polygon sf object.

Examples

Run this code
sim.sampling.name <- system.file("extdata", "sim.sampling.shp",
                                 package="sandwichr")
sim.ssh.name <- system.file("extdata", "sim.ssh.shp",
                            package="sandwichr")
sim.reporting.name <- system.file("extdata", "sim.reporting.shp",
                                  package="sandwichr")

sim.data <- load.data.shp(sampling.file=sim.sampling.name,
                          ssh.file=sim.ssh.name,
                          reporting.file=sim.reporting.name)

Run the code above in your browser using DataLab