<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://animation.yihui.name/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel>
        <title>AniWiki: Animations in Statistics</title>
        <description></description>
        <link>http://animation.yihui.name/</link>
        <lastBuildDate>Wed, 24 Feb 2010 12:39:45 -0700</lastBuildDate>
        <generator>FeedCreator 1.7.2-ppt DokuWiki</generator>
        <image>
            <url>http://animation.yihui.name/lib/images/favicon.ico</url>
            <title>AniWiki: Animations in Statistics</title>
            <link>http://animation.yihui.name/</link>
        </image>
        <item>
            <title>Homepage animation - old revision restored</title>
            <link>http://animation.yihui.name/wiki:homepage_animation?rev=1266513980</link>
            <description>


&lt;h1&gt;&lt;a name=&quot;homepage_animation&quot; id=&quot;homepage_animation&quot;&gt;Homepage animation&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

The animation in the homepage will be changed aperiodically. All of the animations which were once used are listed in this page. If you want to submit one, please contact &lt;a href=&quot;http://animation.yihui.name/wiki:yihui_xie&quot; class=&quot;wikilink1&quot; title=&quot;wiki:yihui_xie&quot;&gt;Yihui Xie&lt;/a&gt; first. The size of the image(s) had better be 400&amp;times;400 px. The format should be &lt;acronym title=&quot;Graphics Interchange Format&quot;&gt;GIF&lt;/acronym&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Homepage animation&quot; [1-319] --&gt;
&lt;h2&gt;&lt;a name=&quot;gradient_descent_algorithm&quot; id=&quot;gradient_descent_algorithm&quot;&gt;Gradient Descent Algorithm&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

Used from May 26, 2008 to now.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://animation.yihui.name/_detail/ani_frontpage.gif?id=wiki%3Ahomepage_animation&quot; class=&quot;media&quot; title=&quot;ani_frontpage.gif&quot;&gt;&lt;img src=&quot;http://animation.yihui.name/_media/ani_frontpage.gif&quot; class=&quot;mediacenter&quot; title=&quot;Gradient Descent Algorithm&quot; alt=&quot;Gradient Descent Algorithm&quot; /&gt;&lt;/a&gt;

&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Gradient Descent Algorithm&quot; [320-] --&gt;</description>
            <author>Yihui Xie</author>
        <category>wiki</category>
            <pubDate>Thu, 18 Feb 2010 10:26:20 -0700</pubDate>
        </item>
        <item>
            <title>Yihui Xie - old revision restored</title>
            <link>http://animation.yihui.name/wiki:yihui_xie?rev=1265147668</link>
            <description>


&lt;h1&gt;&lt;a name=&quot;yihui_xie&quot; id=&quot;yihui_xie&quot;&gt;Yihui Xie&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Yihui Xie&quot; [1-25] --&gt;
&lt;h2&gt;&lt;a name=&quot;about_this_guy&quot; id=&quot;about_this_guy&quot;&gt;About this guy&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

Yihui has a great passion for statistics, especially for statistical graphics. He thinks his IQ might be lower than the average level &lt;img src=&quot;http://animation.yihui.name/lib/images/smileys/icon_sad.gif&quot; class=&quot;middle&quot; alt=&quot;:-(&quot; /&gt;, because he is often confused by statistical theories and methods in classes. Not being able to follow those smart guys &lt;img src=&quot;http://animation.yihui.name/lib/images/smileys/icon_confused.gif&quot; class=&quot;middle&quot; alt=&quot;:-?&quot; /&gt;, every now and then he chooses to doze off in the back of the classroom &lt;img src=&quot;http://animation.yihui.name/lib/images/smileys/icon_silenced.gif&quot; class=&quot;middle&quot; alt=&quot;:-X&quot; /&gt; or stand in the front to show others his animations &lt;img src=&quot;http://animation.yihui.name/lib/images/smileys/icon_lol.gif&quot; class=&quot;middle&quot; alt=&quot;LOL&quot; /&gt; (in order that he should not doze off again).
&lt;/p&gt;

&lt;p&gt;
To know more about this guy, please visit his &lt;a href=&quot;http://www.yihui.name/en/&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.yihui.name/en/&quot;  rel=&quot;nofollow&quot;&gt;Blog&lt;/a&gt; or read his &lt;a href=&quot;http://www.yihui.name/en/vitae&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.yihui.name/en/vitae&quot;  rel=&quot;nofollow&quot;&gt;CV&lt;/a&gt;. Chinese visitors may also wish to visit his &lt;a href=&quot;http://yihui.name/cn/&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://yihui.name/cn/&quot;  rel=&quot;nofollow&quot;&gt;Chinese Blog&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://animation.yihui.name/_detail/wiki:robstat.png?id=wiki%3Ayihui_xie&quot; class=&quot;media&quot; title=&quot;wiki:robstat.png&quot;&gt;&lt;img src=&quot;http://animation.yihui.name/_media/wiki:robstat.png&quot; class=&quot;mediacenter&quot; title=&quot;Yihui is a robber in statistics&quot; alt=&quot;Yihui is a robber in statistics&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
And here is his name card:
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://animation.yihui.name/_detail/wiki:namecardyihui.jpg?id=wiki%3Ayihui_xie&quot; class=&quot;media&quot; title=&quot;wiki:namecardyihui.jpg&quot;&gt;&lt;img src=&quot;http://animation.yihui.name/_media/wiki:namecardyihui.jpg&quot; class=&quot;mediacenter&quot; title=&quot;Name Card of Yihui&quot; alt=&quot;Name Card of Yihui&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
You may download the one &lt;a href=&quot;http://www.yihui.name/img/namecard.png&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.yihui.name/img/namecard.png&quot;  rel=&quot;nofollow&quot;&gt;without border (7.68K)&lt;/a&gt;, the &lt;a href=&quot;http://animation.yihui.name/lib/exe/fetch.php?media=http%3A%2F%2Fwww.yihui.name%2Fimg%2Fnamecard.tif&quot; class=&quot;media mediafile mf_&quot; title=&quot;http://www.yihui.name/img/namecard.tif&quot;&gt;original TIFF image (5.03M)&lt;/a&gt;, or the &lt;a href=&quot;http://animation.yihui.name/lib/exe/fetch.php?media=http%3A%2F%2Fwww.yihui.name%2Fimg%2Fnamecard.tif.gz&quot; class=&quot;media mediafile mf_gz&quot; title=&quot;http://www.yihui.name/img/namecard.tif.gz&quot;&gt;gzipped TIFF image (386K)&lt;/a&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;About this guy&quot; [26-1095] --&gt;
&lt;h2&gt;&lt;a name=&quot;what_they_say_about_his_work&quot; id=&quot;what_they_say_about_his_work&quot;&gt;What they say about his work&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

Drop me a few lines here if you didn&amp;#039;t doze off when browsing this wiki.&lt;sup&gt;&lt;a href=&quot;#fn__1&quot; name=&quot;fnt__1&quot; id=&quot;fnt__1&quot; class=&quot;fn_top&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; For example, “Hi sleepy guy, my dog seems to be interested in your animations. When I woke up I found he was moving the mouse browsing your web pages.” &lt;img src=&quot;http://animation.yihui.name/lib/images/smileys/icon_biggrin.gif&quot; class=&quot;middle&quot; alt=&quot;:-D&quot; /&gt; Don&amp;#039;t worry about your email addresses because there is a mechanism to protect them from harvesting bots – the addresses will be obfuscated.

&lt;/p&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 … like it very much…  — &lt;em&gt;&lt;a href=&quot;http://ggorjan.blogspot.com&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://ggorjan.blogspot.com&quot;  rel=&quot;nofollow&quot;&gt;Gregor Gorjanc&lt;/a&gt; (PhD student), University of Ljubljana. 2007/11/12&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 … very much liked your animation for k-means cluster analysis. On the other hand your animations for survey sampling I find only are only “so so”…  — &lt;em&gt;Tom Brotz, USA. 2007/12/24&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 … got more interested to learn R after visiting your site…  — &lt;em&gt;&lt;a href=&quot;mailto:tajuakins%20%5Bat%5D%20yahoo%20%5Bdot%5D%20com&quot; class=&quot;mail JSnocheck&quot; title=&quot;tajuakins [at] yahoo [dot] com&quot;&gt;tajuakins&lt;/a&gt; (a visitor), Nigeria. 2007/12/24&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 … and I am very impressed. I will use it when I am teaching courses… — &lt;em&gt;&lt;a href=&quot;http://wwwmaths.anu.edu.au/~johnm&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://wwwmaths.anu.edu.au/~johnm&quot;  rel=&quot;nofollow&quot;&gt;John Maindonald&lt;/a&gt; (Retired Visiting Fellow), Australian National University. 2008/01/21&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 … to your web page, which is very interesting!… fascinating…  — &lt;em&gt;&lt;a href=&quot;http://www.public.iastate.edu/~dicook&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.public.iastate.edu/~dicook&quot;  rel=&quot;nofollow&quot;&gt;Di Cook&lt;/a&gt; (Professor), Iowa State University. 2008/01/28&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 … stumbled upon your animation package. WOW!!! I teach an undergraduate course in econometrics and this will be HUGE help in my lectures. Well done!!!…  — &lt;em&gt;Neil (a visitor) 2008/04/12&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 … Great site!!! I like the ideas for animations a lot…  — &lt;em&gt;&lt;a href=&quot;http://bojan.3e.pl/weblog&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://bojan.3e.pl/weblog&quot;  rel=&quot;nofollow&quot;&gt;Michal Bojanowski&lt;/a&gt; (researcher), Institute of Philosophy and Sociology Polish Academy of Sciences. 2008/04/16&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 … I really have enjoyed your blog on Animation using R…  — &lt;em&gt;&lt;a href=&quot;http://iims.massey.ac.nz/people/g.xie/index.html&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://iims.massey.ac.nz/people/g.xie/index.html&quot;  rel=&quot;nofollow&quot;&gt;J. Xie&lt;/a&gt; (Doctoral Candidate), Massey University, New Zealand. 2008/05/13&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 … the first useful animation package for R… really pleased to come across it… the help file and vignette difficult to follow… — &lt;em&gt;&lt;a href=&quot;http://www.stats.ox.ac.uk/~wills&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.stats.ox.ac.uk/~wills&quot;  rel=&quot;nofollow&quot;&gt;Quin Wills&lt;/a&gt; (DPhil candidate), University of Oxford. 2008/05/30&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 … a lot of information on your website would be very helpful for my studies continuously…  — &lt;em&gt;&lt;a href=&quot;http://www-stat.stanford.edu/people/students/index.html&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www-stat.stanford.edu/people/students/index.html&quot;  rel=&quot;nofollow&quot;&gt;Christine Kang&lt;/a&gt; (Master Student), Stanford University. 2008/06/02&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 … Very impressive!…  — &lt;em&gt;Tom Aldenberg, &lt;a href=&quot;http://www.rivm.nl&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.rivm.nl&quot;  rel=&quot;nofollow&quot;&gt;the National Institute for Public Health and the Environment, Netherlands&lt;/a&gt;. 2008/06/09&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 … I have made animations without it and it takes an enormous amount of effort.  Your package will make things Soooooo much easier.  ~&lt;img src=&quot;http://animation.yihui.name/lib/images/smileys/icon_smile.gif&quot; class=&quot;middle&quot; alt=&quot;:-)&quot; /&gt; &lt;em&gt; &lt;a href=&quot;http://www.statisticalengineering.com/&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.statisticalengineering.com/&quot;  rel=&quot;nofollow&quot;&gt;Charles Annis, P.E.&lt;/a&gt; 2009/03/28&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 Your web site and animation package will open the eyes of many to the wonders of statistics — &lt;em&gt;&lt;a href=&quot;http://www.dangoldstein.com&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.dangoldstein.com&quot;  rel=&quot;nofollow&quot;&gt;Dan Goldstein&lt;/a&gt; (Professor), London Business School and Yahoo! Research
(2009/07/22)&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;div class=&quot;no&quot;&gt;
 Your package is fantastic.  — &lt;em&gt;&lt;a href=&quot;http://www.bio.dist.unige.it/Members/pivan&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.bio.dist.unige.it/Members/pivan&quot;  rel=&quot;nofollow&quot;&gt;Ivan Porro&lt;/a&gt; 2009/11/09&lt;/em&gt;&lt;/div&gt;&lt;/blockquote&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;What they say about his work&quot; [1096-] --&gt;&lt;div class=&quot;footnotes&quot;&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__1&quot; id=&quot;fn__1&quot; name=&quot;fn__1&quot; class=&quot;fn_bot&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; 
Part of the reviews are from the &lt;a href=&quot;http://yihui.name/en/guestbook&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://yihui.name/en/guestbook&quot;  rel=&quot;nofollow&quot;&gt;guestbook&lt;/a&gt; of my blog and my emails. If you think anyone of them is inappropriate to be posted here, please feel free to remove the words by yourself.&lt;/div&gt;
&lt;/div&gt;
</description>
            <author>Yihui Xie</author>
        <category>wiki</category>
            <pubDate>Tue, 02 Feb 2010 14:54:28 -0700</pubDate>
        </item>
        <item>
            <title>Hit or Miss Monte Carlo Integration - created</title>
            <link>http://animation.yihui.name/compstat:hit_or_miss_monte_carlo?rev=1259636440</link>
            <description>


&lt;h1&gt;&lt;a name=&quot;hit_or_miss_monte_carlo_integration&quot; id=&quot;hit_or_miss_monte_carlo_integration&quot;&gt;Hit or Miss Monte Carlo Integration&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

see &lt;code&gt;?MC.hitormiss&lt;/code&gt; in &lt;code&gt;animation&lt;/code&gt; (&amp;gt;= 1.0-10)
&lt;/p&gt;

&lt;/div&gt;
</description>
            <author>Yihui Xie</author>
        <category>compstat</category>
            <pubDate>Mon, 30 Nov 2009 20:00:40 -0700</pubDate>
        </item>
        <item>
            <title>Sample Mean Monte Carlo Integration - created</title>
            <link>http://animation.yihui.name/compstat:sample_mean_monte_carlo?rev=1259636391</link>
            <description>


&lt;h1&gt;&lt;a name=&quot;sample_mean_monte_carlo_integration&quot; id=&quot;sample_mean_monte_carlo_integration&quot;&gt;Sample Mean Monte Carlo Integration&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

see &lt;code&gt;?MC.samplemean&lt;/code&gt; in &lt;code&gt;animation&lt;/code&gt; (&amp;gt;= 1.0-10).

&lt;/p&gt;

&lt;/div&gt;
</description>
            <author>Yihui Xie</author>
        <category>compstat</category>
            <pubDate>Mon, 30 Nov 2009 19:59:51 -0700</pubDate>
        </item>
        <item>
            <title>Creating HTML animation pages - using other graphics devices in HTML animation page</title>
            <link>http://animation.yihui.name/animation:create_html_animation_page?rev=1257871013</link>
            <description>


&lt;h1&gt;&lt;a name=&quot;creating_html_animation_pages&quot; id=&quot;creating_html_animation_pages&quot;&gt;Creating HTML animation pages&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

This page is to explain what happens behind the animation functions. Generally speaking, there are three steps to follow when we want to create an &lt;acronym title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/acronym&gt; animation page. First, make some preparations (copy necessary &lt;acronym title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/acronym&gt; and &lt;acronym title=&quot;JavaScript&quot;&gt;JS&lt;/acronym&gt; files) for the &lt;acronym title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/acronym&gt; file and open a graphics device for the next step – &lt;code&gt;ani.start()&lt;/code&gt;; second, make a series of plots using any R functions – these plots will be recorded as image frames one by one; third, write the &lt;acronym title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/acronym&gt; file – &lt;code&gt;ani.stop()&lt;/code&gt;. Below is a typical process for creating &lt;acronym title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/acronym&gt; animation pages:
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;
ani.options(...)
ani.start(...)
for (i in 1:nmax) plot(...)
ani.stop()
&lt;/pre&gt;

&lt;p&gt;
The function &lt;code&gt;&lt;a href=&quot;http://animation.yihui.name/animation:options&quot; class=&quot;wikilink1&quot; title=&quot;animation:options&quot;&gt;ani.options()&lt;/a&gt;&lt;/code&gt; will tell the following functions some options to make an animation, such as the time interval, the maximum frames, the width and height of images, etc.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Creating HTML animation pages&quot; [1-866] --&gt;
&lt;h2&gt;&lt;a name=&quot;ani.start&quot; id=&quot;ani.start&quot;&gt;ani.start()&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

In the beginning, two files &lt;code&gt;ANI.css&lt;/code&gt; and &lt;code&gt;FUN.js&lt;/code&gt; are copied to the output directory &lt;code&gt;outdir&lt;/code&gt;. Then a graphics device &lt;code&gt;ani.dev&lt;/code&gt; is opened to record the plots as image files in the &lt;code&gt;images/&lt;/code&gt; directory&lt;sup&gt;&lt;a href=&quot;#fn__1&quot; name=&quot;fnt__1&quot; id=&quot;fnt__1&quot; class=&quot;fn_top&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt;. The format of the image files is &lt;code&gt;paste(%d, &amp;#039;.&amp;#039;, ani.type)&lt;/code&gt;, thus the files will be named from 1 to the maximum number of image frames.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;ani.start()&quot; [867-1363] --&gt;
&lt;h2&gt;&lt;a name=&quot;make_plots&quot; id=&quot;make_plots&quot;&gt;Make plots&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

Then some high-level plotting commands (typically in a loop) are executed and the plots are written to &lt;code&gt;images/&lt;/code&gt;. 
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Make plots&quot; [1364-1505] --&gt;
&lt;h2&gt;&lt;a name=&quot;ani.stop&quot; id=&quot;ani.stop&quot;&gt;ani.stop()&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

In the end, we have obtained all the animation frames, and &lt;code&gt;ani.stop()&lt;/code&gt; will write an &lt;acronym title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/acronym&gt; file&lt;sup&gt;&lt;a href=&quot;#fn__2&quot; name=&quot;fnt__2&quot; id=&quot;fnt__2&quot; class=&quot;fn_top&quot;&gt;2)&lt;/a&gt;&lt;/sup&gt; containing the animation driven by &lt;acronym title=&quot;JavaScript&quot;&gt;JS&lt;/acronym&gt;. The &lt;acronym title=&quot;JavaScript&quot;&gt;JS&lt;/acronym&gt; code also works as a loop: in the &lt;em&gt;i&lt;/em&gt;-th step, display the &lt;em&gt;i&lt;/em&gt;-th image element and hide the rest. 
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;ani.stop()&quot; [1506-1800] --&gt;
&lt;h2&gt;&lt;a name=&quot;examples&quot; id=&quot;examples&quot;&gt;Examples&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

Below are two examples using functions in package &lt;code&gt;animation&lt;/code&gt; and some custom R code to generate &lt;acronym title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/acronym&gt; animation pages respectively.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Examples&quot; [1801-1957] --&gt;
&lt;h3&gt;&lt;a name=&quot;brownian_motion&quot; id=&quot;brownian_motion&quot;&gt;Brownian Motion&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;

The function &lt;code&gt;brownian.motion()&lt;/code&gt; in the package &lt;code&gt;animation&lt;/code&gt; has given a demonstration of the Brownian Motion.
&lt;/p&gt;
&lt;pre class=&quot;code r&quot;&gt;&lt;span class=&quot;co3&quot;&gt;# create an HTML animation page of Brownian Motion&lt;/span&gt;
&lt;span class=&quot;co3&quot;&gt;# store the old option to restore it later&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;oopt&lt;/span&gt; = ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=options&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;options&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;interval&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.05&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;nmax&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;, ani&lt;span class=&quot;re5&quot;&gt;.dev&lt;/span&gt; = &lt;span class=&quot;re5&quot;&gt;png&lt;/span&gt;, ani&lt;span class=&quot;re5&quot;&gt;.type&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;png&amp;quot;&lt;/span&gt;,
    &lt;span class=&quot;re5&quot;&gt;title&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;Demonstration of Brownian Motion&amp;quot;&lt;/span&gt;,
    &lt;span class=&quot;re5&quot;&gt;description&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;Random walk on the 2D plane: for each point (x, y), 
    x = x + rnorm(1) and y = y + rnorm(1).&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=start&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;start&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;opar&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=par&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;par&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;mar&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;mgp&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;.5&lt;/span&gt;, 0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;tcl&lt;/span&gt; = -0&lt;span class=&quot;re5&quot;&gt;.3&lt;/span&gt;,
    cex&lt;span class=&quot;re5&quot;&gt;.axis&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.8&lt;/span&gt;, cex&lt;span class=&quot;re5&quot;&gt;.lab&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.8&lt;/span&gt;, cex&lt;span class=&quot;re5&quot;&gt;.main&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
brownian.motion&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;pch&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;cex&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;col&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;red&amp;quot;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;bg&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;yellow&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=par&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;par&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;opar&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=stop&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;stop&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=options&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;options&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;oopt&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
The animation is like this:
&lt;/p&gt;

&lt;p&gt;
&lt;div align=&quot;center&quot; class=&quot;anidemo&quot; title=&quot;Demonstration of Brownian Motion&quot;&gt;&lt;fieldset&gt;&lt;legend align=&quot;center&quot;&gt;Demonstration of Brownian Motion&lt;/legend&gt;&lt;div id=&quot;loadingbm&quot; class=&quot;loading&quot;&gt;loading animation frames... 0%&lt;/div&gt;&lt;div id=&quot;divPreloadbm&quot; class=&quot;divPreload&quot;&gt;&lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&gt;	var sourcebm = &quot;http://i288.photobucket.com/albums/ll181/xieyihui/brownian_motion/&quot;;	var imgtypebm = &quot;png&quot;;	var tmpbm = 0;	var nmaxbm=100; 	var nbm=1;	var tbm;	for(i = 1; i &lt;= nmaxbm; i++){		document.write(&quot;&lt;div class=\&quot;divFrame\&quot; id=\&quot;divPreload&quot; + &quot;bm&quot; + i + &quot;\&quot;&gt;&lt;img src=\&quot;&quot; + sourcebm + i + &quot;.&quot; + imgtypebm + &quot;\&quot;&quot; + &quot; id = \&quot;img&quot; + &quot;bm&quot; + i + &quot;\&quot; onload = \&quot;loading(\'bm\')\&quot; onerror = \&quot;loading(\'bm\')\&quot; alt=\&quot;Demonstration of Brownian Motion\&quot; title=\&quot;Demonstration of Brownian Motion\&quot; /&gt;&lt;/div&gt;&quot;);}&lt;/script&gt;&lt;/div&gt;&lt;div class=&quot;btncontrol&quot;&gt;&lt;input name=&quot;nmaxbm&quot; type=&quot;hidden&quot; id=&quot;nmaxbm&quot; value=&quot;100&quot; /&gt;&lt;input name=&quot;heightbm&quot; type=&quot;hidden&quot; id=&quot;heightbm&quot; value=&quot;480&quot; /&gt;&lt;input name=&quot;btnPlaybm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnPlaybm&quot; title=&quot;Play&quot; onclick=&quot;playAni('bm')&quot; value=&quot;  &amp;gt;  &quot; /&gt; &lt;input name=&quot;btnPausebm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnPausebm&quot; title=&quot;Pause&quot; onclick=&quot;pauseAni('bm')&quot; value=&quot;  O  &quot; /&gt; &lt;input name=&quot;btnFastbm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnFastbm&quot; title=&quot;Speed up&quot; onclick=&quot;fastAni('bm',1)&quot; value=&quot;  +  &quot; /&gt; &lt;input name=&quot;btnSlowbm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnSlowbm&quot; title=&quot;Slow down&quot; onclick=&quot;fastAni('bm',-1)&quot; value=&quot;  -  &quot; /&gt; &lt;input name=&quot;btnPrevbm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnPrevbm&quot; title=&quot;Previous frame&quot; onclick=&quot;prevAni('bm',1)&quot; value=&quot;  &amp;lt;&amp;lt;  &quot; /&gt; &lt;input name=&quot;btnNextbm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnNextbm&quot; title=&quot;Next frame&quot; onclick=&quot;prevAni('bm',-1)&quot; value=&quot;  &amp;gt;&amp;gt;  &quot; /&gt; &lt;input name=&quot;btnFirstbm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnFirstbm&quot; title=&quot;First frame&quot; onclick=&quot;firstAni('bm',true)&quot; value=&quot;  |&amp;lt;  &quot; /&gt; &lt;input name=&quot;btnLastbm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnLastbm&quot; title=&quot;Last frame&quot; onclick=&quot;firstAni('bm',false)&quot; value=&quot;  &amp;gt;|  &quot; /&gt; &lt;input name=&quot;btnMorebm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnMorebm&quot; title=&quot;More controls&quot; onclick=&quot;btnMore('bm')&quot; value=&quot;  &amp;lt;&amp;gt;  &quot; /&gt;&lt;/div&gt;&lt;div id=&quot;moreParbm&quot; class=&quot;morepar&quot;&gt;&lt;label title=&quot;Which frame to go?&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;View frame &lt;input name=&quot;txtFramebm&quot; type=&quot;text&quot; id=&quot;txtFramebm&quot; onblur=&quot;txtFrame(this.value, 'bm')&quot; value=&quot;1&quot; size=&quot;4&quot; class=&quot;text&quot; /&gt;/100&lt;/label&gt; &lt;label title=&quot;Loop or not?&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;&lt;input name=&quot;checkLoopbm&quot; type=&quot;checkbox&quot; id=&quot;checkLoopbm&quot; checked=&quot;checked&quot;/&gt;Loop&lt;/label&gt; &lt;label title=&quot;Time interval for the animation (in sec)&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;Time Interval: &lt;input name=&quot;txtIntervalbm&quot; type=&quot;text&quot; id=&quot;txtIntervalbm&quot; onblur=&quot;txtInterval(this)&quot; value=&quot;0.05&quot; size=&quot;4&quot; class=&quot;text&quot; /&gt;&lt;/label&gt; &lt;label title=&quot;Increment in time interval&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;Step: &lt;input name=&quot;txtStepbm&quot; type=&quot;text&quot; id=&quot;txtStepbm&quot; onblur=&quot;txtInterval(this)&quot; value=&quot;0.1&quot; size=&quot;4&quot; class=&quot;text&quot; /&gt;&lt;/label&gt;&lt;/div&gt;&lt;hr /&gt;&lt;div class=&quot;description&quot;&gt;
Random walk on the 2D plane: for each point (x, y), x = x + rnorm(1) and y = y + rnorm(1).
&lt;/div&gt;&lt;/fieldset&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Brownian Motion&quot; [1958-2939] --&gt;
&lt;h3&gt;&lt;a name=&quot;gradient_polygons&quot; id=&quot;gradient_polygons&quot;&gt;Gradient polygons&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;

Here is some code to produce an animation illustrating the gradient colors in polygons.
&lt;/p&gt;
&lt;pre class=&quot;code r&quot;&gt;&lt;span class=&quot;re5&quot;&gt;y&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;0.1&lt;/span&gt; + &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=runif&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;runif&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, 0&lt;span class=&quot;re5&quot;&gt;.2&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;xx&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;yy&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0, &lt;span class=&quot;re5&quot;&gt;y&lt;/span&gt;, 0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;cl&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=seq&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;seq&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;, 0, &lt;span class=&quot;re5&quot;&gt;length&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=for&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;i &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=in&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;re5&quot;&gt;yy&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=rbind&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;rbind&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;yy&lt;/span&gt;, &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0, y - &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; - cl&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;/&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; * &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=min&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;min&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, 0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=plot&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;plot&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;xx&lt;/span&gt;, yy&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;type&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;n&amp;quot;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;xlab&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;x&amp;quot;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;ylab&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;y&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=for&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;j &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=in&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;:i&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=polygon&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;polygon&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;xx&lt;/span&gt;, yy&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;j + &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;col&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=rgb&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;rgb&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, cl&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;j&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;/&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;,
        0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;border&lt;/span&gt; = &lt;span class=&quot;re1&quot;&gt;NA\&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=Sys.sleep&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;Sys.sleep&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
We can also put the animation in an &lt;acronym title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/acronym&gt; animation page like this:
&lt;/p&gt;
&lt;pre class=&quot;code r&quot;&gt;&lt;span class=&quot;re5&quot;&gt;oopt&lt;/span&gt; = ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=options&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;options&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;interval&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.2&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;nmax&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;, ani&lt;span class=&quot;re5&quot;&gt;.dev&lt;/span&gt; = &lt;span class=&quot;re5&quot;&gt;png&lt;/span&gt;, ani&lt;span class=&quot;re5&quot;&gt;.type&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;png&amp;quot;&lt;/span&gt;,
    ani&lt;span class=&quot;re5&quot;&gt;.height&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;350&lt;/span&gt;, ani&lt;span class=&quot;re5&quot;&gt;.width&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;500&lt;/span&gt;,
    &lt;span class=&quot;re5&quot;&gt;title&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;Demonstration of Polygons with Gradient Colors&amp;quot;&lt;/span&gt;,
    &lt;span class=&quot;re5&quot;&gt;description&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;The graph actually consists of a series of polygons, 
    each with a redder color starting from yellow.&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=start&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;start&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;opar&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=par&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;par&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;mar&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;mgp&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;.5&lt;/span&gt;, 0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;tcl&lt;/span&gt; = -0&lt;span class=&quot;re5&quot;&gt;.3&lt;/span&gt;,
    cex&lt;span class=&quot;re5&quot;&gt;.axis&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.8&lt;/span&gt;, cex&lt;span class=&quot;re5&quot;&gt;.lab&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.8&lt;/span&gt;, cex&lt;span class=&quot;re5&quot;&gt;.main&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;####################&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;y&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;0.1&lt;/span&gt; + &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=runif&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;runif&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, 0&lt;span class=&quot;re5&quot;&gt;.2&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;xx&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;yy&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0, &lt;span class=&quot;re5&quot;&gt;y&lt;/span&gt;, 0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;cl&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=seq&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;seq&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;, 0, &lt;span class=&quot;re5&quot;&gt;length&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=for&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;i &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=in&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;re5&quot;&gt;yy&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=rbind&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;rbind&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;yy&lt;/span&gt;, &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;0, y - &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; - cl&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;/&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; * &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=min&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;min&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, 0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=plot&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;plot&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;xx&lt;/span&gt;, yy&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;type&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;n&amp;quot;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;xlab&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;x&amp;quot;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;ylab&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;y&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=for&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;j &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=in&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;:i&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=polygon&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;polygon&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;xx&lt;/span&gt;, yy&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;j + &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;col&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=rgb&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;rgb&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, cl&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;j&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;/&lt;span class=&quot;nu0&quot;&gt;255&lt;/span&gt;,
        0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;border&lt;/span&gt; = &lt;span class=&quot;re1&quot;&gt;NA\&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;co3&quot;&gt;#    Sys.sleep(0.1)&lt;/span&gt;
&lt;span class=&quot;co3&quot;&gt;#    not need to 'sleep' here!&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;####################&lt;/span&gt;
&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=par&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;par&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;opar&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=stop&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;stop&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=options&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;options&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;oopt&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
This is the animation (it may look different with your output because &lt;code&gt;y&lt;/code&gt; is random):
&lt;/p&gt;

&lt;p&gt;
&lt;div align=&quot;center&quot; class=&quot;anidemo&quot; title=&quot;Demonstration of Polygons with Gradient Colors&quot;&gt;&lt;fieldset&gt;&lt;legend align=&quot;center&quot;&gt;Demonstration of Polygons with Gradient Colors&lt;/legend&gt;&lt;div id=&quot;loadinggp&quot; class=&quot;loading&quot;&gt;loading animation frames... 0%&lt;/div&gt;&lt;div id=&quot;divPreloadgp&quot; class=&quot;divPreload&quot;&gt;&lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&gt;	var sourcegp = &quot;http://i288.photobucket.com/albums/ll181/xieyihui/gradient_polygons/&quot;;	var imgtypegp = &quot;png&quot;;	var tmpgp = 0;	var nmaxgp=50; 	var ngp=1;	var tgp;	for(i = 1; i &lt;= nmaxgp; i++){		document.write(&quot;&lt;div class=\&quot;divFrame\&quot; id=\&quot;divPreload&quot; + &quot;gp&quot; + i + &quot;\&quot;&gt;&lt;img src=\&quot;&quot; + sourcegp + i + &quot;.&quot; + imgtypegp + &quot;\&quot;&quot; + &quot; id = \&quot;img&quot; + &quot;gp&quot; + i + &quot;\&quot; onload = \&quot;loading(\'gp\')\&quot; onerror = \&quot;loading(\'gp\')\&quot; alt=\&quot;Demonstration of Polygons with Gradient Colors\&quot; title=\&quot;Demonstration of Polygons with Gradient Colors\&quot; /&gt;&lt;/div&gt;&quot;);}&lt;/script&gt;&lt;/div&gt;&lt;div class=&quot;btncontrol&quot;&gt;&lt;input name=&quot;nmaxgp&quot; type=&quot;hidden&quot; id=&quot;nmaxgp&quot; value=&quot;50&quot; /&gt;&lt;input name=&quot;heightgp&quot; type=&quot;hidden&quot; id=&quot;heightgp&quot; value=&quot;350&quot; /&gt;&lt;input name=&quot;btnPlaygp&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnPlaygp&quot; title=&quot;Play&quot; onclick=&quot;playAni('gp')&quot; value=&quot;  &amp;gt;  &quot; /&gt; &lt;input name=&quot;btnPausegp&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnPausegp&quot; title=&quot;Pause&quot; onclick=&quot;pauseAni('gp')&quot; value=&quot;  O  &quot; /&gt; &lt;input name=&quot;btnFastgp&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnFastgp&quot; title=&quot;Speed up&quot; onclick=&quot;fastAni('gp',1)&quot; value=&quot;  +  &quot; /&gt; &lt;input name=&quot;btnSlowgp&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnSlowgp&quot; title=&quot;Slow down&quot; onclick=&quot;fastAni('gp',-1)&quot; value=&quot;  -  &quot; /&gt; &lt;input name=&quot;btnPrevgp&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnPrevgp&quot; title=&quot;Previous frame&quot; onclick=&quot;prevAni('gp',1)&quot; value=&quot;  &amp;lt;&amp;lt;  &quot; /&gt; &lt;input name=&quot;btnNextgp&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnNextgp&quot; title=&quot;Next frame&quot; onclick=&quot;prevAni('gp',-1)&quot; value=&quot;  &amp;gt;&amp;gt;  &quot; /&gt; &lt;input name=&quot;btnFirstgp&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnFirstgp&quot; title=&quot;First frame&quot; onclick=&quot;firstAni('gp',true)&quot; value=&quot;  |&amp;lt;  &quot; /&gt; &lt;input name=&quot;btnLastgp&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnLastgp&quot; title=&quot;Last frame&quot; onclick=&quot;firstAni('gp',false)&quot; value=&quot;  &amp;gt;|  &quot; /&gt; &lt;input name=&quot;btnMoregp&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnMoregp&quot; title=&quot;More controls&quot; onclick=&quot;btnMore('gp')&quot; value=&quot;  &amp;lt;&amp;gt;  &quot; /&gt;&lt;/div&gt;&lt;div id=&quot;morePargp&quot; class=&quot;morepar&quot;&gt;&lt;label title=&quot;Which frame to go?&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;View frame &lt;input name=&quot;txtFramegp&quot; type=&quot;text&quot; id=&quot;txtFramegp&quot; onblur=&quot;txtFrame(this.value, 'gp')&quot; value=&quot;1&quot; size=&quot;4&quot; class=&quot;text&quot; /&gt;/50&lt;/label&gt; &lt;label title=&quot;Loop or not?&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;&lt;input name=&quot;checkLoopgp&quot; type=&quot;checkbox&quot; id=&quot;checkLoopgp&quot; checked=&quot;checked&quot;/&gt;Loop&lt;/label&gt; &lt;label title=&quot;Time interval for the animation (in sec)&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;Time Interval: &lt;input name=&quot;txtIntervalgp&quot; type=&quot;text&quot; id=&quot;txtIntervalgp&quot; onblur=&quot;txtInterval(this)&quot; value=&quot;0.2&quot; size=&quot;4&quot; class=&quot;text&quot; /&gt;&lt;/label&gt; &lt;label title=&quot;Increment in time interval&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;Step: &lt;input name=&quot;txtStepgp&quot; type=&quot;text&quot; id=&quot;txtStepgp&quot; onblur=&quot;txtInterval(this)&quot; value=&quot;0.1&quot; size=&quot;4&quot; class=&quot;text&quot; /&gt;&lt;/label&gt;&lt;/div&gt;&lt;hr /&gt;&lt;div class=&quot;description&quot;&gt;
The graph actually consists of a series of polygons, each with a redder color starting from yellow.
&lt;/div&gt;&lt;/fieldset&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Gradient polygons&quot; [2940-4729] --&gt;
&lt;h3&gt;&lt;a name=&quot;other_graphics_devices&quot; id=&quot;other_graphics_devices&quot;&gt;Other graphics devices&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;

Here is an example of using the device &lt;code&gt;CairoPNG()&lt;/code&gt; device in the &lt;code&gt;Cairo&lt;/code&gt; package to record image frames (Thanks, Ivan Porro):
&lt;/p&gt;
&lt;pre class=&quot;code r&quot;&gt;&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=library&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;library&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;Cairo&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=library&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;library&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;animation&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;oopt&lt;/span&gt; = ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=options&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;options&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;interval&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.05&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;nmax&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;, ani&lt;span class=&quot;re5&quot;&gt;.dev&lt;/span&gt; = &lt;span class=&quot;re5&quot;&gt;CairoPNG&lt;/span&gt;, 
    &lt;span class=&quot;re5&quot;&gt;title&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;Demonstration of Brownian Motion&amp;quot;&lt;/span&gt;, 
    &lt;span class=&quot;re5&quot;&gt;description&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;Random walk on the 2D plane&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=start&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;start&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;opar&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=par&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;par&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;mar&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;mgp&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;, 0&lt;span class=&quot;re5&quot;&gt;.5&lt;/span&gt;, 
    0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;tcl&lt;/span&gt; = -0&lt;span class=&quot;re5&quot;&gt;.3&lt;/span&gt;, cex&lt;span class=&quot;re5&quot;&gt;.axis&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.8&lt;/span&gt;, cex&lt;span class=&quot;re5&quot;&gt;.lab&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.8&lt;/span&gt;, cex&lt;span class=&quot;re5&quot;&gt;.main&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
brownian.motion&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;pch&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;cex&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;col&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;red&amp;quot;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;bg&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;yellow&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=par&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;par&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;opar&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=stop&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;stop&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=options&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;options&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;oopt&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;!-- SECTION &quot;Other graphics devices&quot; [4730-5344] --&gt;
&lt;h2&gt;&lt;a name=&quot;discussions&quot; id=&quot;discussions&quot;&gt;Discussions&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

Post the discussions here. &lt;img src=&quot;http://animation.yihui.name/lib/images/smileys/icon_fun.gif&quot; class=&quot;middle&quot; alt=&quot;^_^&quot; /&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Discussions&quot; [5345-] --&gt;&lt;div class=&quot;footnotes&quot;&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__1&quot; id=&quot;fn__1&quot; name=&quot;fn__1&quot; class=&quot;fn_bot&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; 
it will be created if it does not exist, or all the files in this directory will be removed before new plots are made&lt;/div&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__2&quot; id=&quot;fn__2&quot; name=&quot;fn__2&quot; class=&quot;fn_bot&quot;&gt;2)&lt;/a&gt;&lt;/sup&gt; 
just use &lt;code&gt;cat()&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
</description>
            <author>Yihui Xie</author>
        <category>animation</category>
            <pubDate>Tue, 10 Nov 2009 09:36:53 -0700</pubDate>
        </item>
        <item>
            <title>Least Squares - created</title>
            <link>http://animation.yihui.name/lm:least_squares?rev=1257718003</link>
            <description>


&lt;h1&gt;&lt;a name=&quot;least_squares&quot; id=&quot;least_squares&quot;&gt;Least Squares&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

What does “least” mean in “Least Squares”?
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Least Squares&quot; [1-73] --&gt;
&lt;h2&gt;&lt;a name=&quot;animation&quot; id=&quot;animation&quot;&gt;Animation&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

&lt;div align=&quot;center&quot; class=&quot;anidemo&quot; title=&quot;Demonstration of Least Squares (Slope)&quot;&gt;&lt;fieldset&gt;&lt;legend align=&quot;center&quot;&gt;Demonstration of Least Squares (Slope)&lt;/legend&gt;&lt;div id=&quot;loadingOLS&quot; class=&quot;loading&quot;&gt;loading animation frames... 0%&lt;/div&gt;&lt;div id=&quot;divPreloadOLS&quot; class=&quot;divPreload&quot;&gt;&lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&gt;	var sourceOLS = &quot;http://animation.r-forge.r-project.org/frames/least_squares/&quot;;	var imgtypeOLS = &quot;png&quot;;	var tmpOLS = 0;	var nmaxOLS=50; 	var nOLS=1;	var tOLS;	for(i = 1; i &lt;= nmaxOLS; i++){		document.write(&quot;&lt;div class=\&quot;divFrame\&quot; id=\&quot;divPreload&quot; + &quot;OLS&quot; + i + &quot;\&quot;&gt;&lt;img src=\&quot;&quot; + sourceOLS + i + &quot;.&quot; + imgtypeOLS + &quot;\&quot;&quot; + &quot; id = \&quot;img&quot; + &quot;OLS&quot; + i + &quot;\&quot; onload = \&quot;loading(\'OLS\')\&quot; onerror = \&quot;loading(\'OLS\')\&quot; alt=\&quot;Demonstration of Least Squares (Slope)\&quot; title=\&quot;Demonstration of Least Squares (Slope)\&quot; /&gt;&lt;/div&gt;&quot;);}&lt;/script&gt;&lt;/div&gt;&lt;div class=&quot;btncontrol&quot;&gt;&lt;input name=&quot;nmaxOLS&quot; type=&quot;hidden&quot; id=&quot;nmaxOLS&quot; value=&quot;50&quot; /&gt;&lt;input name=&quot;heightOLS&quot; type=&quot;hidden&quot; id=&quot;heightOLS&quot; value=&quot;450&quot; /&gt;&lt;input name=&quot;btnPlayOLS&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnPlayOLS&quot; title=&quot;Play&quot; onclick=&quot;playAni('OLS')&quot; value=&quot;  &amp;gt;  &quot; /&gt; &lt;input name=&quot;btnPauseOLS&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnPauseOLS&quot; title=&quot;Pause&quot; onclick=&quot;pauseAni('OLS')&quot; value=&quot;  O  &quot; /&gt; &lt;input name=&quot;btnFastOLS&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnFastOLS&quot; title=&quot;Speed up&quot; onclick=&quot;fastAni('OLS',1)&quot; value=&quot;  +  &quot; /&gt; &lt;input name=&quot;btnSlowOLS&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnSlowOLS&quot; title=&quot;Slow down&quot; onclick=&quot;fastAni('OLS',-1)&quot; value=&quot;  -  &quot; /&gt; &lt;input name=&quot;btnPrevOLS&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnPrevOLS&quot; title=&quot;Previous frame&quot; onclick=&quot;prevAni('OLS',1)&quot; value=&quot;  &amp;lt;&amp;lt;  &quot; /&gt; &lt;input name=&quot;btnNextOLS&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnNextOLS&quot; title=&quot;Next frame&quot; onclick=&quot;prevAni('OLS',-1)&quot; value=&quot;  &amp;gt;&amp;gt;  &quot; /&gt; &lt;input name=&quot;btnFirstOLS&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnFirstOLS&quot; title=&quot;First frame&quot; onclick=&quot;firstAni('OLS',true)&quot; value=&quot;  |&amp;lt;  &quot; /&gt; &lt;input name=&quot;btnLastOLS&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnLastOLS&quot; title=&quot;Last frame&quot; onclick=&quot;firstAni('OLS',false)&quot; value=&quot;  &amp;gt;|  &quot; /&gt; &lt;input name=&quot;btnMoreOLS&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnMoreOLS&quot; title=&quot;More controls&quot; onclick=&quot;btnMore('OLS')&quot; value=&quot;  &amp;lt;&amp;gt;  &quot; /&gt;&lt;/div&gt;&lt;div id=&quot;moreParOLS&quot; class=&quot;morepar&quot;&gt;&lt;label title=&quot;Which frame to go?&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;View frame &lt;input name=&quot;txtFrameOLS&quot; type=&quot;text&quot; id=&quot;txtFrameOLS&quot; onblur=&quot;txtFrame(this.value, 'OLS')&quot; value=&quot;1&quot; size=&quot;4&quot; class=&quot;text&quot; /&gt;/50&lt;/label&gt; &lt;label title=&quot;Loop or not?&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;&lt;input name=&quot;checkLoopOLS&quot; type=&quot;checkbox&quot; id=&quot;checkLoopOLS&quot; checked=&quot;checked&quot;/&gt;Loop&lt;/label&gt; &lt;label title=&quot;Time interval for the animation (in sec)&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;Time Interval: &lt;input name=&quot;txtIntervalOLS&quot; type=&quot;text&quot; id=&quot;txtIntervalOLS&quot; onblur=&quot;txtInterval(this)&quot; value=&quot;0.3&quot; size=&quot;4&quot; class=&quot;text&quot; /&gt;&lt;/label&gt; &lt;label title=&quot;Increment in time interval&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;Step: &lt;input name=&quot;txtStepOLS&quot; type=&quot;text&quot; id=&quot;txtStepOLS&quot; onblur=&quot;txtInterval(this)&quot; value=&quot;0.1&quot; size=&quot;4&quot; class=&quot;text&quot; /&gt;&lt;/label&gt;&lt;/div&gt;&lt;hr /&gt;&lt;div class=&quot;description&quot;&gt;
We want to find an estimate for the slope in 50 candidate slopes, so we just compute the &lt;acronym title=&quot;Rich Site Summary&quot;&gt;RSS&lt;/acronym&gt; one by one. 
&lt;/div&gt;&lt;/fieldset&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Animation&quot; [74-335] --&gt;
&lt;h2&gt;&lt;a name=&quot;r_code&quot; id=&quot;r_code&quot;&gt;R Code&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;pre class=&quot;code r&quot;&gt;&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=library&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;library&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;animation&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=options&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;options&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;interval&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.3&lt;/span&gt;, ani&lt;span class=&quot;re5&quot;&gt;.height&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;450&lt;/span&gt;, ani&lt;span class=&quot;re5&quot;&gt;.width&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;600&lt;/span&gt;, 
    &lt;span class=&quot;re5&quot;&gt;title&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;Demonstration of Least Squares (Slope)&amp;quot;&lt;/span&gt;, 
    &lt;span class=&quot;re5&quot;&gt;description&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;We want to find an estimate for the slope
                   in 50 candidate slopes, so we just compute the RSS one by one. &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=start&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;start&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=par&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;par&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;mar&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;, 0&lt;span class=&quot;re5&quot;&gt;.5&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;mgp&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;, 0&lt;span class=&quot;re5&quot;&gt;.5&lt;/span&gt;, 0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;tcl&lt;/span&gt; = -&lt;span class=&quot;nu0&quot;&gt;0.3&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;## slope changing&lt;/span&gt;
least.squares&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=stop&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;stop&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;## or with intercept changing&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=options&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;options&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;interval&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.3&lt;/span&gt;, ani&lt;span class=&quot;re5&quot;&gt;.height&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;450&lt;/span&gt;, ani&lt;span class=&quot;re5&quot;&gt;.width&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;600&lt;/span&gt;, 
    &lt;span class=&quot;re5&quot;&gt;title&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;Demonstration of Least Squares (Intercept)&amp;quot;&lt;/span&gt;, 
    &lt;span class=&quot;re5&quot;&gt;description&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;We want to find an estimate for the intercept
                   in 50 candidate intercetps, so we just compute the RSS one by one. &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=start&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;start&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=par&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;par&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;mar&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;, 0&lt;span class=&quot;re5&quot;&gt;.5&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;mgp&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;, 0&lt;span class=&quot;re5&quot;&gt;.5&lt;/span&gt;, 0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;tcl&lt;/span&gt; = -&lt;span class=&quot;nu0&quot;&gt;0.3&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;co3&quot;&gt;# slope changing&lt;/span&gt;
least.squares&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ani&lt;span class=&quot;re5&quot;&gt;.type&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;intercept&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=stop&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;stop&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;!-- SECTION &quot;R Code&quot; [336-] --&gt;</description>
            <author>Yihui Xie</author>
        <category>lm</category>
            <pubDate>Sun, 08 Nov 2009 15:06:43 -0700</pubDate>
        </item>
        <item>
            <title>Linear Models - created</title>
            <link>http://animation.yihui.name/lm:start?rev=1257712591</link>
            <description>


&lt;h1&gt;&lt;a name=&quot;linear_models&quot; id=&quot;linear_models&quot;&gt;Linear Models&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Linear Models&quot; [1-29] --&gt;
&lt;h2&gt;&lt;a name=&quot;list_of_animations&quot; id=&quot;list_of_animations&quot;&gt;List of animations&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;th class=&quot;col0&quot;&gt; topic &lt;/th&gt;&lt;th class=&quot;col1&quot;&gt; description &lt;/th&gt;&lt;th class=&quot;col2&quot;&gt; preview &lt;/th&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/lm:least_squares&quot; class=&quot;wikilink1&quot; title=&quot;lm:least_squares&quot;&gt;Least Squares&lt;/a&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; See how the residual sum of squares will change according to different sets of slopes or intercepts. &lt;/td&gt;&lt;td class=&quot;col2&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/lm:least_squares&quot; class=&quot;media&quot; title=&quot;lm:least_squares&quot;&gt;&lt;img src=&quot;http://animation.yihui.name/lib/exe/fetch.php?w=200&amp;amp;h=200&amp;amp;media=http%3A%2F%2Fanimation.r-forge.r-project.org%2Fframes%2Fleast_squares%2F50.png&quot; class=&quot;media&quot; alt=&quot;&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt; &lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;List of animations&quot; [30-] --&gt;</description>
            <author>Yihui Xie</author>
        <category>lm</category>
            <pubDate>Sun, 08 Nov 2009 13:36:31 -0700</pubDate>
        </item>
        <item>
            <title>Brownian Motion - create animations when using lattice</title>
            <link>http://animation.yihui.name/prob:brownian_motion?rev=1257214587</link>
            <description>


&lt;h1&gt;&lt;a name=&quot;brownian_motion&quot; id=&quot;brownian_motion&quot;&gt;Brownian Motion&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

The function &lt;code&gt;brownian.motion()&lt;/code&gt; has illustrated the phenomenon of &lt;a href=&quot;http://en.wikipedia.org/wiki/random_walk&quot; class=&quot;interwiki iw_wp&quot; target=&quot;_blank&quot; title=&quot;http://en.wikipedia.org/wiki/random_walk&quot;&gt;Random Walk&lt;/a&gt; on the 2D plane. For a point &lt;code&gt;(x, y)&lt;/code&gt;, its next location is &lt;code&gt;(x + rnorm(1), y + rnorm(1))&lt;/code&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Brownian Motion&quot; [1-228] --&gt;
&lt;h2&gt;&lt;a name=&quot;r_code&quot; id=&quot;r_code&quot;&gt;R code&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;pre class=&quot;code r&quot;&gt;&lt;span class=&quot;co3&quot;&gt;# create an HTML animation page of Brownian Motion&lt;/span&gt;
&lt;span class=&quot;co3&quot;&gt;# store the old option to restore it later&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;oopt&lt;/span&gt; = ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=options&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;options&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;interval&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.05&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;nmax&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;, ani&lt;span class=&quot;re5&quot;&gt;.dev&lt;/span&gt; = &lt;span class=&quot;re5&quot;&gt;png&lt;/span&gt;, ani&lt;span class=&quot;re5&quot;&gt;.type&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;png&amp;quot;&lt;/span&gt;,
    &lt;span class=&quot;re5&quot;&gt;title&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;Demonstration of Brownian Motion&amp;quot;&lt;/span&gt;,
    &lt;span class=&quot;re5&quot;&gt;description&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;Random walk on the 2D plane: for each point (x, y), 
    x = x + rnorm(1) and y = y + rnorm(1).&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=start&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;start&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;opar&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=par&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;par&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;mar&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;mgp&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;.5&lt;/span&gt;, 0&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;tcl&lt;/span&gt; = -0&lt;span class=&quot;re5&quot;&gt;.3&lt;/span&gt;,
    cex&lt;span class=&quot;re5&quot;&gt;.axis&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.8&lt;/span&gt;, cex&lt;span class=&quot;re5&quot;&gt;.lab&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.8&lt;/span&gt;, cex&lt;span class=&quot;re5&quot;&gt;.main&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
brownian.motion&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;pch&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;cex&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;col&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;red&amp;quot;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;bg&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;yellow&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=par&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;par&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;opar&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=stop&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;stop&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=options&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;options&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;oopt&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;!-- SECTION &quot;R code&quot; [229-834] --&gt;
&lt;h2&gt;&lt;a name=&quot;animation&quot; id=&quot;animation&quot;&gt;Animation&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

The animation is like this:
&lt;/p&gt;

&lt;p&gt;
&lt;div align=&quot;center&quot; class=&quot;anidemo&quot; title=&quot;Demonstration of Brownian Motion&quot;&gt;&lt;fieldset&gt;&lt;legend align=&quot;center&quot;&gt;Demonstration of Brownian Motion&lt;/legend&gt;&lt;div id=&quot;loadingbm&quot; class=&quot;loading&quot;&gt;loading animation frames... 0%&lt;/div&gt;&lt;div id=&quot;divPreloadbm&quot; class=&quot;divPreload&quot;&gt;&lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&gt;	var sourcebm = &quot;http://i288.photobucket.com/albums/ll181/xieyihui/brownian_motion/&quot;;	var imgtypebm = &quot;png&quot;;	var tmpbm = 0;	var nmaxbm=100; 	var nbm=1;	var tbm;	for(i = 1; i &lt;= nmaxbm; i++){		document.write(&quot;&lt;div class=\&quot;divFrame\&quot; id=\&quot;divPreload&quot; + &quot;bm&quot; + i + &quot;\&quot;&gt;&lt;img src=\&quot;&quot; + sourcebm + i + &quot;.&quot; + imgtypebm + &quot;\&quot;&quot; + &quot; id = \&quot;img&quot; + &quot;bm&quot; + i + &quot;\&quot; onload = \&quot;loading(\'bm\')\&quot; onerror = \&quot;loading(\'bm\')\&quot; alt=\&quot;Demonstration of Brownian Motion\&quot; title=\&quot;Demonstration of Brownian Motion\&quot; /&gt;&lt;/div&gt;&quot;);}&lt;/script&gt;&lt;/div&gt;&lt;div class=&quot;btncontrol&quot;&gt;&lt;input name=&quot;nmaxbm&quot; type=&quot;hidden&quot; id=&quot;nmaxbm&quot; value=&quot;100&quot; /&gt;&lt;input name=&quot;heightbm&quot; type=&quot;hidden&quot; id=&quot;heightbm&quot; value=&quot;480&quot; /&gt;&lt;input name=&quot;btnPlaybm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnPlaybm&quot; title=&quot;Play&quot; onclick=&quot;playAni('bm')&quot; value=&quot;  &amp;gt;  &quot; /&gt; &lt;input name=&quot;btnPausebm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnPausebm&quot; title=&quot;Pause&quot; onclick=&quot;pauseAni('bm')&quot; value=&quot;  O  &quot; /&gt; &lt;input name=&quot;btnFastbm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnFastbm&quot; title=&quot;Speed up&quot; onclick=&quot;fastAni('bm',1)&quot; value=&quot;  +  &quot; /&gt; &lt;input name=&quot;btnSlowbm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnSlowbm&quot; title=&quot;Slow down&quot; onclick=&quot;fastAni('bm',-1)&quot; value=&quot;  -  &quot; /&gt; &lt;input name=&quot;btnPrevbm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnPrevbm&quot; title=&quot;Previous frame&quot; onclick=&quot;prevAni('bm',1)&quot; value=&quot;  &amp;lt;&amp;lt;  &quot; /&gt; &lt;input name=&quot;btnNextbm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnNextbm&quot; title=&quot;Next frame&quot; onclick=&quot;prevAni('bm',-1)&quot; value=&quot;  &amp;gt;&amp;gt;  &quot; /&gt; &lt;input name=&quot;btnFirstbm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnFirstbm&quot; title=&quot;First frame&quot; onclick=&quot;firstAni('bm',true)&quot; value=&quot;  |&amp;lt;  &quot; /&gt; &lt;input name=&quot;btnLastbm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnLastbm&quot; title=&quot;Last frame&quot; onclick=&quot;firstAni('bm',false)&quot; value=&quot;  &amp;gt;|  &quot; /&gt; &lt;input name=&quot;btnMorebm&quot; type=&quot;submit&quot; disabled=&quot;disabled&quot; class=&quot;anibutton&quot; id=&quot;btnMorebm&quot; title=&quot;More controls&quot; onclick=&quot;btnMore('bm')&quot; value=&quot;  &amp;lt;&amp;gt;  &quot; /&gt;&lt;/div&gt;&lt;div id=&quot;moreParbm&quot; class=&quot;morepar&quot;&gt;&lt;label title=&quot;Which frame to go?&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;View frame &lt;input name=&quot;txtFramebm&quot; type=&quot;text&quot; id=&quot;txtFramebm&quot; onblur=&quot;txtFrame(this.value, 'bm')&quot; value=&quot;1&quot; size=&quot;4&quot; class=&quot;text&quot; /&gt;/100&lt;/label&gt; &lt;label title=&quot;Loop or not?&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;&lt;input name=&quot;checkLoopbm&quot; type=&quot;checkbox&quot; id=&quot;checkLoopbm&quot; checked=&quot;checked&quot;/&gt;Loop&lt;/label&gt; &lt;label title=&quot;Time interval for the animation (in sec)&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;Time Interval: &lt;input name=&quot;txtIntervalbm&quot; type=&quot;text&quot; id=&quot;txtIntervalbm&quot; onblur=&quot;txtInterval(this)&quot; value=&quot;0.05&quot; size=&quot;4&quot; class=&quot;text&quot; /&gt;&lt;/label&gt; &lt;label title=&quot;Increment in time interval&quot; onmouseover=&quot;this.style.backgroundColor='#8cacbb'&quot; onmouseout=&quot;this.style.backgroundColor='#ffffff'&quot;&gt;Step: &lt;input name=&quot;txtStepbm&quot; type=&quot;text&quot; id=&quot;txtStepbm&quot; onblur=&quot;txtInterval(this)&quot; value=&quot;0.1&quot; size=&quot;4&quot; class=&quot;text&quot; /&gt;&lt;/label&gt;&lt;/div&gt;&lt;hr /&gt;&lt;div class=&quot;description&quot;&gt;
Random walk on the 2D plane: for each point (x, y), x = x + rnorm(1) and y = y + rnorm(1).
&lt;/div&gt;&lt;/fieldset&gt;&lt;/div&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Animation&quot; [835-1111] --&gt;
&lt;h2&gt;&lt;a name=&quot;other_resources&quot; id=&quot;other_resources&quot;&gt;Other resources&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; I find this Java applet is much more interesting than my function: &lt;a href=&quot;http://galileoandeinstein.physics.virginia.edu/more_stuff/Applets/brownian/brownian.html&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://galileoandeinstein.physics.virginia.edu/more_stuff/Applets/brownian/brownian.html&quot;  rel=&quot;nofollow&quot;&gt;Einstein&amp;#039;s Explanation of Brownian Motion&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Other resources&quot; [1112-1347] --&gt;
&lt;h2&gt;&lt;a name=&quot;reminder_to_lattice_users&quot; id=&quot;reminder_to_lattice_users&quot;&gt;Reminder to lattice users&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

If you use the &lt;code&gt;lattice&lt;/code&gt; package, don&amp;#039;t forget to &lt;code&gt;print()&lt;/code&gt; your plots, otherwise graphics devices like &lt;code&gt;png()&lt;/code&gt;
 will not be able to record your images. Here is an example:
&lt;/p&gt;
&lt;pre class=&quot;code r&quot;&gt;&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=library&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;library&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;animation&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=library&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;library&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;lattice&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
bm&lt;span class=&quot;re5&quot;&gt;.mat&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=data.frame&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;data.frame&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;x&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=rnorm&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;rnorm&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;y&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=rnorm&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;rnorm&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;re5&quot;&gt;oopt&lt;/span&gt; = ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=options&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;options&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;interval&lt;/span&gt; = 0&lt;span class=&quot;re5&quot;&gt;.05&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;nmax&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;, ani&lt;span class=&quot;re5&quot;&gt;.dev&lt;/span&gt; = &lt;span class=&quot;re5&quot;&gt;png&lt;/span&gt;, ani&lt;span class=&quot;re5&quot;&gt;.type&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;png&amp;quot;&lt;/span&gt;,
    &lt;span class=&quot;re5&quot;&gt;title&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;Demonstration of Brownian Motion&amp;quot;&lt;/span&gt;,
    &lt;span class=&quot;re5&quot;&gt;description&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;&amp;quot;Random walk on the 2D plane: for each point (x, y), 
    x = x + rnorm(1) and y = y + rnorm(1).&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;## Brownian Motion in lattice&lt;/span&gt;
&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=for&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;i &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=in&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;:ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=options&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;options&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;nmax&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=print&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;print&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;xyplot&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y ~ &lt;span class=&quot;re5&quot;&gt;x&lt;/span&gt;, bm&lt;span class=&quot;re5&quot;&gt;.mat&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;xlim&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;ylim&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=c&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;c&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;, 
        &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;pch&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;19&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    bm&lt;span class=&quot;re5&quot;&gt;.mat&lt;/span&gt; = bm.mat + &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=data.frame&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;data.frame&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re5&quot;&gt;x&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=rnorm&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;rnorm&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;re5&quot;&gt;y&lt;/span&gt; = &lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=rnorm&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;rnorm&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=stop&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;stop&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; 
ani.&lt;a target=&quot;_blank&quot;  href=&quot;http://wiki.r-project.org/rwiki/rhelp.php?id=options&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;options&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;oopt&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;!-- SECTION &quot;Reminder to lattice users&quot; [1348-] --&gt;</description>
            <author>Yihui Xie</author>
        <category>prob</category>
            <pubDate>Mon, 02 Nov 2009 19:16:27 -0700</pubDate>
        </item>
        <item>
            <title>Computational Statistics - old revision restored</title>
            <link>http://animation.yihui.name/compstat:start?rev=1251731567</link>
            <description>


&lt;h1&gt;&lt;a name=&quot;computational_statistics&quot; id=&quot;computational_statistics&quot;&gt;Computational Statistics&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

Introduction. &lt;img src=&quot;http://animation.yihui.name/lib/images/smileys/fixme.gif&quot; class=&quot;middle&quot; alt=&quot;FIXME&quot; /&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Computational Statistics&quot; [1-61] --&gt;
&lt;h2&gt;&lt;a name=&quot;list_of_animations&quot; id=&quot;list_of_animations&quot;&gt;List of animations&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/compstat:bisection_method&quot; class=&quot;wikilink1&quot; title=&quot;compstat:bisection_method&quot;&gt;the Bisection Method for Root-finding on an Interval&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/compstat:newton_s_method&quot; class=&quot;wikilink1&quot; title=&quot;compstat:newton_s_method&quot;&gt;the Newton-Raphson Method for Root-finding&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/compstat:gradient_descent_algorithm&quot; class=&quot;wikilink1&quot; title=&quot;compstat:gradient_descent_algorithm&quot;&gt;Gradient Descent Algorithm in the 2D Plane&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;List of animations&quot; [62-] --&gt;</description>
            <author>Yihui Xie</author>
        <category>compstat</category>
            <pubDate>Mon, 31 Aug 2009 09:12:47 -0700</pubDate>
        </item>
        <item>
            <title>About this wiki - old revision restored</title>
            <link>http://animation.yihui.name/wiki:start?rev=1251731567</link>
            <description>


&lt;h1&gt;&lt;a name=&quot;about_this_wiki&quot; id=&quot;about_this_wiki&quot;&gt;About this wiki&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;About this wiki&quot; [1-31] --&gt;
&lt;h2&gt;&lt;a name=&quot;history_developments&quot; id=&quot;history_developments&quot;&gt;History &amp;amp; Developments&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

You can read the &lt;a href=&quot;http://animation.yihui.name/wiki:developments&quot; class=&quot;wikilink1&quot; title=&quot;wiki:developments&quot;&gt;history and developments&lt;/a&gt; of this wiki.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;History &amp; Developments&quot; [32-146] --&gt;
&lt;h2&gt;&lt;a name=&quot;usage&quot; id=&quot;usage&quot;&gt;Usage&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Usage&quot; [147-165] --&gt;
&lt;h3&gt;&lt;a name=&quot;wiki_syntax&quot; id=&quot;wiki_syntax&quot;&gt;Wiki syntax&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;

Please learn the wiki &lt;a href=&quot;http://animation.yihui.name/wiki:syntax&quot; class=&quot;wikilink1&quot; title=&quot;wiki:syntax&quot;&gt;Formatting Syntax&lt;/a&gt; first if you are not familiar with Dokuwiki; and you may practise in the &lt;a href=&quot;http://animation.yihui.name/wiki:playground&quot; class=&quot;wikilink2&quot; title=&quot;wiki:playground&quot; rel=&quot;nofollow&quot;&gt;PlayGround&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Wiki syntax&quot; [166-320] --&gt;
&lt;h3&gt;&lt;a name=&quot;animation_syntax&quot; id=&quot;animation_syntax&quot;&gt;Animation syntax&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;

Please refer to the &lt;a href=&quot;http://animation.yihui.name/wiki:animation_example&quot; class=&quot;wikilink1&quot; title=&quot;wiki:animation_example&quot;&gt;animation example page&lt;/a&gt; and &lt;a href=&quot;http://animation.yihui.name/wiki:animation_plugin&quot; class=&quot;wikilink1&quot; title=&quot;wiki:animation_plugin&quot;&gt;plugin page&lt;/a&gt; to learn how to insert animations into wiki pages and use the &lt;acronym title=&quot;HyperText Markup Language&quot;&gt;HTML&lt;/acronym&gt; animation interface.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Animation syntax&quot; [321-539] --&gt;
&lt;h3&gt;&lt;a name=&quot;math_syntax&quot; id=&quot;math_syntax&quot;&gt;Math syntax&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;

Please refer to the &lt;a href=&quot;http://animation.yihui.name/wiki:math&quot; class=&quot;wikilink1&quot; title=&quot;wiki:math&quot;&gt;mathematical formula page&lt;/a&gt; to learn how to insert mathematical formulae into wiki pages. I assume you have learned enough knowledge about &lt;code&gt;TeX/LaTeX&lt;/code&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Math syntax&quot; [540-744] --&gt;
&lt;h3&gt;&lt;a name=&quot;access_permission&quot; id=&quot;access_permission&quot;&gt;Access permission&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;

Ordinary visitors and registered users have different permissions:

&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; all visitors can read/edit any page&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/doku.php?id=start&amp;amp;do=register&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://animation.yihui.name/doku.php?id=start&amp;amp;do=register&quot;  rel=&quot;nofollow&quot;&gt;registered users&lt;/a&gt; are allowed to &lt;a href=&quot;http://www.dokuwiki.org/wiki%3Afaq%3Aaddpages&quot; class=&quot;interwiki iw_doku&quot; target=&quot;_blank&quot; title=&quot;http://www.dokuwiki.org/wiki%3Afaq%3Aaddpages&quot;&gt;create new pages&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Access permission&quot; [745-1024] --&gt;
&lt;h3&gt;&lt;a name=&quot;uploading&quot; id=&quot;uploading&quot;&gt;Uploading&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;

As this wiki is financially supported by &lt;a href=&quot;http://animation.yihui.name/wiki:yihui_xie&quot; class=&quot;wikilink1&quot; title=&quot;wiki:yihui_xie&quot;&gt;Yihui&lt;/a&gt; alone, the space is quite limited for uploading materials; thus you may consider uploading your stuff to other file/image hosting sites, e.g.

&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Images: &lt;a href=&quot;http://photobucket.com&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://photobucket.com&quot;  rel=&quot;nofollow&quot;&gt;Photobucket&lt;/a&gt; (recommended&lt;sup&gt;&lt;a href=&quot;#fn__1&quot; name=&quot;fnt__1&quot; id=&quot;fnt__1&quot; class=&quot;fn_top&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt;), &lt;a href=&quot;http://picasaweb.google.com&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://picasaweb.google.com&quot;  rel=&quot;nofollow&quot;&gt;Picasa&lt;/a&gt;, or &lt;a href=&quot;http://www.flickr.com&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.flickr.com&quot;  rel=&quot;nofollow&quot;&gt;Flickr&lt;/a&gt;, etc.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Files: &lt;a href=&quot;http://www.mediafire.com&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.mediafire.com&quot;  rel=&quot;nofollow&quot;&gt;MediaFile&lt;/a&gt;, etc.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;

Or you can just send the files to me via Email &lt;a href=&quot;mailto:xie%20%5Bat%5D%20yihui%20%5Bdot%5D%20name&quot; class=&quot;mail JSnocheck&quot; title=&quot;xie [at] yihui [dot] name&quot;&gt;xie@yihui.name&lt;/a&gt; and I&amp;#039;ll upload them for you (to &lt;a href=&quot;http://r-forge.r-project.org/&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://r-forge.r-project.org/&quot;  rel=&quot;nofollow&quot;&gt;R-Forge&lt;/a&gt;).
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Uploading&quot; [1025-1719] --&gt;
&lt;h3&gt;&lt;a name=&quot;browsing&quot; id=&quot;browsing&quot;&gt;Browsing&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;

The recommended screen resolution is 1280&amp;times;1024 px, as many animations are wider than 600px or higher than 600px. In that case, 800&amp;times;600 px is a little bit too low, and 1024&amp;times;768 might not be high enough to view all parts of the animation (including the controlling buttons, etc). Besides, the animations are driven by &lt;acronym title=&quot;JavaScript&quot;&gt;JS&lt;/acronym&gt; code, so make sure your browser supports &lt;acronym title=&quot;JavaScript&quot;&gt;JS&lt;/acronym&gt; or you have enabled &lt;acronym title=&quot;JavaScript&quot;&gt;JS&lt;/acronym&gt; in your browser.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Browsing&quot; [1720-2143] --&gt;
&lt;h1&gt;&lt;a name=&quot;donation&quot; id=&quot;donation&quot;&gt;Donation&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Wanna make a &lt;a href=&quot;http://animation.yihui.name/wiki:donate&quot; class=&quot;wikilink1&quot; title=&quot;wiki:donate&quot;&gt;donation&lt;/a&gt;? &lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Donation&quot; [2144-2212] --&gt;
&lt;h1&gt;&lt;a name=&quot;ideas&quot; id=&quot;ideas&quot;&gt;Ideas&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Discuss or contribute your &lt;a href=&quot;http://animation.yihui.name/wiki:message&quot; class=&quot;wikilink1&quot; title=&quot;wiki:message&quot;&gt;ideas/suggestions&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Ideas&quot; [2213-2300] --&gt;
&lt;h1&gt;&lt;a name=&quot;support&quot; id=&quot;support&quot;&gt;Support&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

There is a project at &lt;a href=&quot;http://r-forge.r-project.org/&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://r-forge.r-project.org/&quot;  rel=&quot;nofollow&quot;&gt;R-Forge&lt;/a&gt;: &lt;a href=&quot;http://r-forge.r-project.org/projects/animation/&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://r-forge.r-project.org/projects/animation/&quot;  rel=&quot;nofollow&quot;&gt;http://r-forge.r-project.org/projects/animation/&lt;/a&gt; In this project, you can use the &lt;a href=&quot;https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/animation-commits&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/animation-commits&quot;  rel=&quot;nofollow&quot;&gt;mailing list&lt;/a&gt; to get help. 
&lt;/p&gt;

&lt;p&gt;
Here is the project home page: &lt;a href=&quot;http://animation.r-forge.r-project.org/&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://animation.r-forge.r-project.org/&quot;  rel=&quot;nofollow&quot;&gt;http://animation.r-forge.r-project.org/&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
Besides, you may also use the Google Group &lt;a href=&quot;https://groups.google.com/group/animation-in-statistics&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;https://groups.google.com/group/animation-in-statistics&quot;  rel=&quot;nofollow&quot;&gt;Animation in Statistics&lt;/a&gt; to obtain support.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Support&quot; [2301-] --&gt;&lt;div class=&quot;footnotes&quot;&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__1&quot; id=&quot;fn__1&quot; name=&quot;fn__1&quot; class=&quot;fn_bot&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; 
because it has a bulk uploader and the filenames will not be changed; it is ideal for uploading animation frames&lt;/div&gt;
&lt;/div&gt;
</description>
            <author>Yihui Xie</author>
        <category>wiki</category>
            <pubDate>Mon, 31 Aug 2009 09:12:47 -0700</pubDate>
        </item>
        <item>
            <title>Data Mining and Machine Learning - old revision restored</title>
            <link>http://animation.yihui.name/dmml:start?rev=1251731567</link>
            <description>


&lt;h1&gt;&lt;a name=&quot;data_mining_and_machine_learning&quot; id=&quot;data_mining_and_machine_learning&quot;&gt;Data Mining and Machine Learning&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

Introduction. &lt;img src=&quot;http://animation.yihui.name/lib/images/smileys/fixme.gif&quot; class=&quot;middle&quot; alt=&quot;FIXME&quot; /&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Data Mining and Machine Learning&quot; [1-69] --&gt;
&lt;h2&gt;&lt;a name=&quot;list_of_animations&quot; id=&quot;list_of_animations&quot;&gt;List of Animations&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/dmml:bootstrap_i.i.d&quot; class=&quot;wikilink1&quot; title=&quot;dmml:bootstrap_i.i.d&quot;&gt;Bootstrapping the iid data&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/dmml:k-fold_cross-validation&quot; class=&quot;wikilink1&quot; title=&quot;dmml:k-fold_cross-validation&quot;&gt;The concept of k-fold cross-validation&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/dmml:k-nearest_neighbour_algorithm&quot; class=&quot;wikilink1&quot; title=&quot;dmml:k-nearest_neighbour_algorithm&quot;&gt;k-Nearest Neighbour Algorithm&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;List of Animations&quot; [70-] --&gt;</description>
            <author>Yihui Xie</author>
        <category>dmml</category>
            <pubDate>Mon, 31 Aug 2009 09:12:47 -0700</pubDate>
        </item>
        <item>
            <title>Animations in Probability Theory - old revision restored</title>
            <link>http://animation.yihui.name/prob:start?rev=1251731567</link>
            <description>


&lt;h1&gt;&lt;a name=&quot;animations_in_probability_theory&quot; id=&quot;animations_in_probability_theory&quot;&gt;Animations in Probability Theory&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

Animations can demonstrate the certainty in uncertainty.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Animations in Probability Theory&quot; [1-106] --&gt;
&lt;h2&gt;&lt;a name=&quot;introduction_to_probability_theory&quot; id=&quot;introduction_to_probability_theory&quot;&gt;Introduction to Probability Theory&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

&lt;a href=&quot;http://en.wikipedia.org/wiki/Probability_theory&quot; class=&quot;interwiki iw_wp&quot; target=&quot;_blank&quot; title=&quot;http://en.wikipedia.org/wiki/Probability_theory&quot;&gt;Probability theory&lt;/a&gt; is the branch of mathematics concerned with analysis of random phenomena. The central objects of probability theory are random variables, stochastic processes, and events: mathematical abstractions of non-deterministic events or measured quantities that may either be single occurrences or evolve over time in an apparently random fashion. Although &lt;a href=&quot;http://animation.yihui.name/prob:flipping_coins&quot; class=&quot;wikilink1&quot; title=&quot;prob:flipping_coins&quot;&gt;an individual coin toss or the roll of a die&lt;/a&gt; is a random event, if repeated many times the sequence of random events will exhibit certain statistical patterns, which can be studied and predicted. Two representative mathematical results describing such patterns are &lt;a href=&quot;http://animation.yihui.name/prob:law_of_large_numbers&quot; class=&quot;wikilink1&quot; title=&quot;prob:law_of_large_numbers&quot;&gt;the law of large numbers&lt;/a&gt; and &lt;a href=&quot;http://animation.yihui.name/prob:central_limit_theorem&quot; class=&quot;wikilink1&quot; title=&quot;prob:central_limit_theorem&quot;&gt;the central limit theorem&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
As a mathematical foundation for statistics, probability theory is essential to many human activities that involve quantitative analysis of large sets of data. Methods of probability theory also apply to description of complex systems given only partial knowledge of their state, as in statistical mechanics. A great discovery of twentieth century physics was the probabilistic nature of physical phenomena at atomic scales, described in quantum mechanics.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;Introduction to Probability Theory&quot; [107-1398] --&gt;
&lt;h2&gt;&lt;a name=&quot;what_can_animations_do&quot; id=&quot;what_can_animations_do&quot;&gt;What can animations do&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;

As probability theory is closely related to randomness, we may use animations to demonstrate this kind of randomness based on random numbers. For example, we can generate a series of random numbers in a probability experiment and create a plot to illustrate the result of this experiment; by repeating this step over and over again, we can probably observe interesting phenomena in the changes of animation frames.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;What can animations do&quot; [1399-1850] --&gt;
&lt;h2&gt;&lt;a name=&quot;list_of_animations&quot; id=&quot;list_of_animations&quot;&gt;List of animations&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;table class=&quot;inline&quot;&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;th class=&quot;col0&quot;&gt; topic &lt;/th&gt;&lt;th class=&quot;col1&quot;&gt; description &lt;/th&gt;&lt;th class=&quot;col2&quot;&gt; preview &lt;/th&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/prob:flipping_coins&quot; class=&quot;wikilink1&quot; title=&quot;prob:flipping_coins&quot;&gt;Simulation of flipping coins&lt;/a&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; specify the true probability of the occurrence of each face, and do the simulation of flipping an object. &lt;/td&gt;&lt;td class=&quot;col2&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/prob:flipping_coins&quot; class=&quot;media&quot; title=&quot;prob:flipping_coins&quot;&gt;&lt;img src=&quot;http://animation.yihui.name/lib/exe/fetch.php?w=200&amp;amp;h=200&amp;amp;media=http%3A%2F%2Fs288.photobucket.com%2Falbums%2Fll181%2Fxieyihui%2Fflipping_coins%2F50.png&quot; class=&quot;media&quot; alt=&quot;&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt; &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row2&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/prob:brownian_motion&quot; class=&quot;wikilink1&quot; title=&quot;prob:brownian_motion&quot;&gt;Brownian Motion&lt;/a&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; a trivial demonstration of the Brownian Motion; you can see some circles moving randomly on the 2D plane. &lt;/td&gt;&lt;td class=&quot;col2&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/prob:brownian_motion&quot; class=&quot;media&quot; title=&quot;prob:brownian_motion&quot;&gt;&lt;img src=&quot;http://animation.yihui.name/lib/exe/fetch.php?w=200&amp;amp;h=200&amp;amp;media=http%3A%2F%2Fi288.photobucket.com%2Falbums%2Fll181%2Fxieyihui%2Fbrownian_motion%2F100.png&quot; class=&quot;media&quot; alt=&quot;&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt; &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row3&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/prob:buffon_s_needle&quot; class=&quot;wikilink1&quot; title=&quot;prob:buffon_s_needle&quot;&gt;Buffon&amp;#039;s Needle&lt;/a&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; present the scenario of dropping needles and estimate the value of &lt;img src=&quot;http://www.forkosh.dreamhost.com/mimetex.cgi?\normalsize \pi&quot; alt=&quot;\normalsize \pi&quot; title=&quot;\normalsize \pi&quot;  class=&quot;math&quot;/&gt;. &lt;/td&gt;&lt;td class=&quot;col2&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/prob:buffon_s_needle&quot; class=&quot;media&quot; title=&quot;prob:buffon_s_needle&quot;&gt;&lt;img src=&quot;http://animation.yihui.name/lib/exe/fetch.php?w=200&amp;amp;h=200&amp;amp;media=http%3A%2F%2Fs288.photobucket.com%2Falbums%2Fll181%2Fxieyihui%2Fbuffon_s_needle%2F100.png&quot; class=&quot;media&quot; alt=&quot;&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt; &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row4&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/prob:bean_machine&quot; class=&quot;wikilink1&quot; title=&quot;prob:bean_machine&quot;&gt;Bean Machine&lt;/a&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; The bean machine, also known as the quincunx or Galton box, is a device invented by Sir Francis Galton to demonstrate the law of error and the normal distribution. &lt;/td&gt;&lt;td class=&quot;col2&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/prob:bean_machine&quot; class=&quot;media&quot; title=&quot;prob:bean_machine&quot;&gt;&lt;img src=&quot;http://animation.yihui.name/lib/exe/fetch.php?w=200&amp;amp;h=200&amp;amp;media=http%3A%2F%2Fanimation.r-forge.r-project.org%2Fframes%2Fquincunx%2F200.png&quot; class=&quot;media&quot; alt=&quot;&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt; &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row5&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/prob:law_of_large_numbers&quot; class=&quot;wikilink1&quot; title=&quot;prob:law_of_large_numbers&quot;&gt;The Law of Large Numbers&lt;/a&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; as the sample size grows, the sample mean will converge to the population mean. &lt;/td&gt;&lt;td class=&quot;col2&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/prob:law_of_large_numbers&quot; class=&quot;media&quot; title=&quot;prob:law_of_large_numbers&quot;&gt;&lt;img src=&quot;http://animation.yihui.name/lib/exe/fetch.php?w=200&amp;amp;h=200&amp;amp;media=http%3A%2F%2Fs288.photobucket.com%2Falbums%2Fll181%2Fxieyihui%2Flaw_of_large_numbers%2F100.png&quot; class=&quot;media&quot; alt=&quot;&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt; &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row6&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/prob:central_limit_theorem&quot; class=&quot;wikilink1&quot; title=&quot;prob:central_limit_theorem&quot;&gt;Central Limit Theorem&lt;/a&gt; &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; as the sample size grows, the distribution of the sample mean will converge to the Normal distribution; a histogram will illustrate the density of the sample mean and the Shapiro&amp;#039;s test will be performed to check the normality (P-values will be plotted). &lt;/td&gt;&lt;td class=&quot;col2&quot;&gt; &lt;a href=&quot;http://animation.yihui.name/prob:central_limit_theorem&quot; class=&quot;media&quot; title=&quot;prob:central_limit_theorem&quot;&gt;&lt;img src=&quot;http://animation.yihui.name/lib/exe/fetch.php?w=200&amp;amp;h=200&amp;amp;media=http%3A%2F%2Fs288.photobucket.com%2Falbums%2Fll181%2Fxieyihui%2Fcentral_limit_theorem%2F100.png&quot; class=&quot;media&quot; alt=&quot;&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt; &lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;

&lt;/div&gt;
&lt;!-- SECTION &quot;List of animations&quot; [1851-] --&gt;</description>
            <author>Yihui Xie</author>
        <category>prob</category>
            <pubDate>Mon, 31 Aug 2009 09:12:47 -0700</pubDate>
        </item>
    </channel>
</rss>
