-2

I currently have an R code that works very well and i want to use rpy2 package to use this code in python.

The code show a Sunburst in R:

library(sunburstR)

sequences <- read.csv(system.file("examples/visitsequences.csv",package="sunburstR"),header=F,stringsAsFactors = FALSE)

sunburst(sequences)

But in Python, when i use rpy2 i have this :

sequences = r('read.csv(system.file("examples/visit-sequences.csv",package="sunburstR"),header=F,stringsAsFactors = FALSE)')
r('sunburst(sequences)')

In fact, it works but it doesnt show the chart ...

Can you help me please ?

Joel
  • 1,564
  • 7
  • 12
  • 20
Laurent TEMO
  • 73
  • 1
  • 8
  • Your question, as it is, is too broad to get any useful answer. Please edit it and include a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve). – Mr. T Jul 23 '18 at 10:53
  • Also, please do not show your code as an image. No one wants to type it all in again. Instead, paste the code into your question. – G5W Jul 23 '18 at 12:07
  • ok i didnt know. – Laurent TEMO Jul 23 '18 at 12:24

1 Answers1

0

You could try to use:

 r('sun <- sunburst(sequences); print(sun)')
RobJan
  • 1,351
  • 1
  • 14
  • 18