extract_AE_names {pvLRT} | R Documentation |
Extracting and setting AE and Drug names from a pvlrt object
Description
Extracting and setting AE and Drug names from a pvlrt object
Usage
extract_AE_names(object)
extract_Drug_names(object)
set_AE_names(object, old, new)
set_Drug_names(object, old, new)
Arguments
object |
a |
old |
character vector containing the old names |
new |
character vector containing the new names |
Value
-
extract_AE_names
returns a character vector of the names of the AEs in the inputpvlrt
object -
extract_Drug_names
returns a character vector of the names of the Drugs in the inputpvlrt
object -
set_AE_names
returns a newpvlrt
object with updated AE names as specified through the argumentsold
andnew
. -
set_Drug_names
returns a newpvlrt
object with updated Drug names as specified through the argumentsold
andnew
.
Note
Because a pvlrt
object is simply a reclassified matrix, the AE (rows)
and Drug (columns) names can also be extracted/modified through rownames and
colnames respectively.
See Also
Examples
# 500 bootstrap iterations (nsim) in the example below
# are for quick demonstration only --
# we recommended setting nsim to 10000 (default) or bigger
test1 <- pvlrt(statin46, test_zi = TRUE, nsim = 500)
extract_AE_names(test1)
extract_Drug_names(test1)
set_AE_names(test1, old = "Rhabdomyolysis", new = "Rhabdo")
set_Drug_names(test1, old = "Other", new = "Other-Drugs")
## can be chained with pipes `%>%`:
test2 <- test1 %>%
set_AE_names(old = "Rhabdomyolysis", new = "Rhabdo") %>%
set_Drug_names(old = "Other", new = "Other-Drugs")
# see the summary for changed labels
summary(test2)