transform.sftime | R Documentation |
sftime
objectsCan 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 'sftime'
transform(`_data`, ...)
_data |
An object of class |
... |
Further arguments of the form new_variable=expression |
_data
(an sftime
object) with modified attribute values
(columns).
# create an sftime object
g <- st_sfc(st_point(c(1, 2)), st_point(c(1, 3)), st_point(c(2, 3)),
st_point(c(2, 1)), st_point(c(3, 1)))
x <-
data.frame(a = 1:5, g, time = Sys.time() + 1:5, stringsAsFactors = FALSE)
x_sftime <- st_as_sftime(x)
x_sftime
# modify values in column a
transform(x_sftime, a = rev(a))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.