get_crpr_dataset {admiralonco} | R Documentation |
Get CR Records Followed by PR That Lead to a Prior Error
Description
Get CR Records Followed by PR That Lead to a Prior Error
Usage
get_crpr_dataset()
Details
Some {admiralonco}
functions check that in the source records CR is not
followed by PR and throw an error otherwise. The get_crpr_dataset()
function allows one to retrieve the duplicate records that lead to an error.
Note that the function always returns the dataset of duplicates from the last
error that has been thrown in the current R session. Thus, after restarting
the R sessions get_crpr_dataset()
will return NULL
and after a second
error has been thrown, the dataset of the first error can no longer be
accessed (unless it has been saved in a variable).
Value
A data.frame
or NULL
Author(s)
Stefan Bundfuss
See Also
Utilities for Dataset Checking:
signal_crpr()
Examples
library(tibble)
library(dplyr)
library(lubridate)
library(admiralonco)
library(rlang)
adrs <- tribble(
~USUBJID, ~ADTC, ~AVALC,
"1", "2020-01-01", "PR",
"1", "2020-02-01", "CR",
"1", "2020-02-16", "NE",
"1", "2020-03-01", "CR",
"2", "2020-02-06", "PR",
"2", "2020-02-16", "CR",
"2", "2020-03-30", "PR",
) %>%
mutate(
ADT = ymd(ADTC),
STUDYID = "XX1234"
)
signal_crpr(adrs, order = exprs(ADT))
get_crpr_dataset()
[Package admiralonco version 1.1.0 Index]