getSubjRoute {sendigR} | R Documentation |
Extract the set of animals of the specified route of administration - or just add actual route of administration for each animal.
Description
Returns a data table with the set of animals included in the
animalList
matching the route of administration specified in the
routeFilter
.
If the routeFilter
is empty (null, na or empty string) - all rows from
animalList
are returned with an additional populated ROUTE column.
Usage
getSubjRoute(
dbToken,
animalList,
routeFilter = NULL,
exclusively = FALSE,
matchAll = FALSE,
inclUncertain = FALSE,
noFilterReportUncertain = TRUE
)
Arguments
dbToken |
Mandatory |
animalList |
Mandatory, data.table. |
routeFilter |
Optional, character. |
exclusively |
Mandatory if
|
matchAll |
Mandatory if
|
inclUncertain |
Mandatory if |
noFilterReportUncertain |
Mandatory if |
Details
The route of administration per animal are identified by a hierarchical lookup in these domains
EX - If a distinct not empty EXROUTE value is found for animal, this is included in the output.
TS - if a distinct TS parameter 'ROUTE' value exists for the study, this is included in the output.
The comparison of route values is done case insensitive and trimmed for leading/trailing blanks.
If input parameter inclUncertain=TRUE
, uncertain animals are included
in the output set. These uncertain situations are identified and reported (in
column UNCERTAIN_MSG):
TS parameter ROUTE is missing for study and no EX rows contain a EXROUTE value for the animal
The selected EXROUTE or TS parameter ROUTE value is invalid (not CT value - CDISC SEND code list ROUTE)
Multiple EXROUTE values have been found for the animal
Multiple TS parameter ROUTE values are registered for study but no EX rows contain a EXROUTE value for the animal
The found EXROUTE value for animal is not included in the TS parameter ROUTE value(s) registered for study
The same checks are performed and reported in column NOT_VALID_MSG if
routeFilter
is empty and noFilterReportUncertain=TRUE
.
Value
The function returns a data.table with columns:
STUDYID (character)
Additional columns contained in the
animalList
tableROUTE (character)
The value is always returned in uppercase and trimmed for leading/trailing blanks.UNCERTAIN_MSG (character)
Included when parameterinclUncertain=TRUE
.
In case the ROUTE cannot be confidently matched during the filtering of data, the column contains an indication of the reason.
Is NA for rows where ROUTE can be confidently matched.
A non-empty UNCERTAIN_MSG value generated by this function is merged with non-empty UNCERTAIN_MSG values which may exist in the input set of animals specified inanimalList
- separated by '|'.NOT_VALID_MSG (character)
Included when parameternoFilterReportUncertain=TRUE
.
In case the ROUTE cannot be confidently decided, the column contains an indication of the reason.
Is NA for rows where the ROUTE can be confidently decided.
A non-empty NOT_VALID_MSG value generated by this function is merged with non-empty NOT_VALID_MSG values which may exist in the input set of animalsanimalList
- separated by '|'.
Examples
## Not run:
# Extract animals administered oral or oral gavage plus uncertain animals
getSubjRoute(dbToken, controlAnimals,
routeFilter = c('ORAL', 'ORAL GAVAGE'),
inclUncertain = TRUE)
# Extract animals administered oral or oral gavage.
# Do only include studies which include both route values
getSubjRoute(dbToken, controlAnimals,
routeFilter = c('ORAL', 'ORAL GAVAGE'),
matchAll = TRUE)
# Extract animals administered subcutaneous.
# Include only animals from studies which do not contain other route values
getSubjRoute(dbToken, controlAnimals,
routeFilter = 'subcutaneous',
exclusively = TRUE)
# No filtering, just add ROUTE - do not include messages when
# these values cannot be confidently found
getSubjRoute(dbToken, controlAnimals,
noFilterReportUncertain = FALSE)
## End(Not run)