-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
At this location:
Line 65 in e241322
| # Now check specific columns |
Please:
- Check if any reference is needed
- If so, require that a column named
"interval_id"is present in the intervals (error if not) - If so, verify that the reference col has a valid
"interval_id"in it (cannot be the interval_id of the current row)
The tests will likely look something like:
# Okay because no secondary parameters are present
check.interval.specification(data.frame(start = 0, end = 1, cmax = TRUE)
# Error that no `clr.last_ref_interval_id` column is present
check.interval.specification(data.frame(start = 0, end = 1, clr.last = TRUE)
# Error that no `interval_id` column is present
check.interval.specification(data.frame(start = 0, end = 1, clr.last = TRUE, clr.last_ref_interval_id = "a")
# Error that `clr.last_ref_interval_id` column cannot be `NA` when `clr.last` is TRUE
check.interval.specification(data.frame(start = 0, end = 1, clr.last = TRUE, clr.last_ref_interval_id = NA)
# Error that `clr.last_ref_interval_id` is not present in the `interval_id` column
check.interval.specification(data.frame(start = 0, end = 1, clr.last = TRUE, clr.last_ref_interval_id = "a", interval_id = "b")
# Error that `clr.last_ref_interval_id` and `interval_id` column must be the same `class()`
check.interval.specification(data.frame(start = 0, end = 1, clr.last = TRUE, clr.last_ref_interval_id = "a", interval_id = 1)
# Success
check.interval.specification(data.frame(start = 0, end = 1, clr.last = c(FALSE, TRUE), clr.last_ref_interval_id = c(NA, "a"), interval_id = c("a", NA))
Metadata
Metadata
Assignees
Labels
No labels