[x] Check understory logic and change if necessary
[x] Implement a better logic to decide between p3 and p2 data for understory
[x] Re-implement more simple logic (nrows)
[x] Use only nrow to decide.
[x] Move warnings from p3 and p2 to understory, that way we avoid confusing warnings about p3 not found when returning p2
[x] Fix tests for P2 when logic is decided. Right now there are no plots in the test suit with P2 data
[x] Add missing tests
[x] fia_table_process: NA tables, not only plot
[x] fia_plot_table_process: Check what happens when NAs in cond and survey files
[x] test the creation of filter_list/ test what happens when filter_list is NULL
[x] .get_plots_from fails when wrong county is supplied. Fix and test.
[x] missing error tests about county and plot in FIA
[x] fia_to_tibble assertions
[x] fia_understory_table new function tests
[x] Improve error messages (more informative)
[x] Refactor extract_metadata method to return the year requested and substitute by last recorded value in core vars (coordinates and the like).Return non core vars (i.e. Height) as the year requested (even if is NA) and a var called var_last_recorded with the last recorded value to use it in the complete_data method.
FFI
[x] Add missing tests
[x] ffi_table_process: NA tables, not only plot
[x] test the creation of filter_list/ test what happens when filter_list is NULL
[x] replace internal data form TRY with some programmatic aproach (GIFT maybe?)
[x] ffi_to_tibble assertions
[x] Fix #13 FFI related problems
[x] Improve error messages (more informative)
[x] Refactor extract_metadata method to return the year requested and substitute by last recorded value in core vars (coordinates and the like).Return non core vars (i.e. Height) as the year requested (even if is NA) and a var called var_last_recorded with the last recorded value to use it in the complete_data method.
IFN
[x] Implement logic
[x] input & reading logic
[x] IFN2 are dbf files, implement reading with foregin::read.dbf()
[x] IFN3 & 4 are accdb files, implement reading with Hmisc::mdb.get()
[x] IFN4 are not exactly divided in provinces for all data. Some are and some are at the comunidad autónoma level, we have to deal with this also. This is better to deal with in the build input step.
[x] implement IFN files in .read_inventory_data to use the same function always??
[x] ifn_utils
[x] ifn_table*
[x] Add tests
[x] tests for filter list helpers (.get_plots_from_ifn and transform_plot_summary_ifn)
[x] Find the error in IFN tests when selecting some plots (more rows than expected) -> It was an error in the sampling code, which in some cases will only create one plot in the fake "91" province. Fixed.
General
[x] A general system to extract data from the final tibble (unnesting, extracting as list...)
[x] clean empty rows
[x] inventory as sf method
[x] add options in *_to_tibble functions for cleaning and spatial
[x] re-export tidyr::unnest
[x] ~complete_data method: when no data for the desired year is missing but there is data for other years, complete the data with these.~ No need to complete anything.
[x] add tests
[x] grep depdency
[x] Add check on library load yo ensure grep is in the path (Sys.which("grep")) and if not present warn the user with a general description of how to install Rtools in windows and grep in Mac or Linux.
[x] Add check to main functions to avoid running if grep is not present, with the same warning as before
[x] Modify code in FIA to use grep -P and the pattern of quotes used in FFI as it seems the only one working in the Windows grep implementation
[x] MS Access dependency in Windows machines
[x] set definitive acronyms for each inventory
[x] check units
[x] skip on CRAN: Tests and examples that fail without grep or access to the inventory data must be skipped on CRAN tests and checks
[x] create skip_if_not_grep() and implement it on necessary tests
[x] create skip_if_not_data() and implement it on necessary tests
[x] examples must have the \dont* flag when necessary
[x] create CI tests with GitHub Actions to ensure tests/examples skipped on CRAN are run in some capacity to avoid regressions
[x] Clean tests folder
[x] Update/Revise documentation of functions
[x] exported functions
[x] internal functions
[x] Uniformized order of arguments in *_to_tibble functions
[x] Uniformized order of variables in *_to_tibble functions
[x] Uniformized order of variables in nested tables
[x] tree
[x] understory
[x] regen
Vignettes and docs
[x] selecting_plots
[x] inventory_data_tibble
[x] (internal) data processing docs
[x] README
Non-essential but...
[x] Benchmark memory use and speed if FIA and FFI are memoised when reading whole tables, instead of greping
[x] Download methods for FFI and IFN (FIA has the FIESTA package)?
TODO
FIA
nrow
to decide.fia_table_process
: NA tables, not only plotfia_plot_table_process
: Check what happens when NAs in cond and survey filesNULL
.get_plots_from
fails when wrong county is supplied. Fix and test.fia_to_tibble
assertionsfia_understory_table
new function testsFFI
ffi_table_process
: NA tables, not only plotNULL
ffi_to_tibble
assertionsIFN
dbf
files, implement reading withforegin::read.dbf()
accdb
files, implement reading withHmisc::mdb.get()
.read_inventory_data
to use the same function always??ifn_utils
ifn_table*
.get_plots_from_ifn
andtransform_plot_summary_ifn
)General
*_to_tibble
functions for cleaning and spatialtidyr::unnest
grep
depdencySys.which("grep")
) and if not present warn the user with a general description of how to install Rtools in windows and grep in Mac or Linux.grep -P
and the pattern of quotes used in FFI as it seems the only one working in the Windows grep implementationgrep
or access to the inventory data must be skipped on CRAN tests and checksskip_if_not_grep()
and implement it on necessary testsskip_if_not_data()
and implement it on necessary tests\dont*
flag when necessary*_to_tibble
functions*_to_tibble
functionsVignettes and docs
Non-essential but...
FIESTA
package)?