View source: R/pvlrt-postprocessing-utils.R
extract_AE_names | R Documentation |
Extracting and setting AE and Drug names from a pvlrt object
extract_AE_names(object) extract_Drug_names(object) set_AE_names(object, old, new) set_Drug_names(object, old, new)
object |
a |
old |
character vector containing the old names |
new |
character vector containing the new names |
extract_AE_names
returns a character vector of the names of the
AEs in the input pvlrt
object
extract_Drug_names
returns a character vector of the names of the Drugs
in the input pvlrt
object
set_AE_names
returns a new pvlrt
object with updated AE names as
specified through the arguments old
and new
.
set_Drug_names
returns a new pvlrt
object with updated Drug names as
specified through the arguments old
and new
.
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.
pvlrt
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.