
Figure 8: Visualising data with apostrophes in column names.
R> print(M, 'chart', file='myfilename')
and process it from there.
3.2 Using googleVis output with WordPress
WordPress is a popular web software for creating websites and blogs. Here we give
some tips about the usage with googleVis output.
By default WordPress does not allow JavaScript code (and hence googleVis out-
put) to be inserted into a page. However, additional plugins allow you to extend
the functions of WordPress.
One option of embedding JavaScript code inside a WordPress post is to use the
“custom fields shortcode” plugin
7
. The plugin allows you to create a custom field
for the googleVis code, which can be referred to in your article.
Suppose you created a motion chart in R:
R> M <- gvisMotionChart(Fruits, "Fruit", "Year",
+ options=list(width=400, height=370))
Copy the chart code, e.g. from
R> print(M, 'chart')
7
http://wordpress.org/extend/plugins/custom-fields-shortcode
23
Comentários a estes Manuais