Convert a bcea object into a dampack psa object
BCEA is has great functionalities, however, not all the same as dampack
With this function users can hop form one to the other quickly
We might also make the reverse function
dampack_to_bcea if of interest to others
bcea_to_dampack <- function(obj_bcea, currency = "£") {
df_c <- as.data.frame(obj_bcea$c)
df_e <- as.data.frame(obj_bcea$e)
colnames(df_c) <- obj_bcea$interventions
colnames(df_e) <- obj_bcea$interventions
make_psa_obj(cost = df_c,
effectiveness = df_e,
strategies = obj_bcea$interventions,
currency = currency)
}
Convert a bcea object into a dampack psa object
BCEA is has great functionalities, however, not all the same as dampack
With this function users can hop form one to the other quickly
We might also make the reverse function
dampack_to_bcea if of interest to others
bcea_to_dampack <- function(obj_bcea, currency = "£") {
df_c <- as.data.frame(obj_bcea$c)
df_e <- as.data.frame(obj_bcea$e)
colnames(df_c) <- obj_bcea$interventions
colnames(df_e) <- obj_bcea$interventions
make_psa_obj(cost = df_c,
effectiveness = df_e,
strategies = obj_bcea$interventions,
currency = currency)
}