diff --git a/articles/sftime.html b/articles/sftime.html index dfbc940..a92e64b 100644 --- a/articles/sftime.html +++ b/articles/sftime.html @@ -144,12 +144,12 @@

The sftime class#> Bounding box: xmin: 1 ymin: 1 xmax: 2 ymax: 3 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-08 07:24:22.832028 to 2024-09-11 07:24:22.832028. +#> Ranging from 2024-09-08 07:57:43.147894 to 2024-09-11 07:57:43.147894. #> a x_sfc time -#> 1 1 POINT (1 2) 2024-09-11 07:24:22 -#> 2 2 POINT (1 3) 2024-09-10 07:24:22 -#> 3 3 POINT (2 3) 2024-09-09 07:24:22 -#> 4 4 POINT (2 1) 2024-09-08 07:24:22 +#> 1 1 POINT (1 2) 2024-09-11 07:57:43 +#> 2 2 POINT (1 3) 2024-09-10 07:57:43 +#> 3 3 POINT (2 3) 2024-09-09 07:57:43 +#> 4 4 POINT (2 1) 2024-09-08 07:57:43

Methods for sftime objects are:

 methods(class = "sftime")
@@ -175,17 +175,17 @@ 

Functions t
 # get the values from the time column
 st_time(x_sftime1)
-#> [1] "2024-09-11 07:24:22 UTC" "2024-09-10 07:24:22 UTC"
-#> [3] "2024-09-09 07:24:22 UTC" "2024-09-08 07:24:22 UTC"
+#> [1] "2024-09-11 07:57:43 UTC" "2024-09-10 07:57:43 UTC"
+#> [3] "2024-09-09 07:57:43 UTC" "2024-09-08 07:57:43 UTC"
 x_sftime1$time # alternative way
-#> [1] "2024-09-11 07:24:22 UTC" "2024-09-10 07:24:22 UTC"
-#> [3] "2024-09-09 07:24:22 UTC" "2024-09-08 07:24:22 UTC"
+#> [1] "2024-09-11 07:57:43 UTC" "2024-09-10 07:57:43 UTC"
+#> [3] "2024-09-09 07:57:43 UTC" "2024-09-08 07:57:43 UTC"
 
 # set the values in the time column
 st_time(x_sftime1) <- Sys.time()
 st_time(x_sftime1)
-#> [1] "2024-09-11 07:24:23 UTC" "2024-09-11 07:24:23 UTC"
-#> [3] "2024-09-11 07:24:23 UTC" "2024-09-11 07:24:23 UTC"
+#> [1] "2024-09-11 07:57:43 UTC" "2024-09-11 07:57:43 UTC"
+#> [3] "2024-09-11 07:57:43 UTC" "2024-09-11 07:57:43 UTC"
 
 # drop the time column to convert an sftime object to an sf object
 st_drop_time(x_sftime1)
@@ -206,12 +206,12 @@ 

Functions t #> Bounding box: xmin: 1 ymin: 1 xmax: 2 ymax: 3 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:23.017823 to 2024-09-11 07:24:23.017823. +#> Ranging from 2024-09-11 07:57:43.334141 to 2024-09-11 07:57:43.334141. #> a x_sfc time -#> 1 1 POINT (1 2) 2024-09-11 07:24:23 -#> 2 2 POINT (1 3) 2024-09-11 07:24:23 -#> 3 3 POINT (2 3) 2024-09-11 07:24:23 -#> 4 4 POINT (2 1) 2024-09-11 07:24:23 +#> 1 1 POINT (1 2) 2024-09-11 07:57:43 +#> 2 2 POINT (1 3) 2024-09-11 07:57:43 +#> 3 3 POINT (2 3) 2024-09-11 07:57:43 +#> 4 4 POINT (2 1) 2024-09-11 07:57:43 # add a time column to an sf object converts it to an sftime object st_time(x_sftime1, time_column_name = "time") <- Sys.time() @@ -389,8 +389,8 @@

Subsetting
 st_time(x_sftime1)
-#> [1] "2024-09-11 07:24:23 UTC" "2024-09-11 07:24:23 UTC"
-#> [3] "2024-09-11 07:24:23 UTC" "2024-09-11 07:24:23 UTC"

+#> [1] "2024-09-11 07:57:43 UTC" "2024-09-11 07:57:43 UTC" +#> [3] "2024-09-11 07:57:43 UTC" "2024-09-11 07:57:43 UTC"

Other subsetting functions work as for sf objects, e.g. selecting rows by row indices returns the specified rows. A key difference is that the active time column of an sftime @@ -409,9 +409,9 @@

Subsetting#> Bounding box: xmin: 1 ymin: 2 xmax: 1 ymax: 2 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Representing 2024-09-11 07:24:23.031584. +#> Representing 2024-09-11 07:57:43.34778. #> a x_sfc time -#> 1 1 POINT (1 2) 2024-09-11 07:24:23 +#> 1 1 POINT (1 2) 2024-09-11 07:57:43 x_sftime1[, 3] #> Spatiotemporal feature collection with 4 features and 0 fields #> Geometry type: POINT @@ -419,12 +419,12 @@

Subsetting#> Bounding box: xmin: 1 ymin: 1 xmax: 2 ymax: 3 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:23.031584 to 2024-09-11 07:24:23.031584. +#> Ranging from 2024-09-11 07:57:43.34778 to 2024-09-11 07:57:43.34778. #> time x_sfc -#> 1 2024-09-11 07:24:23 POINT (1 2) -#> 2 2024-09-11 07:24:23 POINT (1 3) -#> 3 2024-09-11 07:24:23 POINT (2 3) -#> 4 2024-09-11 07:24:23 POINT (2 1) +#> 1 2024-09-11 07:57:43 POINT (1 2) +#> 2 2024-09-11 07:57:43 POINT (1 3) +#> 3 2024-09-11 07:57:43 POINT (2 3) +#> 4 2024-09-11 07:57:43 POINT (2 1) # beware: the time column is not sticky. If omitted, the subset becomes an sf object class(x_sftime1[, 1]) diff --git a/pkgdown.yml b/pkgdown.yml index 7513836..48714d5 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.1.0 pkgdown_sha: ~ articles: sftime: sftime.html -last_built: 2024-09-11T07:24Z +last_built: 2024-09-11T07:57Z urls: reference: https://r-spatial.github.io/sftime/reference article: https://r-spatial.github.io/sftime/articles diff --git a/reference/Rplot002.png b/reference/Rplot002.png index ac6b8a2..998ba46 100644 Binary files a/reference/Rplot002.png and b/reference/Rplot002.png differ diff --git a/reference/Rplot003.png b/reference/Rplot003.png index 33f5bbf..80bc854 100644 Binary files a/reference/Rplot003.png and b/reference/Rplot003.png differ diff --git a/reference/Rplot004.png b/reference/Rplot004.png index b8b6b32..04d52b7 100644 Binary files a/reference/Rplot004.png and b/reference/Rplot004.png differ diff --git a/reference/Rplot005.png b/reference/Rplot005.png index 9088f0e..d43984f 100644 Binary files a/reference/Rplot005.png and b/reference/Rplot005.png differ diff --git a/reference/bind.html b/reference/bind.html index 5b3232d..34cadd9 100644 --- a/reference/bind.html +++ b/reference/bind.html @@ -114,10 +114,10 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 4 ymax: 6 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:07.330507 to 2024-09-11 07:24:07.334407. +#> Ranging from 2024-09-11 07:57:28.064893 to 2024-09-11 07:57:28.06886. #> a geometry time -#> 1 3 POINT (1 2) 2024-09-11 07:24:07 -#> 2 4 POINT (4 6) 2024-09-11 07:24:07 +#> 1 3 POINT (1 2) 2024-09-11 07:57:28 +#> 2 4 POINT (4 6) 2024-09-11 07:57:28 if (FALSE) { # \dontrun{ st_time(x2) <- 1 @@ -132,9 +132,9 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 1 ymax: 2 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Representing 2024-09-11 07:24:07.330507. +#> Representing 2024-09-11 07:57:28.064893. #> a a.1 time.1 geometry geometry.1 time -#> 1 3 4 2024-09-11 07:24:07 POINT (1 2) POINT (4 6) 2024-09-11 07:24:07 +#> 1 3 4 2024-09-11 07:57:28 POINT (1 2) POINT (4 6) 2024-09-11 07:57:28 if (require(dplyr)) { # returns a data frame because names of sf and time column are modified: @@ -177,9 +177,9 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 1 ymax: 2 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Representing 2024-09-11 07:24:07.330507. +#> Representing 2024-09-11 07:57:28.064893. #> a...1 a...4 geometry time -#> 1 3 4 POINT (1 2) 2024-09-11 07:24:07 +#> 1 3 4 POINT (1 2) 2024-09-11 07:57:28 df <- data.frame(x = 3) st_sftime(data.frame(x1, df)) @@ -189,9 +189,9 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 1 ymax: 2 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Representing 2024-09-11 07:24:07.330507. +#> Representing 2024-09-11 07:57:28.064893. #> a x geometry time -#> 1 3 3 POINT (1 2) 2024-09-11 07:24:07 +#> 1 3 3 POINT (1 2) 2024-09-11 07:57:28 diff --git a/reference/geos_binary_ops-1.png b/reference/geos_binary_ops-1.png index 976fb91..9ae26d7 100644 Binary files a/reference/geos_binary_ops-1.png and b/reference/geos_binary_ops-1.png differ diff --git a/reference/geos_binary_ops-2.png b/reference/geos_binary_ops-2.png index 31cfeb7..44f6243 100644 Binary files a/reference/geos_binary_ops-2.png and b/reference/geos_binary_ops-2.png differ diff --git a/reference/geos_binary_ops-3.png b/reference/geos_binary_ops-3.png index 6bff52c..60ca522 100644 Binary files a/reference/geos_binary_ops-3.png and b/reference/geos_binary_ops-3.png differ diff --git a/reference/geos_binary_ops-4.png b/reference/geos_binary_ops-4.png index 3fddef1..61034b2 100644 Binary files a/reference/geos_binary_ops-4.png and b/reference/geos_binary_ops-4.png differ diff --git a/reference/geos_binary_ops-5.png b/reference/geos_binary_ops-5.png index cc5c193..2f5bf55 100644 Binary files a/reference/geos_binary_ops-5.png and b/reference/geos_binary_ops-5.png differ diff --git a/reference/geos_combine-2.png b/reference/geos_combine-2.png index d9ece48..7014ea0 100644 Binary files a/reference/geos_combine-2.png and b/reference/geos_combine-2.png differ diff --git a/reference/is_sortable.html b/reference/is_sortable.html index 6fb4837..c3ad0ff 100644 --- a/reference/is_sortable.html +++ b/reference/is_sortable.html @@ -74,9 +74,9 @@

DetailsExamples

x <- Sys.time() + 5:1 * 3600 * 24
 sort(x)
-#> [1] "2024-09-12 07:24:10 UTC" "2024-09-13 07:24:10 UTC"
-#> [3] "2024-09-14 07:24:10 UTC" "2024-09-15 07:24:10 UTC"
-#> [5] "2024-09-16 07:24:10 UTC"
+#> [1] "2024-09-12 07:57:30 UTC" "2024-09-13 07:57:30 UTC"
+#> [3] "2024-09-14 07:57:30 UTC" "2024-09-15 07:57:30 UTC"
+#> [5] "2024-09-16 07:57:30 UTC"
 is_sortable(x)
 #> [1] TRUE
 
diff --git a/reference/print.sftime.html b/reference/print.sftime.html
index 54ecfd8..2fef3ef 100644
--- a/reference/print.sftime.html
+++ b/reference/print.sftime.html
@@ -81,13 +81,13 @@ 

Examples#> Bounding box: xmin: 1 ymin: 1 xmax: 3 ymax: 3 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:11.697086 to 2024-09-11 07:24:15.697086. +#> Ranging from 2024-09-11 07:57:32.225044 to 2024-09-11 07:57:36.225044. #> a g time -#> 1 1 POINT (1 2) 2024-09-11 07:24:11 -#> 2 2 POINT (1 3) 2024-09-11 07:24:12 -#> 3 3 POINT (2 3) 2024-09-11 07:24:13 -#> 4 4 POINT (2 1) 2024-09-11 07:24:14 -#> 5 5 POINT (3 1) 2024-09-11 07:24:15 +#> 1 1 POINT (1 2) 2024-09-11 07:57:32 +#> 2 2 POINT (1 3) 2024-09-11 07:57:33 +#> 3 3 POINT (2 3) 2024-09-11 07:57:34 +#> 4 4 POINT (2 1) 2024-09-11 07:57:35 +#> 5 5 POINT (3 1) 2024-09-11 07:57:36 print(x[0, ]) #> Spatiotemporal feature collection with 0 features and 1 field #> Bounding box: xmin: NA ymin: NA xmax: NA ymax: NA diff --git a/reference/st_as_sftime.html b/reference/st_as_sftime.html index a2b94b9..f81c1a1 100644 --- a/reference/st_as_sftime.html +++ b/reference/st_as_sftime.html @@ -126,7 +126,7 @@

Argumentsagr -

A character vector; see the details section of st_sf.

+

A character vector; see the details section of st_sf.

coords
@@ -140,7 +140,7 @@

Argumentsdim -

Passed on to st_point (only when argument +

Passed on to st_point (only when argument coords is given).

@@ -325,19 +325,19 @@

Examples#> Bounding box: xmin: 0 ymin: 0 xmax: 1 ymax: 1 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:13.537388 to 2024-09-11 07:24:22.537388. +#> Ranging from 2024-09-11 07:57:34.089476 to 2024-09-11 07:57:43.089476. #> First 10 features: #> label geom time #> NA window POLYGON ((0 0, 1 0, 1 1, 0 ... <NA> -#> 1 segment LINESTRING (0.3203339 0.798... 2024-09-11 07:24:13 -#> 2 segment LINESTRING (0.4039816 0.366... 2024-09-11 07:24:14 -#> 3 segment LINESTRING (0.03262274 0.38... 2024-09-11 07:24:15 -#> 4 segment LINESTRING (0.4922266 0.673... 2024-09-11 07:24:16 -#> 5 segment LINESTRING (0.1416749 0.439... 2024-09-11 07:24:17 -#> 6 segment LINESTRING (0.7991584 0.712... 2024-09-11 07:24:18 -#> 7 segment LINESTRING (0.4091124 0.435... 2024-09-11 07:24:19 -#> 8 segment LINESTRING (0.9364347 0.665... 2024-09-11 07:24:20 -#> 9 segment LINESTRING (0.7329098 0.523... 2024-09-11 07:24:21 +#> 1 segment LINESTRING (0.3203339 0.798... 2024-09-11 07:57:34 +#> 2 segment LINESTRING (0.4039816 0.366... 2024-09-11 07:57:35 +#> 3 segment LINESTRING (0.03262274 0.38... 2024-09-11 07:57:36 +#> 4 segment LINESTRING (0.4922266 0.673... 2024-09-11 07:57:37 +#> 5 segment LINESTRING (0.1416749 0.439... 2024-09-11 07:57:38 +#> 6 segment LINESTRING (0.7991584 0.712... 2024-09-11 07:57:39 +#> 7 segment LINESTRING (0.4091124 0.435... 2024-09-11 07:57:40 +#> 8 segment LINESTRING (0.9364347 0.665... 2024-09-11 07:57:41 +#> 9 segment LINESTRING (0.7329098 0.523... 2024-09-11 07:57:42 # convert an lpp object to an sftime object (modified from the # spatstat.linnet package) @@ -385,7 +385,7 @@

Examples#> Bounding box: xmin: -3 ymin: -1 xmax: 3 ymax: 7 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:13.754417 to 2024-09-11 07:24:16.754417. +#> Ranging from 2024-09-11 07:57:34.305421 to 2024-09-11 07:57:37.305421. #> label seg tp a geom time #> 1 window NA NA NA POLYGON ((-3 -1, 3 -1, 3 7,... <NA> #> 2 segment NA NA NA LINESTRING (-2 0, -1 3) <NA> @@ -393,10 +393,10 @@

Examples#> 4 segment NA NA NA LINESTRING (0 6, 1 3) <NA> #> 5 segment NA NA NA LINESTRING (1 3, 2 0) <NA> #> 6 segment NA NA NA LINESTRING (-1 3, 1 3) <NA> -#> 7 point 1 0.5 1 POINT (-1.5 1.5) 2024-09-11 07:24:13 -#> 8 point 5 0.5 2 POINT (0 3) 2024-09-11 07:24:14 -#> 9 point 3 0.5 3 POINT (0.5 4.5) 2024-09-11 07:24:15 -#> 10 point 4 0.5 4 POINT (1.5 1.5) 2024-09-11 07:24:16 +#> 7 point 1 0.5 1 POINT (-1.5 1.5) 2024-09-11 07:57:34 +#> 8 point 5 0.5 2 POINT (0 3) 2024-09-11 07:57:35 +#> 9 point 3 0.5 3 POINT (0.5 4.5) 2024-09-11 07:57:36 +#> 10 point 4 0.5 4 POINT (1.5 1.5) 2024-09-11 07:57:37 # convert an sftrack object to an sftime object (modified from sftrack) if (require(sftrack)) { diff --git a/reference/st_crop.sftime-1.png b/reference/st_crop.sftime-1.png index a856843..8a40371 100644 Binary files a/reference/st_crop.sftime-1.png and b/reference/st_crop.sftime-1.png differ diff --git a/reference/st_geometry.html b/reference/st_geometry.html index 0c035bc..d29dc26 100644 --- a/reference/st_geometry.html +++ b/reference/st_geometry.html @@ -76,7 +76,7 @@

Examplesx <- st_sftime(a = 3, g, time = time) st_drop_geometry(x) #> a time -#> 1 3 2024-09-11 07:24:16 +#> 1 3 2024-09-11 07:57:37

diff --git a/reference/st_join.html b/reference/st_join.html index 01cc7fd..7b2a69c 100644 --- a/reference/st_join.html +++ b/reference/st_join.html @@ -140,12 +140,12 @@

Examples#> Bounding box: xmin: 1 ymin: 1 xmax: 3 ymax: 3 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:17.040842 to 2024-09-11 07:24:17.040842. +#> Ranging from 2024-09-11 07:57:37.487487 to 2024-09-11 07:57:37.487487. #> a.x a.y time.y geometry time.x -#> 1 1 NA <NA> POINT (1 1) 2024-09-11 07:24:17 -#> 2 2 12 2024-09-11 07:24:17 POINT (2 2) 2024-09-11 07:24:17 -#> 2.1 2 13 2024-09-11 07:24:17 POINT (2 2) 2024-09-11 07:24:17 -#> 3 3 14 2024-09-11 07:24:17 POINT (3 3) 2024-09-11 07:24:17 +#> 1 1 NA <NA> POINT (1 1) 2024-09-11 07:57:37 +#> 2 2 12 2024-09-11 07:57:37 POINT (2 2) 2024-09-11 07:57:37 +#> 2.1 2 13 2024-09-11 07:57:37 POINT (2 2) 2024-09-11 07:57:37 +#> 3 3 14 2024-09-11 07:57:37 POINT (3 3) 2024-09-11 07:57:37 # inner spatial join with st_intersects st_join(x1, x2, left = FALSE) @@ -155,11 +155,11 @@

Examples#> Bounding box: xmin: 2 ymin: 2 xmax: 3 ymax: 3 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:17.040842 to 2024-09-11 07:24:17.040842. +#> Ranging from 2024-09-11 07:57:37.487487 to 2024-09-11 07:57:37.487487. #> a.x a.y time.y geometry time.x -#> 2 2 12 2024-09-11 07:24:17 POINT (2 2) 2024-09-11 07:24:17 -#> 2.1 2 13 2024-09-11 07:24:17 POINT (2 2) 2024-09-11 07:24:17 -#> 3 3 14 2024-09-11 07:24:17 POINT (3 3) 2024-09-11 07:24:17 +#> 2 2 12 2024-09-11 07:57:37 POINT (2 2) 2024-09-11 07:57:37 +#> 2.1 2 13 2024-09-11 07:57:37 POINT (2 2) 2024-09-11 07:57:37 +#> 3 3 14 2024-09-11 07:57:37 POINT (3 3) 2024-09-11 07:57:37 ## st_filter @@ -170,10 +170,10 @@

Examples#> Bounding box: xmin: 2 ymin: 2 xmax: 3 ymax: 3 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:17.040842 to 2024-09-11 07:24:17.040842. +#> Ranging from 2024-09-11 07:57:37.487487 to 2024-09-11 07:57:37.487487. #> a geometry time -#> 1 2 POINT (2 2) 2024-09-11 07:24:17 -#> 2 3 POINT (3 3) 2024-09-11 07:24:17 +#> 1 2 POINT (2 2) 2024-09-11 07:57:37 +#> 2 3 POINT (3 3) 2024-09-11 07:57:37 st_filter(x2, x1) #> Spatiotemporal feature collection with 3 features and 1 field #> Geometry type: POINT @@ -181,11 +181,11 @@

Examples#> Bounding box: xmin: 2 ymin: 2 xmax: 3 ymax: 3 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:17.04383 to 2024-09-11 07:24:17.04383. +#> Ranging from 2024-09-11 07:57:37.490421 to 2024-09-11 07:57:37.490421. #> a geometry time -#> 1 12 POINT (2 2) 2024-09-11 07:24:17 -#> 2 13 POINT (2 2) 2024-09-11 07:24:17 -#> 3 14 POINT (3 3) 2024-09-11 07:24:17 +#> 1 12 POINT (2 2) 2024-09-11 07:57:37 +#> 2 13 POINT (2 2) 2024-09-11 07:57:37 +#> 3 14 POINT (3 3) 2024-09-11 07:57:37 diff --git a/reference/st_sftime.html b/reference/st_sftime.html index f4c6dc8..f399010 100644 --- a/reference/st_sftime.html +++ b/reference/st_sftime.html @@ -184,9 +184,9 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 1 ymax: 2 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Representing 2024-09-11 07:24:17.435802. +#> Representing 2024-09-11 07:57:37.888877. #> a g time -#> 1 3 POINT (1 2) 2024-09-11 07:24:17 +#> 1 3 POINT (1 2) 2024-09-11 07:57:37 ## construction with an sf object if (FALSE) { # \dontrun{ @@ -202,9 +202,9 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 1 ymax: 2 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Representing 2024-09-11 07:24:17.435802. +#> Representing 2024-09-11 07:57:37.888877. #> a g time -#> 1 3 POINT (1 2) 2024-09-11 07:24:17 +#> 1 3 POINT (1 2) 2024-09-11 07:57:37 ## Subsetting g <- st_sfc(st_point(c(1, 2)), st_point(c(1, 3)), st_point(c(2, 3)), @@ -220,9 +220,9 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 1 ymax: 2 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Representing 2024-09-11 07:24:18.445126. +#> Representing 2024-09-11 07:57:38.898146. #> a g time -#> 1 1 POINT (1 2) 2024-09-11 07:24:18 +#> 1 1 POINT (1 2) 2024-09-11 07:57:38 class(x[1, ]) #> [1] "sftime" "sf" "data.frame" @@ -233,10 +233,10 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 1 ymax: 3 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.445126 to 2024-09-11 07:24:19.445126. +#> Ranging from 2024-09-11 07:57:38.898146 to 2024-09-11 07:57:39.898146. #> a g time -#> 1 1 POINT (1 2) 2024-09-11 07:24:18 -#> 2 2 POINT (1 3) 2024-09-11 07:24:19 +#> 1 1 POINT (1 2) 2024-09-11 07:57:38 +#> 2 2 POINT (1 3) 2024-09-11 07:57:39 class(x[x$a < 3, ]) #> [1] "sftime" "sf" "data.frame" @@ -264,21 +264,21 @@

Examples#> Bounding box: xmin: 1 ymin: 1 xmax: 3 ymax: 3 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.445126 to 2024-09-11 07:24:22.445126. +#> Ranging from 2024-09-11 07:57:38.898146 to 2024-09-11 07:57:42.898146. #> time g -#> 1 2024-09-11 07:24:18 POINT (1 2) -#> 2 2024-09-11 07:24:19 POINT (1 3) -#> 3 2024-09-11 07:24:20 POINT (2 3) -#> 4 2024-09-11 07:24:21 POINT (2 1) -#> 5 2024-09-11 07:24:22 POINT (3 1) +#> 1 2024-09-11 07:57:38 POINT (1 2) +#> 2 2024-09-11 07:57:39 POINT (1 3) +#> 3 2024-09-11 07:57:40 POINT (2 3) +#> 4 2024-09-11 07:57:41 POINT (2 1) +#> 5 2024-09-11 07:57:42 POINT (3 1) class(x[, 3]) # keeps time column because it is explicitly selected, #> [1] "sftime" "sf" "data.frame" # keeps geometry column of sf object, returns an sftime object x[, 3, drop = TRUE] -#> [1] "2024-09-11 07:24:18 UTC" "2024-09-11 07:24:19 UTC" -#> [3] "2024-09-11 07:24:20 UTC" "2024-09-11 07:24:21 UTC" -#> [5] "2024-09-11 07:24:22 UTC" +#> [1] "2024-09-11 07:57:38 UTC" "2024-09-11 07:57:39 UTC" +#> [3] "2024-09-11 07:57:40 UTC" "2024-09-11 07:57:41 UTC" +#> [5] "2024-09-11 07:57:42 UTC" class(x[, 3, drop = TRUE]) # if the geometry column is dropped, not only the #> [1] "POSIXct" "POSIXt" # sf class is dropped, but also the sftime class @@ -307,13 +307,13 @@

Examples#> Bounding box: xmin: 1 ymin: 1 xmax: 3 ymax: 3 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.445126 to 2024-09-11 07:24:22.445126. +#> Ranging from 2024-09-11 07:57:38.898146 to 2024-09-11 07:57:42.898146. #> a time g -#> 1 1 2024-09-11 07:24:18 POINT (1 2) -#> 2 2 2024-09-11 07:24:19 POINT (1 3) -#> 3 3 2024-09-11 07:24:20 POINT (2 3) -#> 4 4 2024-09-11 07:24:21 POINT (2 1) -#> 5 5 2024-09-11 07:24:22 POINT (3 1) +#> 1 1 2024-09-11 07:57:38 POINT (1 2) +#> 2 2 2024-09-11 07:57:39 POINT (1 3) +#> 3 3 2024-09-11 07:57:40 POINT (2 3) +#> 4 4 2024-09-11 07:57:41 POINT (2 1) +#> 5 5 2024-09-11 07:57:42 POINT (3 1) class(x[c("a", "time")]) # keeps the time column #> [1] "sftime" "sf" "data.frame" @@ -328,8 +328,8 @@

Examples#> Bounding box: xmin: 1 ymin: 1 xmax: 2 ymax: 2 #> CRS: NA #> a g time -#> 1 1 POINT (1 2) 2024-09-11 07:24:18 -#> 4 4 POINT (2 1) 2024-09-11 07:24:21 +#> 1 1 POINT (1 2) 2024-09-11 07:57:38 +#> 4 4 POINT (2 1) 2024-09-11 07:57:41 class(x[h, ]) # returns sftime object #> [1] "sf" "data.frame" diff --git a/reference/st_time.html b/reference/st_time.html index 54525d2..525c37e 100644 --- a/reference/st_time.html +++ b/reference/st_time.html @@ -115,7 +115,7 @@

Examplestime <- Sys.time() x <- st_sftime(a = 3, g, time = time) st_time(x) -#> [1] "2024-09-11 07:24:18 UTC" +#> [1] "2024-09-11 07:57:38 UTC" ## assign a vector with time information @@ -129,9 +129,9 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 1 ymax: 2 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Representing 2024-09-11 07:24:18.139286. +#> Representing 2024-09-11 07:57:38.608423. #> a g time -#> 1 3 POINT (1 2) 2024-09-11 07:24:18 +#> 1 3 POINT (1 2) 2024-09-11 07:57:38 # to sftime object x <- st_sftime(a = 3, g, time = time) diff --git a/reference/tidyverse.html b/reference/tidyverse.html index a439e95..19fdb63 100644 --- a/reference/tidyverse.html +++ b/reference/tidyverse.html @@ -411,10 +411,10 @@

Examples#> Bounding box: xmin: 2 ymin: 8 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a time.y geometry.x geometry.y time.x -#> 1 2 2024-09-11 07:24:18 POINT (5 8) POINT (4 6) 2024-09-11 07:24:18 -#> 2 3 2024-09-11 07:24:18 POINT (2 9) POINT (4 6) 2024-09-11 07:24:18 +#> 1 2 2024-09-11 07:57:39 POINT (5 8) POINT (4 6) 2024-09-11 07:57:39 +#> 2 3 2024-09-11 07:57:39 POINT (2 9) POINT (4 6) 2024-09-11 07:57:39 # time.x and the active geometry column geometry.x inner_join(x2, as.data.frame(x1), by = "a") @@ -425,10 +425,10 @@

Examples#> Bounding box: xmin: 4 ymin: 6 xmax: 4 ymax: 6 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.6 to 2024-09-11 07:24:18.6. +#> Ranging from 2024-09-11 07:57:39.077952 to 2024-09-11 07:57:39.077952. #> a time.y geometry.x geometry.y time.x -#> 1 2 2024-09-11 07:24:18 POINT (4 6) POINT (5 8) 2024-09-11 07:24:18 -#> 2 3 2024-09-11 07:24:18 POINT (4 6) POINT (2 9) 2024-09-11 07:24:18 +#> 1 2 2024-09-11 07:57:39 POINT (4 6) POINT (5 8) 2024-09-11 07:57:39 +#> 2 3 2024-09-11 07:57:39 POINT (4 6) POINT (2 9) 2024-09-11 07:57:39 ## left_join left_join(x1, as.data.frame(x2), by = "a") @@ -439,11 +439,11 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a time.y geometry.x geometry.y time.x -#> 1 1 <NA> POINT (1 2) POINT EMPTY 2024-09-11 07:24:18 -#> 2 2 2024-09-11 07:24:18 POINT (5 8) POINT (4 6) 2024-09-11 07:24:18 -#> 3 3 2024-09-11 07:24:18 POINT (2 9) POINT (4 6) 2024-09-11 07:24:18 +#> 1 1 <NA> POINT (1 2) POINT EMPTY 2024-09-11 07:57:39 +#> 2 2 2024-09-11 07:57:39 POINT (5 8) POINT (4 6) 2024-09-11 07:57:39 +#> 3 3 2024-09-11 07:57:39 POINT (2 9) POINT (4 6) 2024-09-11 07:57:39 left_join(x2, as.data.frame(x1), by = "a") #> Spatiotemporal feature collection with 3 features and 2 fields @@ -453,11 +453,11 @@

Examples#> Bounding box: xmin: 4 ymin: 6 xmax: 4 ymax: 6 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.6 to 2024-09-11 07:24:18.6. +#> Ranging from 2024-09-11 07:57:39.077952 to 2024-09-11 07:57:39.077952. #> a time.y geometry.x geometry.y time.x -#> 1 2 2024-09-11 07:24:18 POINT (4 6) POINT (5 8) 2024-09-11 07:24:18 -#> 2 3 2024-09-11 07:24:18 POINT (4 6) POINT (2 9) 2024-09-11 07:24:18 -#> 3 4 <NA> POINT (4 6) POINT EMPTY 2024-09-11 07:24:18 +#> 1 2 2024-09-11 07:57:39 POINT (4 6) POINT (5 8) 2024-09-11 07:57:39 +#> 2 3 2024-09-11 07:57:39 POINT (4 6) POINT (2 9) 2024-09-11 07:57:39 +#> 3 4 <NA> POINT (4 6) POINT EMPTY 2024-09-11 07:57:39 ## right_join right_join(x1, as.data.frame(x2), by = "a") @@ -468,11 +468,11 @@

Examples#> Bounding box: xmin: 2 ymin: 8 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a time.y geometry.x geometry.y time.x -#> 1 2 2024-09-11 07:24:18 POINT (5 8) POINT (4 6) 2024-09-11 07:24:18 -#> 2 3 2024-09-11 07:24:18 POINT (2 9) POINT (4 6) 2024-09-11 07:24:18 -#> 3 4 2024-09-11 07:24:18 POINT EMPTY POINT (4 6) <NA> +#> 1 2 2024-09-11 07:57:39 POINT (5 8) POINT (4 6) 2024-09-11 07:57:39 +#> 2 3 2024-09-11 07:57:39 POINT (2 9) POINT (4 6) 2024-09-11 07:57:39 +#> 3 4 2024-09-11 07:57:39 POINT EMPTY POINT (4 6) <NA> right_join(x2, as.data.frame(x1), by = "a") #> Spatiotemporal feature collection with 3 features and 2 fields @@ -482,11 +482,11 @@

Examples#> Bounding box: xmin: 4 ymin: 6 xmax: 4 ymax: 6 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.6 to 2024-09-11 07:24:18.6. +#> Ranging from 2024-09-11 07:57:39.077952 to 2024-09-11 07:57:39.077952. #> a time.y geometry.x geometry.y time.x -#> 1 2 2024-09-11 07:24:18 POINT (4 6) POINT (5 8) 2024-09-11 07:24:18 -#> 2 3 2024-09-11 07:24:18 POINT (4 6) POINT (2 9) 2024-09-11 07:24:18 -#> 3 1 2024-09-11 07:24:18 POINT EMPTY POINT (1 2) <NA> +#> 1 2 2024-09-11 07:57:39 POINT (4 6) POINT (5 8) 2024-09-11 07:57:39 +#> 2 3 2024-09-11 07:57:39 POINT (4 6) POINT (2 9) 2024-09-11 07:57:39 +#> 3 1 2024-09-11 07:57:39 POINT EMPTY POINT (1 2) <NA> ## full_join full_join(x1, as.data.frame(x2), by = "a") @@ -497,12 +497,12 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a time.y geometry.x geometry.y time.x -#> 1 1 <NA> POINT (1 2) POINT EMPTY 2024-09-11 07:24:18 -#> 2 2 2024-09-11 07:24:18 POINT (5 8) POINT (4 6) 2024-09-11 07:24:18 -#> 3 3 2024-09-11 07:24:18 POINT (2 9) POINT (4 6) 2024-09-11 07:24:18 -#> 4 4 2024-09-11 07:24:18 POINT EMPTY POINT (4 6) <NA> +#> 1 1 <NA> POINT (1 2) POINT EMPTY 2024-09-11 07:57:39 +#> 2 2 2024-09-11 07:57:39 POINT (5 8) POINT (4 6) 2024-09-11 07:57:39 +#> 3 3 2024-09-11 07:57:39 POINT (2 9) POINT (4 6) 2024-09-11 07:57:39 +#> 4 4 2024-09-11 07:57:39 POINT EMPTY POINT (4 6) <NA> full_join(x2, as.data.frame(x1), by = "a") #> Spatiotemporal feature collection with 4 features and 2 fields @@ -512,12 +512,12 @@

Examples#> Bounding box: xmin: 4 ymin: 6 xmax: 4 ymax: 6 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.6 to 2024-09-11 07:24:18.6. +#> Ranging from 2024-09-11 07:57:39.077952 to 2024-09-11 07:57:39.077952. #> a time.y geometry.x geometry.y time.x -#> 1 2 2024-09-11 07:24:18 POINT (4 6) POINT (5 8) 2024-09-11 07:24:18 -#> 2 3 2024-09-11 07:24:18 POINT (4 6) POINT (2 9) 2024-09-11 07:24:18 -#> 3 4 <NA> POINT (4 6) POINT EMPTY 2024-09-11 07:24:18 -#> 4 1 2024-09-11 07:24:18 POINT EMPTY POINT (1 2) <NA> +#> 1 2 2024-09-11 07:57:39 POINT (4 6) POINT (5 8) 2024-09-11 07:57:39 +#> 2 3 2024-09-11 07:57:39 POINT (4 6) POINT (2 9) 2024-09-11 07:57:39 +#> 3 4 <NA> POINT (4 6) POINT EMPTY 2024-09-11 07:57:39 +#> 4 1 2024-09-11 07:57:39 POINT EMPTY POINT (1 2) <NA> ## semi_join semi_join(x1, as.data.frame(x2), by = "a") @@ -527,10 +527,10 @@

Examples#> Bounding box: xmin: 2 ymin: 8 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a geometry time -#> 1 2 POINT (5 8) 2024-09-11 07:24:18 -#> 2 3 POINT (2 9) 2024-09-11 07:24:18 +#> 1 2 POINT (5 8) 2024-09-11 07:57:39 +#> 2 3 POINT (2 9) 2024-09-11 07:57:39 semi_join(x2, as.data.frame(x1), by = "a") #> Spatiotemporal feature collection with 2 features and 1 field @@ -539,10 +539,10 @@

Examples#> Bounding box: xmin: 4 ymin: 6 xmax: 4 ymax: 6 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.6 to 2024-09-11 07:24:18.6. +#> Ranging from 2024-09-11 07:57:39.077952 to 2024-09-11 07:57:39.077952. #> a geometry time -#> 1 2 POINT (4 6) 2024-09-11 07:24:18 -#> 2 3 POINT (4 6) 2024-09-11 07:24:18 +#> 1 2 POINT (4 6) 2024-09-11 07:57:39 +#> 2 3 POINT (4 6) 2024-09-11 07:57:39 ## anti_join anti_join(x1, as.data.frame(x2), by = "a") @@ -552,9 +552,9 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 1 ymax: 2 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Representing 2024-09-11 07:24:18.596993. +#> Representing 2024-09-11 07:57:39.074949. #> a geometry time -#> 1 1 POINT (1 2) 2024-09-11 07:24:18 +#> 1 1 POINT (1 2) 2024-09-11 07:57:39 anti_join(x2, as.data.frame(x1), by = "a") #> Spatiotemporal feature collection with 1 feature and 1 field @@ -563,9 +563,9 @@

Examples#> Bounding box: xmin: 4 ymin: 6 xmax: 4 ymax: 6 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Representing 2024-09-11 07:24:18.6. +#> Representing 2024-09-11 07:57:39.077952. #> a geometry time -#> 1 4 POINT (4 6) 2024-09-11 07:24:18 +#> 1 4 POINT (4 6) 2024-09-11 07:57:39 ## filter filter(x1, a <= 2) @@ -575,10 +575,10 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 8 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a geometry time -#> 1 1 POINT (1 2) 2024-09-11 07:24:18 -#> 2 2 POINT (5 8) 2024-09-11 07:24:18 +#> 1 1 POINT (1 2) 2024-09-11 07:57:39 +#> 2 2 POINT (5 8) 2024-09-11 07:57:39 ## arrange arrange(x1, dplyr::desc(a)) @@ -588,11 +588,11 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a time geometry -#> 1 3 2024-09-11 07:24:18 POINT (2 9) -#> 2 2 2024-09-11 07:24:18 POINT (5 8) -#> 3 1 2024-09-11 07:24:18 POINT (1 2) +#> 1 3 2024-09-11 07:57:39 POINT (2 9) +#> 2 2 2024-09-11 07:57:39 POINT (5 8) +#> 3 1 2024-09-11 07:57:39 POINT (1 2) ## group_by group_by(x1, time) @@ -602,14 +602,14 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> # A tibble: 3 × 3 #> # Groups: time [1] #> a geometry time #> * <int> <POINT> <dttm> -#> 1 1 (1 2) 2024-09-11 07:24:18 -#> 2 2 (5 8) 2024-09-11 07:24:18 -#> 3 3 (2 9) 2024-09-11 07:24:18 +#> 1 1 (1 2) 2024-09-11 07:57:39 +#> 2 2 (5 8) 2024-09-11 07:57:39 +#> 3 3 (2 9) 2024-09-11 07:57:39 ## ungroup ungroup(group_by(x1, time)) @@ -619,13 +619,13 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> # A tibble: 3 × 3 #> a geometry time #> * <int> <POINT> <dttm> -#> 1 1 (1 2) 2024-09-11 07:24:18 -#> 2 2 (5 8) 2024-09-11 07:24:18 -#> 3 3 (2 9) 2024-09-11 07:24:18 +#> 1 1 (1 2) 2024-09-11 07:57:39 +#> 2 2 (5 8) 2024-09-11 07:57:39 +#> 3 3 (2 9) 2024-09-11 07:57:39 ## rowwise x1 %>% @@ -638,14 +638,14 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> # A tibble: 3 × 5 #> # Rowwise: #> a geometry time a1 a2 #> * <int> <POINT> <dttm> <int> <int> -#> 1 1 (1 2) 2024-09-11 07:24:18 5 1 -#> 2 2 (5 8) 2024-09-11 07:24:18 6 2 -#> 3 3 (2 9) 2024-09-11 07:24:18 7 3 +#> 1 1 (1 2) 2024-09-11 07:57:39 5 1 +#> 2 2 (5 8) 2024-09-11 07:57:39 6 2 +#> 3 3 (2 9) 2024-09-11 07:57:39 7 3 ## mutate x1 %>% @@ -656,11 +656,11 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a geometry time a1 -#> 1 1 POINT (1 2) 2024-09-11 07:24:18 5 -#> 2 2 POINT (5 8) 2024-09-11 07:24:18 6 -#> 3 3 POINT (2 9) 2024-09-11 07:24:18 7 +#> 1 1 POINT (1 2) 2024-09-11 07:57:39 5 +#> 2 2 POINT (5 8) 2024-09-11 07:57:39 6 +#> 3 3 POINT (2 9) 2024-09-11 07:57:39 7 ## transmute x1 %>% @@ -698,11 +698,11 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a1 time geometry -#> 1 1 2024-09-11 07:24:18 POINT (1 2) -#> 2 2 2024-09-11 07:24:18 POINT (5 8) -#> 3 3 2024-09-11 07:24:18 POINT (2 9) +#> 1 1 2024-09-11 07:57:39 POINT (1 2) +#> 2 2 2024-09-11 07:57:39 POINT (5 8) +#> 3 3 2024-09-11 07:57:39 POINT (2 9) ## slice x1 %>% @@ -713,10 +713,10 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 8 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a time geometry -#> 1 1 2024-09-11 07:24:18 POINT (1 2) -#> 2 2 2024-09-11 07:24:18 POINT (5 8) +#> 1 1 2024-09-11 07:57:39 POINT (1 2) +#> 2 2 2024-09-11 07:57:39 POINT (5 8) ## summarise x1 %>% @@ -727,9 +727,9 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Representing 2024-09-11 07:24:18.596993. +#> Representing 2024-09-11 07:57:39.074949. #> time geometry -#> 1 2024-09-11 07:24:18 MULTIPOINT ((1 2), (2 9), (... +#> 1 2024-09-11 07:57:39 MULTIPOINT ((1 2), (2 9), (... x1 %>% summarize(time = mean(time)) @@ -739,9 +739,9 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Representing 2024-09-11 07:24:18.596993. +#> Representing 2024-09-11 07:57:39.074949. #> time geometry -#> 1 2024-09-11 07:24:18 MULTIPOINT ((1 2), (2 9), (... +#> 1 2024-09-11 07:57:39 MULTIPOINT ((1 2), (2 9), (... ## distinct x1 %>% @@ -767,14 +767,14 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> time key value geometry -#> 1 2024-09-11 07:24:18 a 1 POINT (1 2) -#> 2 2024-09-11 07:24:18 a 2 POINT (5 8) -#> 3 2024-09-11 07:24:18 a 3 POINT (2 9) -#> 4 2024-09-11 07:24:18 a1 5 POINT (1 2) -#> 5 2024-09-11 07:24:18 a1 6 POINT (5 8) -#> 6 2024-09-11 07:24:18 a1 7 POINT (2 9) +#> 1 2024-09-11 07:57:39 a 1 POINT (1 2) +#> 2 2024-09-11 07:57:39 a 2 POINT (5 8) +#> 3 2024-09-11 07:57:39 a 3 POINT (2 9) +#> 4 2024-09-11 07:57:39 a1 5 POINT (1 2) +#> 5 2024-09-11 07:57:39 a1 6 POINT (5 8) +#> 6 2024-09-11 07:57:39 a1 7 POINT (2 9) ## pivot_longer x1 %>% @@ -786,16 +786,16 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> # A tibble: 6 × 4 #> geometry time variable value #> * <POINT> <dttm> <chr> <int> -#> 1 (1 2) 2024-09-11 07:24:18 a 1 -#> 2 (1 2) 2024-09-11 07:24:18 a1 5 -#> 3 (5 8) 2024-09-11 07:24:18 a 2 -#> 4 (5 8) 2024-09-11 07:24:18 a1 6 -#> 5 (2 9) 2024-09-11 07:24:18 a 3 -#> 6 (2 9) 2024-09-11 07:24:18 a1 7 +#> 1 (1 2) 2024-09-11 07:57:39 a 1 +#> 2 (1 2) 2024-09-11 07:57:39 a1 5 +#> 3 (5 8) 2024-09-11 07:57:39 a 2 +#> 4 (5 8) 2024-09-11 07:57:39 a1 6 +#> 5 (2 9) 2024-09-11 07:57:39 a 3 +#> 6 (2 9) 2024-09-11 07:57:39 a1 7 ## spread x1 %>% @@ -808,11 +808,11 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> time a a1 geometry -#> 1 2024-09-11 07:24:18 1 5 POINT (1 2) -#> 2 2024-09-11 07:24:18 2 6 POINT (5 8) -#> 3 2024-09-11 07:24:18 3 7 POINT (2 9) +#> 1 2024-09-11 07:57:39 1 5 POINT (1 2) +#> 2 2024-09-11 07:57:39 2 6 POINT (5 8) +#> 3 2024-09-11 07:57:39 3 7 POINT (2 9) ## sample_n set.seed(234) @@ -824,18 +824,18 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a time geometry -#> 1 1 2024-09-11 07:24:18 POINT (1 2) -#> 2 3 2024-09-11 07:24:18 POINT (2 9) -#> 3 2 2024-09-11 07:24:18 POINT (5 8) -#> 4 2 2024-09-11 07:24:18 POINT (5 8) -#> 5 2 2024-09-11 07:24:18 POINT (5 8) -#> 6 2 2024-09-11 07:24:18 POINT (5 8) -#> 7 1 2024-09-11 07:24:18 POINT (1 2) -#> 8 1 2024-09-11 07:24:18 POINT (1 2) -#> 9 3 2024-09-11 07:24:18 POINT (2 9) -#> 10 2 2024-09-11 07:24:18 POINT (5 8) +#> 1 1 2024-09-11 07:57:39 POINT (1 2) +#> 2 3 2024-09-11 07:57:39 POINT (2 9) +#> 3 2 2024-09-11 07:57:39 POINT (5 8) +#> 4 2 2024-09-11 07:57:39 POINT (5 8) +#> 5 2 2024-09-11 07:57:39 POINT (5 8) +#> 6 2 2024-09-11 07:57:39 POINT (5 8) +#> 7 1 2024-09-11 07:57:39 POINT (1 2) +#> 8 1 2024-09-11 07:57:39 POINT (1 2) +#> 9 3 2024-09-11 07:57:39 POINT (2 9) +#> 10 2 2024-09-11 07:57:39 POINT (5 8) ## sample_frac x1 %>% @@ -847,17 +847,17 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 2 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a time geometry -#> 1 1 2024-09-11 07:24:18 POINT (1 2) -#> 2 1 2024-09-11 07:24:18 POINT (1 2) -#> 3 3 2024-09-11 07:24:18 POINT (2 9) +#> 1 1 2024-09-11 07:57:39 POINT (1 2) +#> 2 1 2024-09-11 07:57:39 POINT (1 2) +#> 3 3 2024-09-11 07:57:39 POINT (2 9) ## nest x1 %>% nest(a1 = -time) #> time a1 -#> 1 2024-09-11 07:24:18 1, 2, 3, 1, 2, 5, 8, 2, 9 +#> 1 2024-09-11 07:57:39 1, 2, 3, 1, 2, 5, 8, 2, 9 ## unnest x1 %>% @@ -869,14 +869,14 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> # A tibble: 4 × 4 #> a geometry time a1 #> * <int> <POINT> <dttm> <dbl> -#> 1 1 (1 2) 2024-09-11 07:24:18 1 -#> 2 2 (5 8) 2024-09-11 07:24:18 1 -#> 3 2 (5 8) 2024-09-11 07:24:18 2 -#> 4 3 (2 9) 2024-09-11 07:24:18 5 +#> 1 1 (1 2) 2024-09-11 07:57:39 1 +#> 2 2 (5 8) 2024-09-11 07:57:39 1 +#> 3 2 (5 8) 2024-09-11 07:57:39 2 +#> 4 3 (2 9) 2024-09-11 07:57:39 5 ## separate x1 %>% @@ -888,11 +888,11 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a time A B geometry -#> 1 1 2024-09-11 07:24:18 <NA> <NA> POINT (1 2) -#> 2 2 2024-09-11 07:24:18 a b POINT (5 8) -#> 3 3 2024-09-11 07:24:18 a d POINT (2 9) +#> 1 1 2024-09-11 07:57:39 <NA> <NA> POINT (1 2) +#> 2 2 2024-09-11 07:57:39 a b POINT (5 8) +#> 3 3 2024-09-11 07:57:39 a d POINT (2 9) ## unite x1 %>% @@ -905,11 +905,11 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a time col geometry -#> 1 1 2024-09-11 07:24:18 NA_NA POINT (1 2) -#> 2 2 2024-09-11 07:24:18 a_b POINT (5 8) -#> 3 3 2024-09-11 07:24:18 a_d POINT (2 9) +#> 1 1 2024-09-11 07:57:39 NA_NA POINT (1 2) +#> 2 2 2024-09-11 07:57:39 a_b POINT (5 8) +#> 3 3 2024-09-11 07:57:39 a_d POINT (2 9) ## separate_rows x1 %>% @@ -921,16 +921,16 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> # A tibble: 6 × 4 #> a geometry time z #> * <int> <POINT> <dttm> <int> -#> 1 1 (1 2) 2024-09-11 07:24:18 1 -#> 2 2 (5 8) 2024-09-11 07:24:18 2 -#> 3 2 (5 8) 2024-09-11 07:24:18 3 -#> 4 2 (5 8) 2024-09-11 07:24:18 4 -#> 5 3 (2 9) 2024-09-11 07:24:18 5 -#> 6 3 (2 9) 2024-09-11 07:24:18 6 +#> 1 1 (1 2) 2024-09-11 07:57:39 1 +#> 2 2 (5 8) 2024-09-11 07:57:39 2 +#> 3 2 (5 8) 2024-09-11 07:57:39 3 +#> 4 2 (5 8) 2024-09-11 07:57:39 4 +#> 5 3 (2 9) 2024-09-11 07:57:39 5 +#> 6 3 (2 9) 2024-09-11 07:57:39 6 ## drop_na x1 %>% @@ -942,10 +942,10 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 5 ymax: 8 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a time z geometry -#> 1 1 2024-09-11 07:24:18 1 POINT (1 2) -#> 2 2 2024-09-11 07:24:18 2 POINT (5 8) +#> 1 1 2024-09-11 07:57:39 1 POINT (1 2) +#> 2 2 2024-09-11 07:57:39 2 POINT (5 8) x1 %>% mutate(z = c(1, NA, NA)) %>% @@ -956,9 +956,9 @@

Examples#> Bounding box: xmin: 1 ymin: 2 xmax: 1 ymax: 2 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Representing 2024-09-11 07:24:18.596993. +#> Representing 2024-09-11 07:57:39.074949. #> a time z geometry -#> 1 1 2024-09-11 07:24:18 1 POINT (1 2) +#> 1 1 2024-09-11 07:57:39 1 POINT (1 2) x1 %>% mutate(time = replace(time, 1, NA)) %>% @@ -969,10 +969,10 @@

Examples#> Bounding box: xmin: 2 ymin: 8 xmax: 5 ymax: 9 #> CRS: NA #> Time column with classes: 'POSIXct', 'POSIXt'. -#> Ranging from 2024-09-11 07:24:18.596993 to 2024-09-11 07:24:18.596993. +#> Ranging from 2024-09-11 07:57:39.074949 to 2024-09-11 07:57:39.074949. #> a time geometry -#> 1 2 2024-09-11 07:24:18 POINT (5 8) -#> 2 3 2024-09-11 07:24:18 POINT (2 9) +#> 1 2 2024-09-11 07:57:39 POINT (5 8) +#> 2 3 2024-09-11 07:57:39 POINT (2 9)