transform method for sf objects
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 new_variable=expression |
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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.