Skip to contents

Prints an sftime object

Usage

# S3 method for class '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 2024-09-13 09:15:12.981912 to 2024-09-13 09:15:16.981912.
#>   a           g                time
#> 1 1 POINT (1 2) 2024-09-13 09:15:12
#> 2 2 POINT (1 3) 2024-09-13 09:15:13
#> 3 3 POINT (2 3) 2024-09-13 09:15:14
#> 4 4 POINT (2 1) 2024-09-13 09:15:15
#> 5 5 POINT (3 1) 2024-09-13 09:15:16
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)