View source: R/csb_projectXY.R
csb_projectXY | R Documentation |
csb_projectXY
converts srx and sry data into a simple features object.
You can write a shapefile directly from the output of this function using sf::st_write
.
csb_projectXY(.data, varX, varY, crs)
.data |
A tibble or data frame |
varX |
Name of column containing x coordinate data |
varY |
Name of column containing y coordinate data |
crs |
Optional; coordinate reference system for the data to be projected into |
Returns a sf object of the input data projected as point data.
# remove missing coordinates prior to projecting
csb <- csb_missingXY(january_2018, srx, sry, newVar = missing)
csb <- dplyr::filter(csb, missing == FALSE)
# project data
csb_projectXY(csb, srx, sry)
# project with a custom crs
csb_projectXY(csb, srx, sry, crs = 4269)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.