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

Aperta
#204 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
r
Ambito
analytics

Direzione di ricerca

The issue proposes a bcea_to_dampack wrapper that reads the cost (c), effectiveness (e) and interventions fields of a BCEA object and passes them to make_psa_obj. Start by checking how make_psa_obj expects its inputs and what the BCEA object contains, then confirm the conversion with a small BCEA example. Done means the function returns a valid dampack PSA object and the reverse direction is either scoped or split into its own issue. The author's currency default is an open question to settle with maintainers.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature

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

Lingua principale
R
Stelle
43
Fork
14
Merge medio
4h 44m
PR unite (30g)
15

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DARTH-git/dampack

Tutte le issue di DARTH-git/dampack

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.