rgmisc

Is it possible to label as TransitionPlot from Gmisc with counts?


I have the following table:

   A  B  C
A  0  6 50
B 63  0 52
C 34  9  0

Where the row=A, column=B shows the count of the transitions from A to B.

I can easily plot this using the Gmisc package via:

transitionPlot(temp)

which gives me a nice plot with arrows from the states, where arrow thickness corresponds to the count proportions.

However, even digging through the documentation, I haven't really found a way to directly label the lines with the actual count information. I feel like this should be possible, so was wondering if anyone had any suggestions, either for this particular package, or if you have another package recommendation.

Thanks!


Solution

  • Sorry this isn't yet possible but you can easily add that manually using grid::grid.text option. You will have to manually search for where to put down the text snippets, I personally prefer having a table in the supplement for the exact data which is why I haven't added that function.

    I also recommend that you start using the transitionClass as it's more flexible and allows you to do more, see vignette: https://cran.r-project.org/web/packages/Gmisc/vignettes/Transition-class.html