transform.sf | R Documentation |
Can be used to create or modify attribute variables; for transforming geometries see
st_transform, and all other functions starting with st_
.
## S3 method for class 'sf'
transform(`_data`, ...)
_data |
object of class |
... |
Further arguments of the form |
a = data.frame(x1 = 1:3, x2 = 5:7)
st_geometry(a) = st_sfc(st_point(c(0,0)), st_point(c(1,1)), st_point(c(2,2)))
transform(a, x1_sq = x1^2)
transform(a, x1_x2 = x1*x2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.