Skip to content

suggestion to add a wrapper function to turn the BCEA object into the dampack object #204

Description

@krijkamp

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)
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions