Learn R Programming

spsurvey (version 5.5.1)

sp_frame: sp_frame objects

Description

Turn sampling frames or analysis data into an sp_frame object or transform sp_frame objects back into their original object.

Usage

sp_frame(frame)

sp_unframe(sp_frame)

Value

An sp_frame object.

Arguments

frame

A sampling frame or analysis data

sp_frame

An sp_frame object.

Details

The sp_frame() function assigns frame class sp_frame to be used by summary() and plot(). sp_frame() objects can sometimes clash with other sf and tidyverse generics, so un_spframe() removes class sp_frame(), leaving the original classes of frame intact.

Examples

Run this code
NE_Lakes <- sp_frame(NE_Lakes)
class(NE_Lakes)
NE_Lakes <- sp_unframe(NE_Lakes)
class(NE_Lakes)

Run the code above in your browser using DataLab