
Figure 7: Example of googleVis chart with options = list (gvis.editor =
’Edit me!’).
Year Lloyd\\'s Munich Re\\'s R/I
1 2009 86.1 95.3
2 2010 93.3 100.5
R> CR <- gvisColumnChart(df, options=list(vAxis='{baseline:0}',
+ title="Combined Ratio %",
+ legend="{position:'bottom'}"))
R> plot(CR)
3 Embedding googleVis in web sites
3.1 Integrating gvis objects in existing sites
Suppose you have an existing web page and would like to integrate the ou tput of
a googleVis function, such as gvisMotionChart. In this case you only need the
chart output from gvisMotionChart. So you can either copy and paste the output
from the R console
R> print(M, 'chart') ## or cat(M$html$chart)
into your existing html page, or write the content directly into a file
22
Kommentare zu diesen Handbüchern