- using R Under development (unstable) (2024-07-18 r86905)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-14 (GCC) 14.1.0
GNU Fortran (GCC) 14.1.0
- running under: Fedora Linux 36 (Workstation Edition)
- using session charset: UTF-8
- using option ‘--no-stop-on-test-error’
- checking for file ‘stplanr/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘stplanr’ version ‘1.2.1’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... NOTE
Package suggested but not available for checking: ‘rsgeo’
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘stplanr’ can be installed ... [12s/15s] OK
See the install log for details.
- checking package directory ... OK
- checking ‘build’ directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... OK
- checking whether the package can be loaded with stated dependencies ... OK
- checking whether the package can be unloaded cleanly ... OK
- checking whether the namespace can be loaded with stated dependencies ... OK
- checking whether the namespace can be unloaded cleanly ... OK
- checking loading without being on the library search path ... OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [18s/23s] OK
- checking Rd files ... OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking contents of ‘data’ directory ... OK
- checking data for non-ASCII characters ... OK
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... ERROR
Running examples in ‘stplanr-Ex.R’ failed
The error most likely occurred in:
> ### Name: line_segment
> ### Title: Divide an sf object with LINESTRING geometry into regular
> ### segments
> ### Aliases: line_segment
>
> ### ** Examples
>
> library(sf)
Linking to GEOS 3.10.2, GDAL 3.4.3, PROJ 8.2.1; sf_use_s2() is TRUE
> l <- routes_fast_sf[2:4, "ID"]
> l_seg_multi <- line_segment(l, segment_length = 1000, use_rsgeo = FALSE)
> l_seg_n <- line_segment(l, n_segments = 2)
Setting n_segments to 2 for all lines
Warning in use_rsgeo(l) : rsgeo not installed, using lwgeom
> l_seg_n <- line_segment(l, n_segments = c(1:3))
Warning in use_rsgeo(l) : rsgeo not installed, using lwgeom
> # Number of subsegments
> table(l_seg_multi$ID)
3 4 5
3 3 2
> plot(l_seg_multi["ID"])
> plot(l_seg_multi$geometry, col = seq_along(l_seg_multi), lwd = 5)
> round(st_length(l_seg_multi))
Units: [m]
[1] 1013 1014 955 875 770 647 986 881
> # rsgeo implementation (default if available):
> if (rlang::is_installed("rsgeo")) {
+ rsmulti = line_segment(l, segment_length = 1000, use_rsgeo = TRUE)
+ plot(rsmulti["ID"])
+ }
> # Check they have the same total length, to nearest mm:
> # round(sum(st_length(l_seg_multi)), 3) == round(sum(st_length(rsmulti)), 3)
> # With n_segments for 1 line:
> l_seg_multi_n <- line_segment(l[1, ], n_segments = 3, use_rsgeo = FALSE)
> l_seg_multi_n <- line_segment(l$geometry[1], n_segments = 3, use_rsgeo = FALSE)
> l_seg_multi_n <- line_segment(l$geometry[1], n_segments = 3, use_rsgeo = TRUE)
Error in loadNamespace(x) : there is no package called ‘rsgeo’
Calls: line_segment ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... OK
Running ‘testthat.R’
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [63s/101s] OK
- checking PDF version of manual ... [12s/19s] OK
- checking HTML version of manual ... [6s/11s] OK
- checking for non-standard things in the check directory ... OK
- checking for detritus in the temp directory ... OK
- DONE
Status: 1 ERROR, 1 NOTE