transform.sftime: Transform method for 'sftime' objects

transform.sftimeR Documentation

Transform method for sftime objects

Description

Can be used to create or modify attribute variables; for transforming geometries see st_transform, and all other functions starting with st_.

Usage

## S3 method for class 'sftime'
transform(`_data`, ...)

Arguments

_data

An object of class sftime.

...

Further arguments of the form new_variable=expression

Value

_data (an sftime object) with modified attribute values (columns).

Examples

# 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))


sftime documentation built on Sept. 12, 2024, 6:18 a.m.