NEFSC / READ-SSB-CHAJI-Effort-Displacement---Scallop

Other
0 stars 0 forks source link

logical munging based on column position is fragile #222

Open mle2718 opened 1 year ago

mle2718 commented 1 year ago

This is code is a little fragile. If the positions of the columns change, then this will break. I don't know what will happen if you try to as.logical() something a character or numeric.

https://github.com/NEFSC/READ-SSB-CHAJI-Effort-Displacement---Scallop/blob/f95c870ca2b4421ba6d90d71be8808e9c10a36a6/data_wrangle/data_processing.Rmd#L175-L176

It would be better to pass in the column names. But this is very low priority to address.

Mostly adding this issue so it's easier to find if something does break.