我目前有一个运行良好的 R 代码,我想使用 rpy2 包在 python 中使用此代码。
代码在 R 中显示了 Sunburst:
library(sunburstR)
sequences <- read.csv(system.file("examples/visitsequences.csv",package="sunburstR"),header=F,stringsAsFactors = FALSE)
sunburst(sequences)
但是在 Python 中,当我使用 rpy2 时,我有这个:
sequences = r('read.csv(system.file("examples/visit-sequences.csv",package="sunburstR"),header=F,stringsAsFactors = FALSE)')
r('sunburst(sequences)')
事实上,它可以工作,但它没有显示图表......
你能帮我吗 ?