View source: R/crw_coerce_sf.R
crw_as_sf | R Documentation |
Provides reliable conversion of "crwIS"
and "crwPredict"
objects
into simple features objects supported in the "sf"
package. Both
"sf"
objects with "POINT" geometry and "sfc_LINESTRING"
objects
are created. Coercion of "crwPredict"
objects to "sfc_LINESTRING"
has an option "group"
argument when the "crwPredict"
object
includes predictions from multiple deployments. The grouping column will be
used and a tibble of multiple "sf_LINESTRING"
objects will be returned
crw_as_sf(data, ftype, locType, group) ## S3 method for class 'crwIS' crw_as_sf(data, ftype, locType = c("p", "o", "f"), group = NULL, ...) ## S3 method for class 'crwPredict' crw_as_sf(data, ftype, locType = c("p", "o", "f"), group = NULL, ...) ## S3 method for class 'list' crw_as_sf(data, ftype, locType = c("p", "o", "f"), ...)
data |
an object of class |
ftype |
character of either "POINT" or "LINESTRING" specifying the feature type |
locType |
character vector of location points to include ("p","o") |
group |
(optional) character specifying the column to group by for multiple LINESTRING features |
... |
Additional arguments that are ignored |
crw_as_sf(crwIS)
: coerce crwIS object to sf (POINT or
LINESTRING geometry)
crw_as_sf(crwPredict)
: coerce crwPredict object to sf (POINT or
LINESTRING geometry)
crw_as_sf(list)
: coerce list of crwIS objects to sf (LINESTRING or
MULTILINESTRING geometry)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.