See reproducible example. This is happening because these checks
if (!all(unique(dataset_occ[[lat_var]]) %in% lat_vals)) {
warning("Warning: value not in lat_vals")
}
if (!all(unique(dataset_occ[[loc_var]]) %in% loc_vals)) {
warning("Warning: value not in loc_vals")
}
if (!all(unique(dataset_occ$STUDYEYE) %in% seye_vals)) {
warning("Warning: STUDYEYE is expected to be 'LEFT', 'RIGHT' or 'BILATERAL'")
should have been removed and were not.
Function could also be enhanced such that user can pass in seye_vals as well.
What happened?
See reproducible example. This is happening because these checks
should have been removed and were not.
Function could also be enhanced such that user can pass in
seye_vals
as well.Session Information
No response
Reproducible Example