我想知道是否有一种方法可以在一页上安排 Gmisc 包的多个漂亮的过渡图(例如两个彼此相邻或两个两个)?我尝试了各种常见的方法(例如par(mfrow = c(2,2))
和grid.arrange()
),但到目前为止都没有成功。我将不胜感激任何帮助。谢谢!
library(Gmisc)
data.1 <- data.frame(source = c("A", "A", "A", "B", "B", "C", "C"),
target = c("A", "B", "C", "B", "C", "C", "C"))
data.2 <- data.frame(source = c("D", "D", "E", "E", "E", "E", "F"),
target = c("D", "E", "D", "E", "F", "F", "F"))
transitions.1 <- getRefClass("Transition")$new(table(data.1$source, data.1$target), label = c("Before", "After"))
transitions.2 <- getRefClass("Transition")$new(table(data.2$source, data.2$target), label = c("Before", "After"))
# wish to render transition 1 and transition 2 next to each other
transitions.1$render()
transitions.2$render()