user2676195 user2676195 - 2 years ago 150
R Question

How to force R Studio to use Viewer Pane for GoogleVis

Trying to use gvisTimeline from googleVis, but I'd like the plots to be shown in the Viewer Pane.

From what I can gauge from here ( it looks like the Viewer pane should be the default, but mine is showing up in the browser.

I did find this support article ( but am unclear how to apply it to my specific need of using gvisTimeline.


dat <- data.frame(Stn=device.positions$StationName,Idnt=device.positions$Ident,start=as.POSIXct(device.positions$Start),end=as.POSIXct(device.positions$End))
timeline <- gvisTimeline(data=dat, rowlabel="Stn", barlabel="Idnt", start="start", end="end")

where device.positions is a basic data table

Answer Source

When you plot the googleViz object you need to pass this as an option

plot(object, browser=rstudio::viewer)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download