- using R Under development (unstable) (2025-12-07 r89119)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
Debian clang version 21.1.6 (2)
Debian flang version 21.1.6 (2)
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
- checking for file ‘sarp.snowprofile/DESCRIPTION’ ... OK
- this is package ‘sarp.snowprofile’ version ‘1.3.2’
- package encoding: UTF-8
- checking CRAN incoming feasibility ... [1s/2s] OK
- 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 ‘sarp.snowprofile’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... 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 ... [1s/1s] OK
- checking whether the package can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the package can be unloaded cleanly ... [0s/1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [0s/1s] OK
- checking whether the namespace can be unloaded cleanly ... [1s/1s] OK
- checking loading without being on the library search path ... [1s/1s] 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 ... [16s/21s] OK
- checking Rd files ... [1s/1s] 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 ... [0s/0s] 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 ... [1s/2s] ERROR
Running examples in ‘sarp.snowprofile-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: export.snowprofileCsv
> ### Title: Export or write a snowprofile object to a CSV table
> ### Aliases: export.snowprofileCsv
>
> ### ** Examples
>
>
> ## export an entire snowprofile object:
>
> export.snowprofileCsv(SPpairs$A_manual, filename = file.path(tempdir(), 'file.csv'),
+ export.all = TRUE)
>
>
> ## export only the layer properties of a snowprofile object,
> # and change the column order with few column names:
> # All layer variables will be exported, but the three ones provided in 'variables'
> # will be the first three columns of the csv table, and their column names will be changed
> # accordingly.
>
> export.snowprofileCsv(SPpairs$A_manual, filename = file.path(tempdir(), 'file.csv'),
+ export.all = 'Layers',
+ variables = list(height = 'height_top', hardness = 'hardness',
+ gtype = 'gt1'))
>
>
> ## export all layer properties of a snowprofile object plus the station ID:
>
> export.snowprofileCsv(SPpairs$A_manual, filename = file.path(tempdir(), 'file.csv'),
+ export.all = 'Layers', variables = list(station_id = 'station_id'))
>
> ## check the content of the exported csv file:
> csv_content <- read.csv(file.path(tempdir(), 'file.csv'))
> head(csv_content)
station_id depth thickness height hardness gtype gsize_avg gsize_max lwc
1 niviz_station 250 10 10 5 MFcr 1.5 1.5 D
2 niviz_station 230 20 30 3 FC 2.0 2.0 D
3 niviz_station 220 10 40 5 MFcr 1.5 1.5 D
4 niviz_station 157 63 103 4 RG 0.3 0.3 D
5 niviz_station 155 5 105 2 SH 5.0 5.0 D
6 niviz_station 95 60 165 4 RG 0.3 0.3 D
gtype_sec ddate
1 <NA> <NA>
2 <NA> <NA>
3 <NA> <NA>
4 <NA> <NA>
5 <NA> <NA>
6 <NA> <NA>
>
> ## or re-import the csv file as snowprofile object:
> csv_snowprofile <- snowprofileCsv(file.path(tempdir(), 'file.csv'))
Error in r[i1] - r[if (lag < (len <- length(r))) -len:-(len - lag + 1L) else i0] :
non-numeric argument to binary operator
Calls: snowprofileCsv ... format_snowprofileLayers -> snowprofileLayers -> diff -> diff.default
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [1s/3s] ERROR
Error(s) in re-building vignettes:
...
--- re-building ‘sarp.snowprofile.Rmd’ using rmarkdown
Quitting from sarp.snowprofile.Rmd:45-47 [unnamed-chunk-3]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `r[i1] - r[if (lag < (len <- length(r))) -len:-(len - lag + 1L) else i0]`:
! non-numeric argument to binary operator
---
Backtrace:
▆
1. └─sarp.snowprofile::snowprofile(dropNAs = FALSE)
2. ├─base::colnames(layers)
3. │ └─base::is.data.frame(x)
4. └─sarp.snowprofile::snowprofileLayers(dropNAs = FALSE, validate = FALSE)
5. ├─base::diff(sapply(entries[!is.na(entries)], length))
6. └─base::diff.default(sapply(entries[!is.na(entries)], length))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'sarp.snowprofile.Rmd' failed with diagnostics:
non-numeric argument to binary operator
--- failed re-building ‘sarp.snowprofile.Rmd’
SUMMARY: processing the following file failed:
‘sarp.snowprofile.Rmd’
Error: Vignette re-building failed.
Execution halted
- checking PDF version of manual ... [7s/9s] OK
- checking HTML version of manual ... [5s/7s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs