<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Software for Exploratory Data Analysis and Statistical Modelling</title>
	<atom:link href="http://www.wekaleamstudios.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wekaleamstudios.co.uk</link>
	<description>Statistical Modelling with R</description>
	<lastBuildDate>Wed, 01 Feb 2012 19:44:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Surfaces in ternary plots</title>
		<link>http://www.wekaleamstudios.co.uk/posts/surfaces-in-ternary-plots/</link>
		<comments>http://www.wekaleamstudios.co.uk/posts/surfaces-in-ternary-plots/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 19:44:22 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Lattice Graphics]]></category>
		<category><![CDATA[levelplot]]></category>
		<category><![CDATA[mixture]]></category>
		<category><![CDATA[surface]]></category>
		<category><![CDATA[ternary plot]]></category>

		<guid isPermaLink="false">http://www.wekaleamstudios.co.uk/?p=1782</guid>
		<description><![CDATA[In mixture experiments there is a constraint that the variables are the proportions of components that are mixed together with the consequence that these proportions sum to one. When fitting regression models to data from mixture experiments we may be interested in reprenting the fitted model with a surface plot. The constraint on proportions means [...]]]></description>
			<content:encoded><![CDATA[<p>In mixture experiments there is a constraint that the variables are the proportions of components that are mixed together with the consequence that these proportions sum to one. When fitting regression models to data from mixture experiments we may be interested in reprenting the fitted model with a surface plot.<span id="more-1782"></span></p>
<p>The constraint on proportions means that the mixture data can be described in one dimension lower than the total number of components. For example when there are three mixture components a two dimension plot can be used to represent the mixture within an equilateral triangle.</p>
<p>To create a surface within the mixture triangle we can create a grid of points and then convert these pairs of points into mixture triples.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">mygrid = rbind(
	expand.grid(
		x = seq(0, 1.0, length.out = 500),
		y = seq(0, sqrt(3)/2, length.out = 500)
	)
)</pre></div></div>

<p>The conversion formulae are shown below:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">mygrid$a = (sqrt(3) * (mygrid$x - 0.5) + (mygrid$y - 0.5 * sqrt(3))) /
  (- sqrt(3) - 0.5 * sqrt(3))
mygrid$b = (- sqrt(3) * (mygrid$x - 0.5) + (mygrid$y - 0.5 * sqrt(3))) /
  (- sqrt(3) - 0.5 * sqrt(3))
mygrid$c = 1 - mygrid$a - mygrid$b</pre></div></div>

<p>The next step is to calculate our surface values, a trivial example of which is:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">mygrid$z = 10 + 4 * mygrid$a + 3 * mygrid$b</pre></div></div>

<p>We then need to <em>trick</em> the plotting function by setting all invalid mixture combinations to be missing values.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">mygrid$z[mygrid$a &lt; 0 | mygrid$b &lt; 0 | mygrid$c &lt; 0] = NA
mygrid$z[mygrid$a &gt; 1 | mygrid$b &gt; 1 | mygrid$c &gt; 1] = NA</pre></div></div>

<p>Lastly we use the levelplot function in the lattice package.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">trellis.par.set(&quot;axis.line&quot;,list(col=NA,lty=1,lwd=1))
levelplot(z ~ x*y, data = mygrid,
	col.regions = gray(101:0/101), scales = list(draw=FALSE),
	xlab = &quot;&quot;, ylab = &quot;&quot;,
	panel = function(x, y, z, ...)
	{
		panel.levelplot(x, y, z, ...)
		panel.lines(c(0,1), c(0,0), col = &quot;black&quot;)
		panel.lines(c(0,0.5), c(0,sqrt(3)/2), col = &quot;black&quot;)
		panel.lines(c(0.5,1), c(sqrt(3)/2,0), col = &quot;black&quot;)
		panel.text(0.5, sqrt(3)/2, &quot;C&quot;, pos=3)
		panel.text(0, 0, &quot;A&quot;, pos=2)
		panel.text(1, 0, &quot;B&quot;, pos=4)
	},
	xlim = c(-0.2,1.2),
	ylim = c(-0.2, 0.2+sqrt(3)/2)
)</pre></div></div>

<p>This forms the basis of a ternary surface plot and various adjustments can be easily made to customise the plot.</p>
<div id="attachment_1792" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.wekaleamstudios.co.uk/wp-content/uploads/2012/02/ternaryplot.png"><img src="http://www.wekaleamstudios.co.uk/wp-content/uploads/2012/02/ternaryplot-300x300.png" alt="Ternary Plot" title="Ternary Plot" width="300" height="300" class="size-medium wp-image-1792" /></a><p class="wp-caption-text">Example of a surface plot in a ternary diagram</p></div>
<p>Other useful resources are provided on the <a href="http://www.wekaleamstudios.co.uk/supplementary-material/">Supplementary Material</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekaleamstudios.co.uk/posts/surfaces-in-ternary-plots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A3 pages in LaTeX documents</title>
		<link>http://www.wekaleamstudios.co.uk/posts/a3-pages-in-latex-documents/</link>
		<comments>http://www.wekaleamstudios.co.uk/posts/a3-pages-in-latex-documents/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 16:38:58 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[LaTeX Typesetting]]></category>
		<category><![CDATA[a3paper]]></category>
		<category><![CDATA[geometry]]></category>

		<guid isPermaLink="false">http://www.wekaleamstudios.co.uk/?p=1758</guid>
		<description><![CDATA[The default paper sizes in LaTeX documents tend to be A4 or letter paper. If we want to use other page and paper sizes the geometry package is a handy way to make these changes. To change the paper to A3 in our document and in landscape orientation we would use the following: \documentclass[12pt,landscape]{article} \usepackage[a3paper]{geometry} [...]]]></description>
			<content:encoded><![CDATA[<p>The default paper sizes in <strong>LaTeX</strong> documents tend to be A4 or letter paper. If we want to use other page and paper sizes the <strong>geometry</strong> package is a handy way to make these changes.<span id="more-1758"></span></p>
<p>To change the paper to A3 in our document and in landscape orientation we would use the following:</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">documentclass</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">12pt,landscape</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">article</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">a3paper</span><span style="color: #E02020; ">]{</span><span style="color: #2020C0; font-weight: normal;">geometry</span><span style="color: #E02020; ">}</span>
<span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">document</span></span><span style="color: #E02020; ">}</span>
...
<span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">document</span></span><span style="color: #E02020; ">}</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.wekaleamstudios.co.uk/posts/a3-pages-in-latex-documents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tikz absolute positioning</title>
		<link>http://www.wekaleamstudios.co.uk/posts/tikz-absolute-positioning/</link>
		<comments>http://www.wekaleamstudios.co.uk/posts/tikz-absolute-positioning/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 16:55:44 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[LaTeX Typesetting]]></category>
		<category><![CDATA[tikz/pgf]]></category>
		<category><![CDATA[absolute]]></category>
		<category><![CDATA[current.page]]></category>
		<category><![CDATA[node]]></category>
		<category><![CDATA[positioning]]></category>
		<category><![CDATA[tikz]]></category>

		<guid isPermaLink="false">http://www.wekaleamstudios.co.uk/?p=1742</guid>
		<description><![CDATA[When working with a tikz drawing within LaTeX document we might want to locate an object using an absoute position on the page rather than leaving LaTeX to make the decision for us. The use of nodes and the current.page label in conjunction with some other parameters attached to the tikz drawing will allow us [...]]]></description>
			<content:encoded><![CDATA[<p>When working with a tikz drawing within <strong>LaTeX</strong> document we might want to locate an object using an absoute position on the page rather than leaving <strong>LaTeX</strong> to make the decision for us.<span id="more-1742"></span></p>
<p>The use of nodes and the <strong>current.page</strong> label in conjunction with some other parameters attached to the tikz drawing will allow us to achieve the absolute positioning on the page.</p>
<p>As an example consider a one page drawing where we want to put a text box in the centre of the page.</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">tikzpicture</span></span><span style="color: #E02020; ">}[</span><span style="color: #C08020; font-weight: normal;">remember picture,overlay</span><span style="color: #E02020; ">]</span>
<span style="color: #800000; font-weight: normal;">\draw</span> (current page.center) node <span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">Add Text</span><span style="color: #E02020; ">}</span>;
<span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">tikzpicture</span></span><span style="color: #E02020; ">}</span></pre></div></div>

<p>If we wanted to add elements to the edge of a page we could use the <strong>current page.north west</strong> anchor to locate in the top left of the page.</p>
<p>Other useful resources are provided on the <a href="http://www.wekaleamstudios.co.uk/supplementary-material/">Supplementary Material</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekaleamstudios.co.uk/posts/tikz-absolute-positioning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tikz Nodes</title>
		<link>http://www.wekaleamstudios.co.uk/posts/tikz-nodes/</link>
		<comments>http://www.wekaleamstudios.co.uk/posts/tikz-nodes/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 07:01:20 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[LaTeX Typesetting]]></category>
		<category><![CDATA[tikz/pgf]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[node]]></category>
		<category><![CDATA[tikz]]></category>
		<category><![CDATA[\draw]]></category>

		<guid isPermaLink="false">http://www.wekaleamstudios.co.uk/?p=1718</guid>
		<description><![CDATA[Nodes are used in tikz to place content in a picture as part of a LaTeX document. Fast Tube by Casper When creating a tikz picture the origin is assumed to be at (0,0) and objects are placed with positioning relative to the origin on the picture. If we wanted to add a grid with [...]]]></description>
			<content:encoded><![CDATA[<p>Nodes are used in <strong>tikz</strong> to place content in a picture as part of a <strong>LaTeX</strong> document.<span id="more-1718"></span></p>
<p><!--[Fast Tube]--><span id="q-4f0XiuYwc" style="display:block;"><a title="Click here to watch this video!" href="http://www.wekaleamstudios.co.uk/posts/tikz-nodes/#q-4f0XiuYwc"><img src="http://i.ytimg.com/vi/q-4f0XiuYwc/0.jpg" alt="Fast Tube" border="0" width="320" height="240" /></a><br /><small>Fast Tube by <a title="Casper's Blog" href="http://blog.caspie.net/">Casper</a></small></span><!--[/Fast Tube]--></p>
<p>When creating a tikz picture the origin is assumed to be at (0,0) and objects are placed with positioning relative to the origin on the picture. If we wanted to add a grid with lines from -3 to +3 in both the horizontal and vertical axes then we would use the <strong>\draw</strong> command combined with <strong>grid</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\draw</span> (-3,-3) grid (3,3);</pre></div></div>

<p>We can use the draw options to change how the grid is displayed. To make the grid lines thin we could add <i>very thin</i> and change the colour to a light gray (<i>black!20</i>):</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\draw</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">very thin,black!20</span><span style="color: #E02020; ">]</span> (-3,-3) grid (3,3);</pre></div></div>

<p>To add a node with text we use a combination of <strong>\draw</strong> and <strong>node</strong>, For example to put the node with a single letter A at (1,1):</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\draw</span> (1,1) node <span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">A</span><span style="color: #E02020; ">}</span>;</pre></div></div>

<p>We can put an outline around the text in a node by specifying a <em>shape</em> and the <em>draw</em> option (which refers to the colour of the outline of the shape).</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\node</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">shape=rectangle,draw=black</span><span style="color: #E02020; ">]</span> at (0,2) <span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">B</span><span style="color: #E02020; ">}</span>;</pre></div></div>

<p>The <i>fill</i> option is for the inside of the shape. A circle with outline and filled background could be drawn with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\node</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">shape=circle,draw=blue,fill=blue!50</span><span style="color: #E02020; ">]</span> at (2,2) <span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">D</span><span style="color: #E02020; ">}</span>;</pre></div></div>

<p>Other useful resources are provided on the <a href="http://www.wekaleamstudios.co.uk/supplementary-material/">Supplementary Material</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekaleamstudios.co.uk/posts/tikz-nodes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tikz Introduction</title>
		<link>http://www.wekaleamstudios.co.uk/posts/tikz-introduction/</link>
		<comments>http://www.wekaleamstudios.co.uk/posts/tikz-introduction/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 17:43:10 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[LaTeX Typesetting]]></category>
		<category><![CDATA[tikz/pgf]]></category>
		<category><![CDATA[drawing]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[pgf]]></category>
		<category><![CDATA[tikz]]></category>
		<category><![CDATA[\draw]]></category>

		<guid isPermaLink="false">http://www.wekaleamstudios.co.uk/?p=1698</guid>
		<description><![CDATA[The pgf drawing package for LaTeX provides facilities for drawing simple of complicated pictures within a LaTeX document. There are many options available within the package and in this post we consider some of the basics to get up and running. Fast Tube by Casper As with all LaTeX documents we need to select a [...]]]></description>
			<content:encoded><![CDATA[<p>The <strong>pgf</strong> drawing package for <strong>LaTeX</strong> provides facilities for drawing simple of complicated pictures within a <strong>LaTeX</strong> document. There are many options available within the package and in this post we consider some of the basics to get up and running.<span id="more-1698"></span></p>
<p><!--[Fast Tube]--><span id="7KO-X03lW6Q" style="display:block;"><a title="Click here to watch this video!" href="http://www.wekaleamstudios.co.uk/posts/tikz-introduction/#7KO-X03lW6Q"><img src="http://i.ytimg.com/vi/7KO-X03lW6Q/0.jpg" alt="Fast Tube" border="0" width="320" height="240" /></a><br /><small>Fast Tube by <a title="Casper's Blog" href="http://blog.caspie.net/">Casper</a></small></span><!--[/Fast Tube]--></p>
<p>As with all LaTeX documents we need to select a document class and include some preamble material prior to the body of our document. A blank template for a document with a single tikz picture is shown here:</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #E02020; ">\</span><span style="color: #800000;">documentclass</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">article</span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">usepackage</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">tikz</span><span style="color: #E02020; ">}</span>
<span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">document</span></span><span style="color: #E02020; ">}</span>
<span style="color: #E02020; ">\</span><span style="color: #800000;">pagestyle</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;">empty</span><span style="color: #E02020; ">}</span>
<span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">tikzpicture</span></span><span style="color: #E02020; ">}</span>
...
<span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">tikzpicture</span></span><span style="color: #E02020; ">}</span>
<span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #E02020; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">document</span></span><span style="color: #E02020; ">}</span></pre></div></div>

<p>The tikz picture has a coordinate system similar to that which you would expect where moving from left to right on the page corresponds to increasing the x value and bottom to top increases the y value. A line can be drawn between two points wit the <strong>\draw</strong> command:</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\draw</span> (0,0) -- (1,0);</pre></div></div>

<p>To draw a line between multiple points these can be chained together in a single draw command:</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\draw</span> (0,0) -- (1,0) -- (1, 4);</pre></div></div>

<p>The line style can be altered by adding various options in square brackets directly after the draw command. So to change to a dashed red line we would write the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\draw</span><span style="color: #E02020; ">[</span><span style="color: #C08020; font-weight: normal;">red,dashed</span><span style="color: #E02020; ">]</span> (0,0) -- (2,0);</pre></div></div>

<p>A circle of a given radius can be draw using the <strong>\draw</strong> command and we specify the radius of the circle in round brackets:</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\draw</span> (0,0) circle (2.5cm);</pre></div></div>

<p>This will draw a circle with radius of 2.5 cm. The circle could be changed into an ellipse and we would then need to specify the radius in two directions, an example of this:</p>

<div class="wp_syntax"><div class="code"><pre class="latex" style="font-family:monospace;"><span style="color: #800000; font-weight: normal;">\draw</span> (0,0) ellipse (2cm and 3.5cm);</pre></div></div>

<p>Other useful resources are provided on the <a href="http://www.wekaleamstudios.co.uk/supplementary-material/">Supplementary Material</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekaleamstudios.co.uk/posts/tikz-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cricket All Round Performances</title>
		<link>http://www.wekaleamstudios.co.uk/posts/cricket-all-round-performances/</link>
		<comments>http://www.wekaleamstudios.co.uk/posts/cricket-all-round-performances/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 22:12:43 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[R Environment]]></category>
		<category><![CDATA[batting]]></category>
		<category><![CDATA[bowling]]></category>
		<category><![CDATA[cricket]]></category>
		<category><![CDATA[runs]]></category>
		<category><![CDATA[wickets]]></category>

		<guid isPermaLink="false">http://www.wekaleamstudios.co.uk/?p=1685</guid>
		<description><![CDATA[In cricket a player who can perform well with both the bat and bowl is a great asset for any team and across the history of international cricket there have been a number of cricketers that hall into this bracket. It is difficult to specify a set of criteria to determine whether a player can [...]]]></description>
			<content:encoded><![CDATA[<p>In cricket a player who can perform well with both the bat and bowl is a great asset for any team and across the history of international cricket there have been a number of cricketers that hall into this bracket.<span id="more-1685"></span></p>
<p>It is difficult to specify a set of criteria to determine whether a player can be described as an all-rounder. To compare the performances of various all-rounders we can look at the subset of crickters who have scored at least 1,000 runs and taken at least 100 wickets at Test Match level. This is not a perfect criteria as there will be players who have taken part in sufficient test matches that they will be included even though they are clearly much stronger in one of the two disciplines but very handy in the other.</p>
<p>A total of 54 test match cricketers were identified based on this criteria (up to and including test match 2004) and a scatter plot of the performances can be seen <a href='http://www.wekaleamstudios.co.uk/wp-content/uploads/2011/09/allrounder-graph1.pdf'>here</a>. The graph shows that the majority of players in the bottom left region of the graph with a handful of batsmen and bowlers at the extremes in terms of runs or wickets.</p>
<p>To get a better idea of the balance between wickets and runs we can zoom in on the bottom left hand region of the graph to get this <a href='http://www.wekaleamstudios.co.uk/wp-content/uploads/2011/09/allrounder-graph2.pdf'>display</a>. This new graph suggests that although there have been a number of English cricketers that has scored 1,000 runs and taken 100 wickets they do not have the longevity of players from other countries.</p>
<p>There are naturally other measures of performance that could be used to compare this set of allround cricketers which might provided a more illuminating insight into all round performances.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekaleamstudios.co.uk/posts/cricket-all-round-performances/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Colours in R</title>
		<link>http://www.wekaleamstudios.co.uk/posts/colours-in-r/</link>
		<comments>http://www.wekaleamstudios.co.uk/posts/colours-in-r/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 13:37:28 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[R Environment]]></category>
		<category><![CDATA[colour]]></category>
		<category><![CDATA[rgb]]></category>

		<guid isPermaLink="false">http://www.wekaleamstudios.co.uk/?p=1681</guid>
		<description><![CDATA[There is a handy webpage which provides a chart of colours available in R. The chart is also available in pdf from the webpage.]]></description>
			<content:encoded><![CDATA[<p>There is a handy <a href="http://research.stowers-institute.org/efg/R/Color/Chart/">webpage</a> which provides a chart of colours available in R. The chart is also available in pdf from the webpage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekaleamstudios.co.uk/posts/colours-in-r/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scatter plots with images</title>
		<link>http://www.wekaleamstudios.co.uk/posts/scatter-plots-with-images/</link>
		<comments>http://www.wekaleamstudios.co.uk/posts/scatter-plots-with-images/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 09:32:16 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[LaTeX Typesetting]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[pgf]]></category>
		<category><![CDATA[plot]]></category>
		<category><![CDATA[scatter]]></category>
		<category><![CDATA[tikz]]></category>
		<category><![CDATA[Tufte]]></category>

		<guid isPermaLink="false">http://www.wekaleamstudios.co.uk/?p=1671</guid>
		<description><![CDATA[Edward Tufte has written extensively on the presentation of data covering good and bad practice. He has made a number of suggestions for adaptations of regularly used graph types to assist with the interpretation and understanding of data. One idea for enhancing scatter plots covered in Tufte&#8217;s book Beautiful Evidence is the use of images [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.edwardtufte.com/tufte/">Edward Tufte</a> has written extensively on the presentation of data covering good and bad practice. He has made a number of suggestions for adaptations of regularly used graph types to assist with the interpretation and understanding of data.<span id="more-1671"></span></p>
<p>One idea for enhancing scatter plots covered in Tufte&#8217;s book <em>Beautiful Evidence</em> is the use of images in place of traditional symbols to provide additional information about that point. To illustrate this idea I have taken the batting data from the recent test series between England and India played in England 2011. The graph is a display of the number of runs scored and number of balls faced with an English or Indian flag indicating the team of the player involved. The graph can be seen <a href='http://www.wekaleamstudios.co.uk/wp-content/uploads/2011/09/graphexample1.pdf'>here</a> and this has an advantage over the usual scatter plot as there is no need for a legend to accompany the graph.</p>
<p>Other useful resources are provided on the <a href="http://www.wekaleamstudios.co.uk/supplementary-material/">Supplementary Material</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekaleamstudios.co.uk/posts/scatter-plots-with-images/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>LaTeX Typesetting – Basic Mathematics</title>
		<link>http://www.wekaleamstudios.co.uk/posts/latex-typesetting-%e2%80%93basic-mathematics/</link>
		<comments>http://www.wekaleamstudios.co.uk/posts/latex-typesetting-%e2%80%93basic-mathematics/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 19:38:22 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[LaTeX Typesetting]]></category>
		<category><![CDATA[Mathematics]]></category>

		<guid isPermaLink="false">http://www.wekaleamstudios.co.uk/?p=1648</guid>
		<description><![CDATA[LaTeX is very strong for typesetting mathematical equations. Fast Tube by Casper Other useful resources are provided on the Supplementary Material page.]]></description>
			<content:encoded><![CDATA[<p><strong>LaTeX</strong> is very strong for typesetting mathematical equations.<span id="more-1648"></span></p>
<p><!--[Fast Tube]--><span id="eOaiwglY1c8" style="display:block;"><a title="Click here to watch this video!" href="http://www.wekaleamstudios.co.uk/posts/latex-typesetting-%e2%80%93basic-mathematics/#eOaiwglY1c8"><img src="http://i.ytimg.com/vi/eOaiwglY1c8/0.jpg" alt="Fast Tube" border="0" width="320" height="240" /></a><br /><small>Fast Tube by <a title="Casper's Blog" href="http://blog.caspie.net/">Casper</a></small></span><!--[/Fast Tube]--></p>
<p>Other useful resources are provided on the <a href="http://www.wekaleamstudios.co.uk/supplementary-material/">Supplementary Material</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekaleamstudios.co.uk/posts/latex-typesetting-%e2%80%93basic-mathematics/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting rid of white space at the beginning and end of a string</title>
		<link>http://www.wekaleamstudios.co.uk/posts/getting-rid-of-white-space-at-the-beginning-and-end-of-a-string/</link>
		<comments>http://www.wekaleamstudios.co.uk/posts/getting-rid-of-white-space-at-the-beginning-and-end-of-a-string/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 11:01:19 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[S Programming]]></category>
		<category><![CDATA[stringr]]></category>
		<category><![CDATA[str_trim]]></category>
		<category><![CDATA[whitespace]]></category>

		<guid isPermaLink="false">http://www.wekaleamstudios.co.uk/?p=1660</guid>
		<description><![CDATA[There are situations where we are working with character strings extracted from various sources and it can be annoying when there is white space at the beginning and/or end of the strings. This whitespace can cause problems when attemping to sort, subset or various other common operations. The stringr package has a handy function str_trim [...]]]></description>
			<content:encoded><![CDATA[<p>There are situations where we are working with character strings extracted from various sources and it can be annoying when there is white space at the beginning and/or end of the strings. This whitespace can cause problems when attemping to sort, subset or various other common operations.<span id="more-1660"></span></p>
<p>The <strong>stringr</strong> package has a handy function <strong>str_trim</strong> (edited) that comes to the rescue and is straightforward to use. First up make sure that the package is available in the <strong>R</strong> session:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">require(stringr)</pre></div></div>

<p>Here is a basic example with a simple string:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">&gt; &quot;  This is an example of whitespace.  &quot;
[1] &quot;  This is an example of whitespace.  &quot;
&gt; str_trim(&quot;  This is an example of whitespace.  &quot;)
[1] &quot;This is an example of whitespace.&quot;</pre></div></div>

<p>As we can see this is very simple and is set up to work on a vector of character strings as well.</p>
<p>Other useful resources are provided on the <a href="http://www.wekaleamstudios.co.uk/supplementary-material/">Supplementary Material</a> page. Visit <a href="http://en.wikibooks.org/wiki/R_Programming/Text_Processing">here</a> for more examples of string manipulation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekaleamstudios.co.uk/posts/getting-rid-of-white-space-at-the-beginning-and-end-of-a-string/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

