Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

df issue in udTreeDomain() within biomass() #36

Open
Ikurahodiok opened this issue Nov 2, 2022 · 0 comments
Open

df issue in udTreeDomain() within biomass() #36

Ikurahodiok opened this issue Nov 2, 2022 · 0 comments

Comments

@Ikurahodiok
Copy link

Intro

Hi,
I was trying to run the biomass() function in reproducing some open scripts (run_assessment_areas.R) which use the rFIA library.

The error I get is not particularly insightful and I was wondering if biomass() + udTreeDomain() had beed tested yet following the recent release of .csv's from the DataMart? (potentially related issue no.35)

Many thanks in advance,
Harry

Error message in udTreeDomain()

udTreeDomain(db, treeDomain)

Error in `$<-.data.frame`(`*tmp*`, "tD", value = 1) : 
  replacement has 1 row, data has 0

The most similar error message I can find relates to df shape.

Reproducible Example and SystemInfo

I have attached a reproducible example in in my GoogleDrive. The original open script+.shp files are available from Zenodo but I have downloaded some FIA dummy data (first 1000rows only) for a single state due to Rstudio's memory limit on M1 Mac OS's.
For similar reasons I am trialling a single area within the state of ME which is as follows:

$assessment_area_id
[1] 10

$fortypcds
[1] 125 126 127

$supersection_name
[1] "Aroostook Hills and Lowlands"

$supersection_id
[1] 3

$postal_codes
[1] "ME"

The session info

R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.6

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

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

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

other attached packages:
[1] rFIA_1.0.1   dplyr_1.0.10 rjson_0.2.21 rgdal_1.5-32 sp_1.5-0    

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9         pillar_1.8.1       compiler_4.2.1     dtplyr_1.2.2       remotes_2.4.2      class_7.3-20       tools_4.2.1        bit_4.0.4          lifecycle_1.0.3    tibble_3.1.8      
[11] gtable_0.3.1       lattice_0.20-45    pkgconfig_2.0.3    rlang_1.0.6        cli_3.4.1          DBI_1.1.3          rstudioapi_0.14    parallel_4.2.1     e1071_1.7-12       withr_2.5.0       
[21] stringr_1.4.1      generics_0.1.3     vctrs_0.5.0        classInt_0.4-8     bit64_4.0.5        grid_4.2.1         tidyselect_1.2.0   glue_1.6.2         data.table_1.14.4  sf_1.0-8          
[31] R6_2.5.1           fansi_1.0.3        purrr_0.3.5        tidyr_1.2.1        ggplot2_3.3.6      magrittr_2.0.3     units_0.8-0        scales_1.2.1       colorspace_2.0-3   KernSmooth_2.23-20
[41] utf8_1.2.2         stringi_1.7.8      proxy_0.4-27       munsell_0.5.0   
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant