forestgeo/fgeo.analyze

tt_test example gives an error

ValentineHerr opened this issue · 2 comments

The example in the help file of tt_test gives an error.

(NOTE: I don't think I'll use that function, but I just wanted to give a heads up about it here)

library(fgeo.tool)
assert_is_installed("fgeo.x")

# Example data
tree <- fgeo.x::tree6_3species
Error: 'tree6_3species' is not an exported object from 'namespace:fgeo.x'
elevation <- fgeo.x::elevation
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] fgeo.tool_1.2.2           fgeo.analyze_1.1.4        fgeo.abundance_0.0.0.9006 fgeo_0.0.0.9002          
 [5] rlang_0.3.1               fgeo.base_0.0.0.9001      stringr_1.3.1             MuMIn_1.42.1             
 [9] lme4_1.1-21               Matrix_1.2-15             sm_2.2-5.6                jpeg_0.1-8               
[13] raster_2.8-4              sp_1.3-1                  SDMTools_1.1-221         

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0                 pillar_1.3.1               compiler_3.5.1             nloptr_1.2.1              
 [5] fgeo.ctfs_0.0.0.9003       R.methodsS3_1.7.1          R.utils_2.7.0              tools_3.5.1               
 [9] drat_0.1.5                 boot_1.3-20                tibble_2.0.1               nlme_3.1-137              
[13] lattice_0.20-35            pkgconfig_2.0.2            fgeo.demography_0.0.0.9103 cli_1.0.1                 
[17] rstudioapi_0.10            yaml_2.2.0                 rgdal_1.3-6                parallel_3.5.1            
[21] dplyr_0.8.0.1              stats4_3.5.1               grid_3.5.1                 tidyselect_0.2.5          
[25] glue_1.3.0                 R6_2.3.0                   tcltk_3.5.1                minqa_1.2.4               
[29] purrr_0.3.2                magrittr_1.5               codetools_0.2-15           MASS_7.3-51.1             
[33] splines_3.5.1              assertthat_0.2.0           fgeo.x_1.1.2               stringi_1.2.4             
[37] crayon_1.3.4               R.oo_1.22.0               

Thanks Valentine. I can't reproduce your error, which is suprising because you seem to have the latest version of fgeo.x.

Can you please try again after closing all other R sessions, restarting R, and reinstalling fgeo.x?

tree <- fgeo.x::tree6_3species
head(tree)
#>   treeID stemID    tag StemTag     sp quadrat     gx     gy MeasureID
#> 1    180    225 100171  100174 CASARB     921 164.61 409.50    617049
#> 2    631    775  10069   10069 PREMON     213  38.30 245.30    598429
#> 3   1380   1702 101560  101560 CASARB     820 141.86 385.80    614023
#> 4   1840   2240  10208   10208 PREMON     613 115.52 245.40    607825
#> 5   2849   3421 103156  103156 CASARB     420  79.25 389.29    603814
#> 6   3354   4054 103756  103756 CASARB     220  32.01 384.61    599273
#>   CensusID   dbh  pom  hom  ExactDate DFstatus         codes nostems
#> 1        6  46.1 1.35 1.34 2016-08-04    alive      SPROUT;A       2
#> 2        6 139.0 1.25 1.25 2016-04-21    alive        MAIN;A       1
#> 3        6    NA <NA>   NA 2016-08-01     dead    MAIN;DEADT       1
#> 4        6 161.0  1.3 1.28 2016-04-27    alive        MAIN;A       1
#> 5        6  60.0  1.3 1.30 2016-07-27    alive        MAIN;A       1
#> 6        6    NA <NA>   NA 2016-07-20     dead MAIN;DEADT;ST       2
#>   status  date
#> 1      A 20670
#> 2      A 20565
#> 3      D 20667
#> 4      A 20571
#> 5      A 20662
#> 6      D 20655

packageVersion("fgeo.x")
#> [1] '1.1.2'

Created on 2019-05-08 by the reprex package (v0.2.1)

that worked... weird.
Sorry, I should have tried that first.
Thanks!