An assumption is being made that ID is column 1. Safer to add a check first or alternatively could access by column name (this may require name to be part of the function input, though, if name may not be consistent)
thanks, I agree conceptually. However, two issues:
Doing ID check will need adding an argument to all functions involving data, in other packages as well, since ID column can be different.
It's very common practice to have the first column as ID already.
Making users type the extra argument seems not worth it. Especially since CrossVA will be the default data preparation tool, and it will have the ID column.
An assumption is being made that ID is column 1. Safer to add a check first or alternatively could access by column name (this may require name to be part of the function input, though, if name may not be consistent)
https://github.com/verbal-autopsy-software/Tariff/blob/2324381cf330fc82f6022a950e7579fdee413271/Tariff/R/Tariff.r#L74-L77