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 pvlrt object, which is the output of the function pvlrt or one of its wrappers such as lrt_zi_poisson, lrt_poisson and lrt_vanilla_poisson.

old

character vector containing the old names

new

character vector containing the new names

Value

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

pvlrt

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)



[Package pvLRT version 0.5.1 Index]