gforge / Gmisc

An R package for creating tables, some plots and other useful utilities too small to merit their own package
49 stars 14 forks source link

Error in transition-class lwd_prop-type #43

Closed JaschaDraeger closed 4 years ago

JaschaDraeger commented 4 years ago

I get an error when I try to set the arrows in a transition plot proportional to the boxes.

library(Gmisc)
transMatrix <- as.table(matrix(c(16, 4, 16, 64),ncol=2,byrow=T))
transitions <- transMatrix %>% 
  getRefClass("Transition")$new(label=c("Step 1", "Step 2"))
transitions$render()

Until here it works. However, when I set the arrows to be proportional to the boxes, I get an error:

transitions$lwd_prop_type = "box" 
transitions$render()

[.default`(trnstn_set, row, ) : invalid subscript type 'closure'

lwd_prop_type="all" and lwd_prop_type="set" work.

Is there an easy way to fix this or did I do something wrong? Thank you.

gforge commented 4 years ago

I think I solved this in the dev-branch. Please check by using devtools::install_github

JaschaDraeger commented 4 years ago

It works, thank you a lot for this quick fix!