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

sp_frame(frame)

sp_unframe(sp_frame)

Arguments

frame

A sampling frame or analysis data

sp_frame

An sp_frame object.

Value

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

NE_Lakes <- sp_frame(NE_Lakes)
class(NE_Lakes)
#> [1] "sp_frame"   "sf"         "data.frame"
NE_Lakes <- sp_unframe(NE_Lakes)
class(NE_Lakes)
#> [1] "sf"         "data.frame"