data(sp4)
depths(sp4) <- id ~ top + bottom
# no errors (all four list elements return NULL)
splitLogicErrors(sp4)
# NA in top depth triggers depth logic and missing depth errors
data(sp4)
sp4$top[1] <- NA
depths(sp4) <- id ~ top + bottom
splitLogicErrors(sp4)
# interact = TRUE gets errors for profile 1 in same group
# and allows you to pass extra arguments to split.default()
splitLogicErrors(sp4, interact = TRUE, sep = "_", drop = TRUE)
Run the code above in your browser using DataLab