Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Obviously I think that this is too verbose for @gd047, but I put a kind of tutorial since it maybe helpful for other readers who want to use googleVis on their own website.</p> <p>install googleVis from CRAN</p> <pre><code>install.packages('googleVis') </code></pre> <p>pay attention to the messages.</p> <p>then, create gvis object:</p> <pre><code>library(googleVis) M &lt;- gvisMotionChart(Fruits, "Fruit", "Year") </code></pre> <p>you can find the contents of M by:</p> <pre><code>&gt; M </code></pre> <p>and you can find the plot on your browser:</p> <pre><code>&gt; plot(M) </code></pre> <p>then, what is necessary to generate the chart is M$html$chart:</p> <pre><code>&gt; M$html$chart [1] "&lt;!-- MotionChart ... omitted... \"&gt;\n&lt;/div&gt;\n" </code></pre> <p>save it to a file:</p> <pre><code>&gt; cat(M$html$chart, file="tmp.html") </code></pre> <p>if you open the "tmp.html" as a file (i.e, address says files:///***/tmp.html), then security warning may occur. What you need is to access the html via http://.</p> <p>So if you can edit any web page where &lt;script&gt; tag is available (e.g., blogger), you can use it by simply copy and paste the contents of tmp.html, like this:</p> <p><a href="http://takahashik.blogspot.com/2011/01/googlevis-example.html" rel="noreferrer">http://takahashik.blogspot.com/2011/01/googlevis-example.html</a></p> <p>here is the famous "iris" version of example:</p> <p><a href="http://takahashik.blogspot.com/2011/01/googlevis-example-for-data-iris_10.html" rel="noreferrer">http://takahashik.blogspot.com/2011/01/googlevis-example-for-data-iris_10.html</a></p> <p>Otherwise, if you have a web server, you can use it by uploading the tmp.html on the server.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload