@@ -77,12 +77,12 @@ x_sftime1
7777# > Bounding box: xmin: 1 ymin: 1 xmax: 2 ymax: 3
7878# > CRS: NA
7979# > Time column with classes: 'POSIXct', 'POSIXt'.
80- # > Ranging from 2026-05-04 19:40:42.443315 to 2026-05-07 19:40:42.443315 .
80+ # > Ranging from 2026-05-04 20:03:06.910009 to 2026-05-07 20:03:06.910009 .
8181# > a x_sfc time
82- # > 1 1 POINT (1 2) 2026-05-07 19:40:42
83- # > 2 2 POINT (1 3) 2026-05-06 19:40:42
84- # > 3 3 POINT (2 3) 2026-05-05 19:40:42
85- # > 4 4 POINT (2 1) 2026-05-04 19:40:42
82+ # > 1 1 POINT (1 2) 2026-05-07 20:03:06
83+ # > 2 2 POINT (1 3) 2026-05-06 20:03:06
84+ # > 3 3 POINT (2 3) 2026-05-05 20:03:06
85+ # > 4 4 POINT (2 1) 2026-05-04 20:03:06
8686```
8787
8888Methods for ` sftime ` objects are:
@@ -113,17 +113,17 @@ Functions to get or set the time column of an `sftime` object are:
113113
114114# get the values from the time column
115115st_time(x_sftime1 )
116- # > [1] "2026-05-07 19:40:42 UTC" "2026-05-06 19:40:42 UTC"
117- # > [3] "2026-05-05 19:40:42 UTC" "2026-05-04 19:40:42 UTC"
116+ # > [1] "2026-05-07 20:03:06 UTC" "2026-05-06 20:03:06 UTC"
117+ # > [3] "2026-05-05 20:03:06 UTC" "2026-05-04 20:03:06 UTC"
118118x_sftime1 $ time # alternative way
119- # > [1] "2026-05-07 19:40:42 UTC" "2026-05-06 19:40:42 UTC"
120- # > [3] "2026-05-05 19:40:42 UTC" "2026-05-04 19:40:42 UTC"
119+ # > [1] "2026-05-07 20:03:06 UTC" "2026-05-06 20:03:06 UTC"
120+ # > [3] "2026-05-05 20:03:06 UTC" "2026-05-04 20:03:06 UTC"
121121
122122# set the values in the time column
123123st_time(x_sftime1 ) <- Sys.time()
124124st_time(x_sftime1 )
125- # > [1] "2026-05-07 19:40:42 UTC" "2026-05-07 19:40:42 UTC"
126- # > [3] "2026-05-07 19:40:42 UTC" "2026-05-07 19:40:42 UTC"
125+ # > [1] "2026-05-07 20:03:07 UTC" "2026-05-07 20:03:07 UTC"
126+ # > [3] "2026-05-07 20:03:07 UTC" "2026-05-07 20:03:07 UTC"
127127
128128# drop the time column to convert an sftime object to an sf object
129129st_drop_time(x_sftime1 )
@@ -144,12 +144,12 @@ x_sftime1
144144# > Bounding box: xmin: 1 ymin: 1 xmax: 2 ymax: 3
145145# > CRS: NA
146146# > Time column with classes: 'POSIXct', 'POSIXt'.
147- # > Ranging from 2026-05-07 19:40:42.629831 to 2026-05-07 19:40:42.629831 .
147+ # > Ranging from 2026-05-07 20:03:07.098635 to 2026-05-07 20:03:07.098635 .
148148# > a x_sfc time
149- # > 1 1 POINT (1 2) 2026-05-07 19:40:42
150- # > 2 2 POINT (1 3) 2026-05-07 19:40:42
151- # > 3 3 POINT (2 3) 2026-05-07 19:40:42
152- # > 4 4 POINT (2 1) 2026-05-07 19:40:42
149+ # > 1 1 POINT (1 2) 2026-05-07 20:03:07
150+ # > 2 2 POINT (1 3) 2026-05-07 20:03:07
151+ # > 3 3 POINT (2 3) 2026-05-07 20:03:07
152+ # > 4 4 POINT (2 1) 2026-05-07 20:03:07
153153
154154# add a time column to an sf object converts it to an sftime object
155155st_time(x_sftime1 , time_column_name = " time" ) <- Sys.time()
@@ -348,8 +348,8 @@ subset the time column was introduced:
348348``` r
349349
350350st_time(x_sftime1 )
351- # > [1] "2026-05-07 19:40:42 UTC" "2026-05-07 19:40:42 UTC"
352- # > [3] "2026-05-07 19:40:42 UTC" "2026-05-07 19:40:42 UTC"
351+ # > [1] "2026-05-07 20:03:07 UTC" "2026-05-07 20:03:07 UTC"
352+ # > [3] "2026-05-07 20:03:07 UTC" "2026-05-07 20:03:07 UTC"
353353```
354354
355355Other subsetting functions work as for ` sf ` objects, e.g. selecting rows
@@ -370,22 +370,22 @@ x_sftime1[1, ]
370370# > Bounding box: xmin: 1 ymin: 2 xmax: 1 ymax: 2
371371# > CRS: NA
372372# > Time column with classes: 'POSIXct', 'POSIXt'.
373- # > Representing 2026-05-07 19:40:42.637647 .
373+ # > Representing 2026-05-07 20:03:07.106444 .
374374# > a x_sfc time
375- # > 1 1 POINT (1 2) 2026-05-07 19:40:42
375+ # > 1 1 POINT (1 2) 2026-05-07 20:03:07
376376x_sftime1 [, 3 ]
377377# > Spatiotemporal feature collection with 4 features and 0 fields
378378# > Geometry type: POINT
379379# > Dimension: XY
380380# > Bounding box: xmin: 1 ymin: 1 xmax: 2 ymax: 3
381381# > CRS: NA
382382# > Time column with classes: 'POSIXct', 'POSIXt'.
383- # > Ranging from 2026-05-07 19:40:42.637647 to 2026-05-07 19:40:42.637647 .
383+ # > Ranging from 2026-05-07 20:03:07.106444 to 2026-05-07 20:03:07.106444 .
384384# > time x_sfc
385- # > 1 2026-05-07 19:40:42 POINT (1 2)
386- # > 2 2026-05-07 19:40:42 POINT (1 3)
387- # > 3 2026-05-07 19:40:42 POINT (2 3)
388- # > 4 2026-05-07 19:40:42 POINT (2 1)
385+ # > 1 2026-05-07 20:03:07 POINT (1 2)
386+ # > 2 2026-05-07 20:03:07 POINT (1 3)
387+ # > 3 2026-05-07 20:03:07 POINT (2 3)
388+ # > 4 2026-05-07 20:03:07 POINT (2 1)
389389
390390# beware: the time column is not sticky. If omitted, the subset becomes an sf object
391391class(x_sftime1 [, 1 ])
0 commit comments