Closed SanderDevisscher closed 4 months ago
@soriadelva how do you mean gets stuck ?
The code itself works well but I have a few comments that may be addressed:
- When labeltype is hardcoded, uppercase letters are not accepted, see: https://github.com/inbo/fistools/blob/f954789e8f2b8df5128a251be19e3c001bae521e/R/label_converter.R#L45-L50 which throws an error, because only the lowercase reekits is accepted.
Fixed 🥳
- The df of the final example cannot be constructed because column labeltype is not present in initial dataset labels, throwing an error on this line: https://github.com/inbo/fistools/blob/f954789e8f2b8df5128a251be19e3c001bae521e/R/label_converter.R#L57
Added a remark in the example. You should run an example which results in less than 1000 labels first (e.a. example 1)
- Not that important, but I was wondering whether it would be better to place the function parameters in English (i.e., labelnumber instead of labelnummer, species_column instead of soort_column,...)
Not implemented since function will be used by us only. I could translate everything to dutch if prefered (as a new issue)
- Also not that important but it may be nice to add a line after each warning that involves checking, saying that the check passed. e.g., after this warning:
1: In label_converter(df, "id", "labelnummer", "REE", "labeltype", : soort_column: REE is not a column of input >> checking if it's an allowed species
there could be a line sayingcheck passed 🎉
Implemented, whenever the function checks something and the check is succesfully completed check passed 🎉
is printed.
Additional fixes and enhancements:
@soriadelva how do you mean gets stuck ?
it's weird, when I just run the function in the code itself it keeps on getting stuck at that same line, like this: But if I select the whole code with ctrl + A and then run it, it seems to be fine 🤔
fixes #30