geomorphR/geomorph

Error in digit.fixed()

Closed this issue · 4 comments

I'm following the 3d digitizing tutorial (https://cran.r-project.org/web/packages/geomorph/vignettes/geomorph.digitize3D.html). With the example code:

library(geomorph)
data("scallopPLY")
my.ply <- scallopPLY$ply

fixed.lms1 <- digit.fixed(spec = my.ply, fixed = 5)

Right-clicking on any vertex of the scallop gives an error to the console:

Error in (0 <= wz) && (wz <= 1) : 
  'length = 7575' in coercion to 'logical(1)'

I think this might be related to the recent change in R 4.3:

Calling && or || with LHS or (if evaluated) RHS of length greater than one is now always an error, with a report of the form 'length = 4' in coercion to 'logical(1)'

as the error message looks similar.

My sessionInfo:

R version 4.3.0 beta (2023-04-11 r84222)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.3.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Chicago
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] geomorph_4.0.5.999 Matrix_1.5-4       rgl_1.1.3          RRPP_1.3.1        

loaded via a namespace (and not attached):
 [1] gtable_0.3.3      xfun_0.39         ggplot2_3.4.2     htmlwidgets_1.6.2 devtools_2.4.5   
 [6] remotes_2.4.2     processx_3.8.1    lattice_0.21-8    callr_3.7.3       vctrs_0.6.2      
[11] tools_4.3.0       ps_1.7.5          generics_0.1.3    curl_5.0.0        parallel_4.3.0   
[16] tibble_3.2.1      fansi_1.0.4       pkgconfig_2.0.3   desc_1.4.2        lifecycle_1.0.3  
[21] compiler_4.3.0    stringr_1.5.0     munsell_0.5.0     httpuv_1.6.11     htmltools_0.5.5  
[26] usethis_2.1.6     later_1.3.1       pillar_1.9.0      crayon_1.5.2      urlchecker_1.0.1 
[31] ellipsis_0.3.2    cachem_1.0.8      sessioninfo_1.2.2 nlme_3.1-162      mime_0.12        
[36] tidyselect_1.2.0  digest_0.6.31     stringi_1.7.12    dplyr_1.1.2       purrr_1.0.1      
[41] rprojroot_2.0.3   fastmap_1.1.1     grid_4.3.0        colorspace_2.1-0  cli_3.6.1        
[46] magrittr_2.0.3    base64enc_0.1-3   pkgbuild_1.4.0    utf8_1.2.3        ape_5.7-1        
[51] withr_2.5.0       prettyunits_1.1.1 scales_1.2.1      promises_1.2.0.1  jpeg_0.1-10      
[56] memoise_2.0.1     shiny_1.7.4       knitr_1.42        miniUI_0.1.1.1    profvis_0.3.8    
[61] rlang_1.1.1       Rcpp_1.0.10       xtable_1.8-4      glue_1.6.2        pkgload_1.3.2    
[66] rstudioapi_0.14   jsonlite_1.8.4    R6_2.5.1          fs_1.6.2         

Dear Dean,

could you specify the issue within the RGL package? I would like to open a bug report, but for that more information on the issue is needed.

With best regards
Bern

I do not see the problem any longer. I attempted to digitize a ply file without error. Perhaps RGL updated.