- using R version 4.2.3 (2023-03-15)
- using platform: aarch64-apple-darwin20 (64-bit)
- using session charset: UTF-8
- checking for file ‘rtrend/DESCRIPTION’ ... OK
- this is package ‘rtrend’ version ‘0.1.5’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- 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 ‘rtrend’ can be installed ... [17s/20s] OK
See the install log for details.
- checking installed package size ... OK
- 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 R 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 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 ... [5s/5s] OK
- checking Rd files ... [0s/0s] OK
- checking Rd metadata ... 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 line endings in C/C++/Fortran sources/headers ... OK
- checking line endings in Makefiles ... OK
- checking compilation flags in Makevars ... OK
- checking for GNU extensions in Makefiles ... OK
- checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
- checking use of PKG_*FLAGS in Makefiles ... OK
- checking compiled code ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [2s/2s] ERROR
Running examples in ‘rtrend-Ex.R’ failed
The error most likely occurred in:
> ### Name: slope_rast
> ### Title: calculate slope of rast object
> ### Aliases: slope_rast rast_filter_time
>
> ### ** Examples
>
> library(rtrend)
> library(terra)
terra 1.7.71
>
> f <- system.file("rast/MOD15A2_LAI_China_G050_2001-2020.tif", package = "rtrend")
> r <- rast(f)
> r
class : SpatRaster
dimensions : 80, 140, 20 (nrow, ncol, nlyr)
resolution : 0.5, 0.5 (x, y)
extent : 70, 140, 15, 55 (xmin, xmax, ymin, ymax)
coord. ref. : lon/lat WGS 84 (EPSG:4326)
source : MOD15A2_LAI_China_G050_2001-2020.tif
names : LAI, LAI, LAI, LAI, LAI, LAI, ...
min values : 0.000000, 0.000000, 0.000000, 0.00000, 0.000000, 0.000000, ...
max values : 5.692542, 5.479348, 5.585326, 5.33587, 5.822826, 5.533152, ...
time : 978307200 to 1577836800
> time(r)
[1] 978307200 1009843200 1041379200 1072915200 1104537600 1136073600
[7] 1167609600 1199145600 1230768000 1262304000 1293840000 1325376000
[13] 1356998400 1388534400 1420070400 1451606400 1483228800 1514764800
[19] 1546300800 1577836800
>
> slp <- slope_rast(r,
+ period = c(2001, 2020),
+ outfile = "LAI_trend.tif", overwrite = TRUE,
+ fun = rtrend::slope_mk, .progress = "none"
+ )
Error in as.POSIXlt.numeric(x, tz = tz(x)) : 'origin' must be supplied
Calls: slope_rast ... year -> year.default -> as.POSIXlt -> as.POSIXlt.numeric
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [3s/3s] ERROR
Running ‘testthat.R’ [3s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
── Error ('test-slope_rast.R:9:3'): slope_rast works ───────────────────────────
Error in `as.POSIXlt.numeric(x, tz = tz(x))`: 'origin' must be supplied
Backtrace:
▆
1. ├─rtrend::slope_rast(...) at test-slope_rast.R:9:3
2. │ └─r %<>% rast_filter_time(period)
3. └─rtrend::rast_filter_time(., period)
4. ├─lubridate::year(time(r))
5. └─lubridate:::year.default(time(r))
6. ├─base::as.POSIXlt(x, tz = tz(x))
7. └─base::as.POSIXlt.numeric(x, tz = tz(x))
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 23 ]
Error: Test failures
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes in ‘inst/doc’ ... OK
- checking running R code from vignettes ... [0s/0s] NONE
‘slope_rast.Rmd’ using ‘UTF-8’... [0s/0s] OK
- checking re-building of vignette outputs ... [3s/3s] ERROR
Error(s) in re-building vignettes:
...
--- re-building ‘slope_rast.Rmd’ using rmarkdown
Quitting from lines 20-33 [setup] (slope_rast.Rmd)
Error: processing vignette 'slope_rast.Rmd' failed with diagnostics:
'origin' must be supplied
--- failed re-building ‘slope_rast.Rmd’
SUMMARY: processing the following file failed:
‘slope_rast.Rmd’
Error: Vignette re-building failed.
Execution halted
- checking PDF version of manual ... OK
- DONE
Status: 3 ERRORs
- using check arguments '--no-clean-on-error '