Skip to contents

Prints an sftime object

Usage

# S3 method for sftime
print(x, ..., n = getOption("sf_max_print", default = 10))

Arguments

x

An object of class sftime.

...

Currently unused arguments, for compatibility.

n

Numeric value; maximum number of printed elements.

Value

x (invisible).

Examples

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)))
tc <- Sys.time() + 1:5
x <- st_sftime(a = 1:5, g, time = tc)
print(x)
#> Spatiotemporal feature collection with 5 features and 1 field
#> Geometry type: POINT
#> Dimension:     XY
#> Bounding box:  xmin: 1 ymin: 1 xmax: 3 ymax: 3
#> CRS:           NA
#> Time column with classes: 'POSIXct', 'POSIXt'.
#> Ranging from 2023-09-01 10:23:26.408508 to 2023-09-01 10:23:30.408508.
#>   a           g                time
#> 1 1 POINT (1 2) 2023-09-01 10:23:26
#> 2 2 POINT (1 3) 2023-09-01 10:23:27
#> 3 3 POINT (2 3) 2023-09-01 10:23:28
#> 4 4 POINT (2 1) 2023-09-01 10:23:29
#> 5 5 POINT (3 1) 2023-09-01 10:23:30
print(x[0, ])
#> Spatiotemporal feature collection with 0 features and 1 field
#> Bounding box:  xmin: NA ymin: NA xmax: NA ymax: NA
#> CRS:           NA
#> Time column with classes: 'POSIXct', 'POSIXt'.
#> Ranging from NA to NA.
#> [1] a    g    time
#> <0 rows> (or 0-length row.names)