0

I use the bupaR package to create a process map like below

library(bupaR)
patients %>%
    process_map(performance(mean, "days"))

perf<-patients %>%
    process_map(performance(mean, "days"))

what I would like to do now it to extract the data from, to and value as I can see them from the object that is created and pass them to a dataframe.

enter image description here

firmo23
  • 7,490
  • 2
  • 38
  • 114
  • 1
    Maybe `edges <- attr(perf, "edges")`. This will give you a tibble from which you can extract the columns, run `head(edges)` to see them. – Rui Barradas Sep 15 '22 at 13:27
  • Images are not a good way for posting data (or code). See [this Meta](https://meta.stackoverflow.com/a/285557/8245406) and a [relevant xkcd](https://xkcd.com/2116/). Can you post sample data in `dput` format? Please edit the question with the output of `dput(head(perf))`. – Rui Barradas Sep 15 '22 at 13:27
  • patients are built in bupaR you can find it there – firmo23 Sep 15 '22 at 13:28
  • 1
    but yes 1st comment did it – firmo23 Sep 15 '22 at 13:29
  • 1
    @firmo23 can you post it as answer so that this question doesn't appear in "unanswered questions"? – bretauv Sep 16 '22 at 07:31
  • I did also this is a follow up question https://stackoverflow.com/questions/73744699/use-the-edges-dataframe-which-is-included-inside-a-process-map-object-to-subse – firmo23 Sep 16 '22 at 12:16

1 Answers1

0

Maybe edges <- attr(perf, "edges"). This will give you a tibble from which you can extract the columns, run head(edges) to see them.

firmo23
  • 7,490
  • 2
  • 38
  • 114