`rOPTRAM::optram` default argument `SWIR_band` is invalid
Running the example ion the readme.md file returns an error.
The default value for the SWIR_band
argument is used which is SWIR_band = c(10,11)
. This is essentially an enum type, but Im not sure there is a great way to deal with enums in R. I believe the conventional approach is to include a call to match.arg
eg SWIR_band <- match.arg(SWIR_band)
.
The error message returned comes from check_swir_band
: SWIR band: 1112 not correct. Please specify either 11, or 12
The values are concatenated from c(11,12) to 1112 at some point when passed from optram
to optram_acquire_s2
. Where to locate the checks is a personal preference, but I think in this instance it would seem performing the at least match.arg
within the function that specifies the list of defaults (eg rOPTRAM::optram
) would be a good idea.