ices-eg / RCGs

A place for the Regional Coordination Groups (RCGs) to store scripts (e.g. for map-plotting, age-length relationships) to make them available to other groups and improve the development and exchange.
7 stars 8 forks source link

Metiers: validateInputDataCodes.R shows NA values for gear_FR as invalid #146

Closed davidcurrie2001 closed 2 years ago

davidcurrie2001 commented 3 years ago

The validateInputDataCodes.R function should allow values of NA for gear_FR since that field is optional but it currently reports NAs as a validation error. I think the code in the function should be changed as below:

gearFR<-unique(input.data$gear_FR) gearFR<-gearFR[!is.na(gearFR)]

invalid.gearFR<-setdiff(unique(input.data$gear_FR), gear.list$gear_code)

invalid.gearFR<-setdiff(unique(gearFR), gear.list$gear_code)

maciek-mir commented 2 years ago

The validateInputDataCodes.R function has been modified. NAs in gear_FR columns are no longer reported as errors.

davidcurrie2001 commented 2 years ago

Great - thanks