
R> cat(M$html$chart['jsChart']) # or print(M, 'jsChart')
<!-- jsChart -->
<script type="text/javascript" src="https://www.google.com/jsapi?c
A basic chart caption and html footer are the final items of the html list (output
truncated):
R> print(M, tag='caption')
<div><span>Data: Fruits • Chart ID: <a href="Chart_MotionCha
R> print(M, tag='footer')
<!-- htmlFooter -->
<span>
R Under development (unstable) (2015-01-20 r67564)
• <a href="https://developers.google.com/terms/">Google Te
</span></div>
</body>
</html>
2.4 Displaying gvis objects locally
To display the page locally, type:
R> plot(M) # returns invisibly the file name
The plot method for gvis-objects creates html files in a temporary folder using the
type and chart id information of the object and it will display the output using the
R HTTP help web server locally, usually under http://127.0.0.1.
Note that the chart caption provides a link to the chart code via the chart id for
copy and paste.
The R command tempdir() will show you the path of the per-session temporary
directory, in which the files were written. You can write the chart into a local html
file via the print command with the file argument, e.g.
R> print(M, file="myGoogleVisChart.html")
Please note that Flash charts
4
may not work when loaded as a local file due to
security settings, and therefore require to be displayed via a web server. However,
you can overcame this issue by changing your Flash security settings. Tony Breyal
posted the following solution on stackoverflow.com:
4
Currently the following charts require Flash: motion chart, geo map and annotated time line
16
Comentarios a estos manuales