Make dat_dim can be NULL and memb_dim optional for obs
Hi @erifarov
Some functions like ACC(), Clim(), and Corr() have argument dat_dim
. Some of them (e.g., ACC and Clim) can be NULL while some do not (e.g., Corr). The inconsistency is bothering when we use these functions together in one script because then we have to keep checking if we need to insert dimension [dat = 1] for input data.
TODO:
(1) Check all the functions and find those who have the argument dat_dim
.
(2) Review the ones that allow dat_dim = NULL
and see how that part of the code works (each function may differ a bit.)
(3) For those functions that don't allow dat_dim = NULL
, check if it is reasonable to give this option; if yes, modify the code based on (2)
(4) Run the existing unit tests with the modified function. It should pass successfully.
(5) Add new unit tests for dat_dim = NULL
condition.
Another thing is that some functions also have memb_dim
, and for 'obs', it may allow having memb_dim
or not. The ideal situation is that 'obs' can optionally have memb_dim
(e.g., RPS()). Do the same steps as above for this issue (you can fix dat_dim
and memb_dim
issues either separately or together, as you prefer)
Thanks for your help and let me know if anything is unclear!
Cheers,
An-Chi