<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>4D Pie Charts</title>
	<atom:link href="http://4dpiecharts.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://4dpiecharts.com</link>
	<description>Scientific computing, data viz and general geekery, with examples in R and MATLAB.</description>
	<lastBuildDate>Wed, 22 Feb 2012 04:01:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='4dpiecharts.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>4D Pie Charts</title>
		<link>http://4dpiecharts.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://4dpiecharts.com/osd.xml" title="4D Pie Charts" />
	<atom:link rel='hub' href='http://4dpiecharts.com/?pushpress=hub'/>
		<item>
		<title>GUI building in R: gWidgets vs Deducer</title>
		<link>http://4dpiecharts.com/2012/02/20/gui-building-in-r-gwidgets-vs-deducer/</link>
		<comments>http://4dpiecharts.com/2012/02/20/gui-building-in-r-gwidgets-vs-deducer/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 22:47:45 +0000</pubDate>
		<dc:creator>richierocks</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[Deducer]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[gWidgets]]></category>
		<category><![CDATA[r]]></category>
		<category><![CDATA[software-development]]></category>

		<guid isPermaLink="false">http://4dpiecharts.com/?p=458</guid>
		<description><![CDATA[I&#8217;ve been a user (and fan) of gWidgets for a couple of years now for GUI building in R. (See my introduction to it here.) However, it&#8217;s always good to check out the competition so I&#8217;ve been playing around with Deducer to see how they compare. R can access a number of GUI building frameworks [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=458&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been a user (and fan) of <a href="http://cran.r-project.org/web/packages/gWidgets/index.html" target="_blank">gWidgets</a> for a couple of years now for GUI building in R.  (See my introduction to it <a href="http://4dpiecharts.com/2010/10/06/creating-guis-in-r-with-gwidgets/" target="_blank">here</a>.)  However, it&#8217;s always good to check out the competition so I&#8217;ve been playing around with <a href="http://cran.r-project.org/web/packages/Deducer/index.html" target="_blank">Deducer</a> to see how they compare.</p>
<p>R can access a number of GUI building frameworks including tcltk, GTK, qt, and Java, not to mention HTML.  gWidgets&#8217; big selling point is that is provides a high-level wrapper to all the R wrappers for each framework, so you can write code in a toolkit independent way.  Switching between tcltk and GTK and qt won&#8217;t often be that useful, but if you think you might want to move from a desktop based GUI to a web app, it makes the transition easier.  By contrast, Deducer based upon the rJava, and provides access to the Java Swing framework.  It&#8217;s a slightly lower level library (which means you have to write more lines of code to achieve the same thing), but since you get full access to Swing, it&#8217;s a little more flexible. Deducer also has some features to integrate your GUIs with <a href="http://rforge.net/JGR/" target="_blank">JGR</a>, so if you use that for running R, it&#8217;s perhaps the most natural choice.</p>
<p>To test the two frameworks, I wrote a small GUI for running the Kolmogorov-Smirnoff test (that one of the ones for checking whether or not a variable seems to have been sampled from a particular distribution).  Take a look at the code below to see the comparison.  (Regular reader may notice I&#8217;ve switched from my usual <code>under_casing</code> to <code>camelCasing</code>.  Both the frameworks use this style, so I thought I&#8217;d follow suit for cleanliness.) </p>
<p>First, here are some common variables (labels and the like).</p>
<p><pre class="brush: r;">
#Some sample data to test against
x1 &lt;- rnorm(100)
x2 &lt;- runif(100)

#Widget labels
labelX &lt;- &quot;Variable name for data: &quot;
labelY &lt;- &quot;Distribution to compare to: &quot;
labelAlternative &lt;- &quot;One or two sided test?: &quot;
labelP &lt;- &quot;The p-value is: &quot;

#Choices for comboboxes
choicesAlternative &lt;- eval(formals(ks.test)$alternative)
distributions &lt;- c(
    normal = pnorm, 
    exponential = pexp,
    F = pf,
    &quot;log-normal&quot; = plnorm,
    &quot;Student's t&quot; = pt,
    uniform = punif
)
</pre></p>
<p>This is the gWidgets GUI</p>
<p><pre class="brush: r;">
createKsTestGwidgets &lt;- function()
{
  library(gWidgetstcltk)
  options(guiToolkit = &quot;tcltk&quot;)
  win &lt;- gwindow(&quot;KS Test, gWidgets edition&quot;, visible = FALSE)
  
  frmX &lt;- gframe(&quot;x&quot;, container = win)
  lblX &lt;- glabel(labelX, container = frmX)
  txtX &lt;- gedit(container = frmX)
  
  frmY &lt;- gframe(&quot;y&quot;, container = win)
  lblY &lt;- glabel(labelY, container = frmY)
  cmbY &lt;- gcombobox(names(distributions), container = frmY)
  
  frmAlternative &lt;- gframe(&quot;alternative&quot;, container = win)
  lblAlternative &lt;- glabel(labelAlternative, container = frmAlternative)
  cmbAlternative &lt;- gcombobox(choicesAlternative, container = frmAlternative)
  
  btnCalc &lt;- gbutton(&quot;Calculate&quot;, container = win,
      handler = function(h, ...)
      {
        x &lt;- get(svalue(txtX), mode = &quot;numeric&quot;)
        y &lt;- distributions[[svalue(cmbY)]]
        alternative &lt;- svalue(cmbAlternative)
        ans &lt;- ks.test(x, y, alternative = alternative)
        svalue(txtP) &lt;- format(ans$p.value, digits = 3)
      }
  )
  frmResults &lt;- gframe(&quot;results&quot;, container = win)
  lblP &lt;- glabel(labelP, container = frmResults)
  txtP &lt;- gedit(container = frmResults)
  visible(win) &lt;- TRUE
  
}

createKsTestGwidgets()
</pre></p>
<p>&#8230;and here&#8217;s the Deducer equivalent.</p>
<p><pre class="brush: r;">
createKsTestDeducer &lt;- function()
{
  library(Deducer)
  win &lt;- new(RDialog)
  win$setSize(300L, 500L)
  win$setTitle(&quot;KS TEST, Deducer edition&quot;)
  
  JLabel &lt;- J(&quot;javax.swing.JLabel&quot;)
  lblX &lt;- new(JLabel, labelX)
  addComponent(win, lblX, 1, 1000, 50, 1, rightType = &quot;REL&quot;)
  txtX &lt;- new(TextAreaWidget, &quot;x&quot;)
  addComponent(win, txtX, 51, 1000, 150, 1, rightType = &quot;REL&quot;)
  
  lblY &lt;- new(JLabel, labelY)
  addComponent(win, lblY, 151, 1000, 200, 1, rightType = &quot;REL&quot;)
  
  cmbY &lt;- new(ComboBoxWidget, names(distributions))
  cmbY$setDefaultModel(names(distributions)[1])
  addComponent(win, cmbY, 201, 1000, 300, 1, rightType = &quot;REL&quot;)
  
  lblAlternative &lt;- new(JLabel, labelAlternative)
  addComponent(win, lblAlternative, 301, 1000, 400, 1, rightType = &quot;REL&quot;)
  
  cmbAlternative &lt;- new(ComboBoxWidget, choicesAlternative)
  cmbAlternative$setDefaultModel(choicesAlternative[1])
  addComponent(win, cmbAlternative, 401, 1000, 500, 1, rightType = &quot;REL&quot;)
  
  JButton &lt;- J(&quot;javax.swing.JButton&quot;)
  btnCalc &lt;- new(JButton, &quot;Calculate&quot;)
  addComponent(win, btnCalc, 501, 1000, 601, 1, rightType = &quot;REL&quot;)
  ActionListener &lt;- J(&quot;org.rosuda.deducer.widgets.event.RActionListener&quot;)
  listener &lt;- new(ActionListener)
  calculationHandler &lt;- function(cmd, ActionEvent)
  {
    x &lt;- get(txtX$getText())
    y &lt;- distributions[[cmbY$getModel()]]
    alternative &lt;- cmbAlternative$getModel()
    ans &lt;- ks.test(x, y, alternative = alternative)
    print(ans)
    txtP$setText(format(ans$p.value, digits = 3))
  }
  listener$setFunction(toJava(calculationHandler))
  btnCalc$addActionListener(listener)
  
  lblP &lt;- new(JLabel, labelP)
  addComponent(win, lblP, 601, 1000, 650, 1, rightType = &quot;REL&quot;)
  
  txtP &lt;- new(TextAreaWidget, &quot;results&quot;)
  addComponent(win, txtP, 651, 1000, 750, 1, rightType = &quot;REL&quot;)
    
  win$run()
}

createKsTestDeducer()
</pre></p>
<p>Note that the Deducer example works perfectly under JGR, though I couldn&#8217;t get the button handler to fire when running it from eclipse. This is likely due to my inexperience with the toolkit rather than a fundamental problem with the framework.  Many of the lines are more or less a one-to-one comparison, but Deducer requires you to explicitly specify positions of widgets, and is a little more verbose when you come to add event handling logic.</p>
<p>Either or these frameworks is suitable for the obvious use case of GUI building in R (rapid prototyping of front-ends for non technical users, and for teaching demos), so don&#8217;t sweat your decision too much.</p>
<p>Edit: Fixed variable name casing issues.</p>
<br /> Tagged: <a href='http://4dpiecharts.com/tag/comparison/'>comparison</a>, <a href='http://4dpiecharts.com/tag/deducer/'>Deducer</a>, <a href='http://4dpiecharts.com/tag/gui/'>gui</a>, <a href='http://4dpiecharts.com/tag/gwidgets/'>gWidgets</a>, <a href='http://4dpiecharts.com/tag/r/'>r</a>, <a href='http://4dpiecharts.com/tag/software-development/'>software-development</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/4dpiecharts.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/4dpiecharts.wordpress.com/458/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/4dpiecharts.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/4dpiecharts.wordpress.com/458/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/4dpiecharts.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/4dpiecharts.wordpress.com/458/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/4dpiecharts.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/4dpiecharts.wordpress.com/458/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/4dpiecharts.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/4dpiecharts.wordpress.com/458/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/4dpiecharts.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/4dpiecharts.wordpress.com/458/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/4dpiecharts.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/4dpiecharts.wordpress.com/458/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=458&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://4dpiecharts.com/2012/02/20/gui-building-in-r-gwidgets-vs-deducer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c1a01d3843ecaa30abd003b65811a8?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">richierocks</media:title>
		</media:content>
	</item>
		<item>
		<title>R hits 10000 questions on stackoverflow</title>
		<link>http://4dpiecharts.com/2012/02/17/r-hits-10000-questions-on-stackoverflow/</link>
		<comments>http://4dpiecharts.com/2012/02/17/r-hits-10000-questions-on-stackoverflow/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 07:53:53 +0000</pubDate>
		<dc:creator>richierocks</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[r]]></category>
		<category><![CDATA[stackoverflow]]></category>

		<guid isPermaLink="false">http://4dpiecharts.com/?p=453</guid>
		<description><![CDATA[A milestone, though not that exciting as questions go. Still, if you haven&#8217;t yet joined the cult of Stack Exchange, take a look here. Tagged: r, stackoverflow<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=453&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://4dpiecharts.files.wordpress.com/2012/02/so_10000th_r_question.png"><img src="http://4dpiecharts.files.wordpress.com/2012/02/so_10000th_r_question.png?w=600&#038;h=371" alt="R&#039;s 10000th question on stackoverflow" title="R&#039;s 10000th question on stackoverflow" width="600" height="371" class="aligncenter size-full wp-image-454" /></a></p>
<p>A milestone, though not that exciting as questions go.  Still, if you haven&#8217;t yet joined the cult of Stack Exchange, take a look <a href="http://stackoverflow.com/questions/tagged/r">here</a>.</p>
<br /> Tagged: <a href='http://4dpiecharts.com/tag/r/'>r</a>, <a href='http://4dpiecharts.com/tag/stackoverflow/'>stackoverflow</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/4dpiecharts.wordpress.com/453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/4dpiecharts.wordpress.com/453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/4dpiecharts.wordpress.com/453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/4dpiecharts.wordpress.com/453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/4dpiecharts.wordpress.com/453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/4dpiecharts.wordpress.com/453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/4dpiecharts.wordpress.com/453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/4dpiecharts.wordpress.com/453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/4dpiecharts.wordpress.com/453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/4dpiecharts.wordpress.com/453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/4dpiecharts.wordpress.com/453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/4dpiecharts.wordpress.com/453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/4dpiecharts.wordpress.com/453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/4dpiecharts.wordpress.com/453/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=453&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://4dpiecharts.com/2012/02/17/r-hits-10000-questions-on-stackoverflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c1a01d3843ecaa30abd003b65811a8?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">richierocks</media:title>
		</media:content>

		<media:content url="http://4dpiecharts.files.wordpress.com/2012/02/so_10000th_r_question.png" medium="image">
			<media:title type="html">R&#039;s 10000th question on stackoverflow</media:title>
		</media:content>
	</item>
		<item>
		<title>Viewing the internals of MATLAB Matrices</title>
		<link>http://4dpiecharts.com/2012/01/31/viewing-the-internals-of-matlab-matrices/</link>
		<comments>http://4dpiecharts.com/2012/01/31/viewing-the-internals-of-matlab-matrices/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 16:24:09 +0000</pubDate>
		<dc:creator>richierocks</dc:creator>
				<category><![CDATA[MATLAB]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[undocumented]]></category>

		<guid isPermaLink="false">http://4dpiecharts.com/?p=450</guid>
		<description><![CDATA[A cool undocumented trick I just learnt from The MathWorks&#8217; Bob Gilmore. If you type Then printing any vector reveals information about its internal representation. For example: The structure address is the address in memory where the matrix is stored, m and n are the number of rows and columns respectively of the matrix, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=450&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A cool undocumented trick <a href="http://stackoverflow.com/questions/9069085/how-to-find-type-and-memory-location-of-a-defined-symbol-in-mathematica-and-matl">I just learnt</a> from The MathWorks&#8217; Bob Gilmore.  If you type</p>
<p><pre class="brush: matlabkey;">
format debug
</pre></p>
<p>Then printing any vector reveals information about its internal representation.  For example:</p>
<p><pre class="brush: matlabkey;">
x = magic(3)

x =


Structure address = 6bc1ab0 
m = 3
n = 3
pr = d8dccf0 
pi = 0
     8     1     6
     3     5     7
     4     9     2
</pre></p>
<p>The structure address is the address in memory where the matrix is stored, <code>m</code> and <code>n</code> are the number of rows and columns respectively of the matrix, and <code>pr</code> and <code>pi</code> are pointers to the addresses of the matrices storing the real and imaginary components of the matrix.</p>
<p>One interesting thing to look at is the representation of scalar numbers.</p>
<p><pre class="brush: matlabkey;">
 y = 1

y =


Structure address = 6bc31e0 
m = 1
n = 1
pr = d790b90 
pi = 0
     1
</pre></p>
<p>Yep: they are stored in exactly the same way as matrices: in the same way the &#8220;everything in R is a vector&#8221;, everything in MATLAB is a matrix.  To finish up, here are some more examples for you to explore:</p>
<p><pre class="brush: matlabkey;">
% higher dimensional arrays
rand(2, 3, 4)
% cell arrays (unfortunately not that revealing)
{1, magic(3)}
% sparse matrices (very interesting)
sparse(ones(3))
</pre></p>
<br /> Tagged: <a href='http://4dpiecharts.com/tag/debug/'>debug</a>, <a href='http://4dpiecharts.com/tag/matlab/'>matlab</a>, <a href='http://4dpiecharts.com/tag/undocumented/'>undocumented</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/4dpiecharts.wordpress.com/450/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/4dpiecharts.wordpress.com/450/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/4dpiecharts.wordpress.com/450/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/4dpiecharts.wordpress.com/450/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/4dpiecharts.wordpress.com/450/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/4dpiecharts.wordpress.com/450/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/4dpiecharts.wordpress.com/450/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/4dpiecharts.wordpress.com/450/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/4dpiecharts.wordpress.com/450/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/4dpiecharts.wordpress.com/450/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/4dpiecharts.wordpress.com/450/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/4dpiecharts.wordpress.com/450/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/4dpiecharts.wordpress.com/450/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/4dpiecharts.wordpress.com/450/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=450&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://4dpiecharts.com/2012/01/31/viewing-the-internals-of-matlab-matrices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c1a01d3843ecaa30abd003b65811a8?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">richierocks</media:title>
		</media:content>
	</item>
		<item>
		<title>Exploring the functions in a package</title>
		<link>http://4dpiecharts.com/2012/01/26/exploring-the-functions-in-a-package/</link>
		<comments>http://4dpiecharts.com/2012/01/26/exploring-the-functions-in-a-package/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 15:33:30 +0000</pubDate>
		<dc:creator>richierocks</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[ls]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[r]]></category>
		<category><![CDATA[utilities]]></category>

		<guid isPermaLink="false">http://4dpiecharts.com/?p=444</guid>
		<description><![CDATA[Sometimes it can be useful to list all the functions inside a package. This is done in the same way that you would list variables in your workspace. That is, using ls. The syntax is ls(pos = "package:packagename"), which is easy enough if you can remember it. Unfortunately, I never can, and have to type [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=444&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sometimes it can be useful to list all the functions inside a package.  This is done in the same way that you would list variables in your workspace.  That is, using <code>ls</code>.  The syntax is <code>ls(pos = "package:packagename")</code>, which is easy enough if you can remember it.  Unfortunately, I never can, and have to type <code>search()</code> first to see what the format of that string is.</p>
<p>Today, that problem is solved with a tiny utility function to save remembering things, and to save typing.</p>
<p><pre class="brush: r;">
lsp &lt;- function(package, all.names = FALSE, pattern) 
{
  package &lt;- deparse(substitute(package))
  ls(
      pos = paste(&quot;package&quot;, package, sep = &quot;:&quot;), 
      all.names = all.names, 
      pattern = pattern
  )
}
</pre></p>
<p><code>all.names</code> and <code>pattern</code> behave in the same way as they do in regular <code>ls</code>.  You use it like this:</p>
<p><pre class="brush: r;">
lsp(base)
lsp(base, TRUE)
lsp(base, pattern = &quot;^is&quot;)
</pre></p>
<hr />
<p>EDIT: I&#8217;ve had a couple of questions about the use case, and there are some interesting comments on alternatives.  My thinking behind this function was that I sometimes know I&#8217;ve seen a function in a package but can&#8217;t remember what it&#8217;s called.  If you can hazard a guess at the name, then <code>apropos</code> is probably better, though it looks everywhere on the search path rather than in a particular package.  Autocompletion is also useful for this, but you need to know the first few characters of what you are looking for.  (Activate autocompletions by pressing TAB in R GUI or Rstudio or CTRL+space in eclipse.  I can&#8217;t remember what the shortcut is in emacs, but you probably just mash CTRL+META until you have RSI.)  Finally, the <a href="http://cran.r-project.org/web/packages/unknownR/index.html"><code>unknownR</code></a> package is useful for finding new functions that you hadn&#8217;t heard of yet.</p>
<br /> Tagged: <a href='http://4dpiecharts.com/tag/ls/'>ls</a>, <a href='http://4dpiecharts.com/tag/programming/'>programming</a>, <a href='http://4dpiecharts.com/tag/r/'>r</a>, <a href='http://4dpiecharts.com/tag/utilities/'>utilities</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/4dpiecharts.wordpress.com/444/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/4dpiecharts.wordpress.com/444/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/4dpiecharts.wordpress.com/444/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/4dpiecharts.wordpress.com/444/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/4dpiecharts.wordpress.com/444/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/4dpiecharts.wordpress.com/444/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/4dpiecharts.wordpress.com/444/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/4dpiecharts.wordpress.com/444/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/4dpiecharts.wordpress.com/444/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/4dpiecharts.wordpress.com/444/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/4dpiecharts.wordpress.com/444/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/4dpiecharts.wordpress.com/444/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/4dpiecharts.wordpress.com/444/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/4dpiecharts.wordpress.com/444/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=444&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://4dpiecharts.com/2012/01/26/exploring-the-functions-in-a-package/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c1a01d3843ecaa30abd003b65811a8?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">richierocks</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding metadata to variables</title>
		<link>http://4dpiecharts.com/2012/01/06/adding-metadata-to-variables/</link>
		<comments>http://4dpiecharts.com/2012/01/06/adding-metadata-to-variables/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 08:45:03 +0000</pubDate>
		<dc:creator>richierocks</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[assignment]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[r]]></category>

		<guid isPermaLink="false">http://4dpiecharts.com/?p=439</guid>
		<description><![CDATA[There are only really two ways to preserve your statistical analyses. You either save the variables that you create, or you save the code that you used to create them. In general the latter is much preferred because at some point you&#8217;ll realise that your model was wrong, or your dataset has changed, and you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=439&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are only really two ways to preserve your statistical analyses.  You either save the variables that you create, or you save the code that you used to create them.  In general the latter is much preferred because at some point you&#8217;ll realise that your model was wrong, or your dataset has changed, and you need to re-run your analysis. If you only stored your variables then you are now stuck rewriting your code in order to create new versions, which is really not fun.  On the other hand, if you saved your code, all your have to do is tweak it and run it.</p>
<p>Occasionally though, just keeping the code and rerunning an analysis isn&#8217;t practical.  The most obvious case being when it takes a long time.  If your model takes more than ten minutes to run, it can be really useful to save its variables <i>as well</i> as the source code.</p>
<p>The problem with saving variables is that when you come back and load them six months later, it isn&#8217;t always obvious what they are or where they came from.  With code, we solve this by using comments to jog our memory, so it would be nice to have an equivalent for variables.  In fact, in R, such a facility exists with the &ndash; you guessed it &ndash; <code>comment</code> function.</p>
<p><pre class="brush: r;">
library(lattice)
comment(barley) &lt;- &quot;Immer's barley data, 1934.  The data from the Morris site may have the wrong years.&quot;
comment(barley)
</pre></p>
<p>The <code>comment</code> function simply stores the string as an attribute of the variable, with some special rules on printing.  Other common attributes that you may be familiar with are <code>names</code> for vectors and lists, and <code>dim</code> and <code>dimnames</code> for matrices.</p>
<p>You can find the names of all the attributes of a variable with the <code>attributes</code> function, and get and set individual attributes with <code>attr</code>.</p>
<p><pre class="brush: r;">
x &lt;- c(apple = 1, banana = 2)
attr(x, &quot;type&quot;) &lt;- &quot;fruit&quot;
attributes(x)
attr(x, &quot;names&quot;) #same as names(x)
</pre></p>
<p>Attributes are really great for storing contextual metadata about a variable.  For starters, when you come back to your saved workspace after those six months you might want to know who created the variable and when.  To get this facility, we need an enhanced version of <code>assign</code>.</p>
<p><pre class="brush: r;">
get_user &lt;- function()
{
  env &lt;- if(.Platform$OS.type == &quot;windows&quot;) &quot;USERNAME&quot; else &quot;USER&quot;
  unname(Sys.getenv(env))    
}  
  
assign_with_metadata &lt;- function(x, value, ..., pos = parent.frame(), inherits = FALSE)
{
  attr(value, &quot;creator&quot;) &lt;- get_user()
  attr(value, &quot;time_created&quot;) &lt;- Sys.time()
  more_attr &lt;- list(...)
  attr_names &lt;- names(more_attr)
  for(i in seq_along(more_attr))
  {
    attr(value, attr_names[i]) &lt;- more_attr[[i]]
  }
  assign(x, value, pos = pos, inherits = inherits)
}

assign_with_metadata(&quot;x&quot;, 1:3, monkey = &quot;chimp&quot;)
</pre></p>
<p>Notice the <code>...</code> that allows you to add arbitrary attributes to the variable.</p>
<p>While this is great, and solves the problem, typing <code>assign_with_metadata</code> is way too clunky.  It would be much easier if we could just use <code>&lt;-</code> to assign variables and get the metadata for free.</p>
<p>Actually, overriding <code>&lt;-</code> itself is going to lead to slowness and likely errors. Since we don&#8217;t want to store metadata for every variable (just the important ones), it is better to define our own operators to do so.</p>
<p><pre class="brush: r;">
`%&lt;-%` &lt;- function(x, value)
{
  xname &lt;- deparse(substitute(x))
  pos &lt;- parent.frame()
  assign_with_metadata(xname, value, pos = pos)
}

`%&lt;&lt;-%` &lt;- function(x, value) 
{
  xname &lt;- deparse(substitute(x))
  pos &lt;- globalenv()
  assign_with_metadata(xname, value, pos = pos)
}

m %&lt;-% &quot;foo&quot;    #local assignment with metadata
f &lt;- function()
{
  n %&lt;&lt;-% &quot;bar&quot; #global assignment with metadata
}
f()
</pre></p>
<p>With these functions, if you want to save your variables for later, simply swap <code>&lt;-</code> for <code>%&lt;-%</code>.</p>
<br /> Tagged: <a href='http://4dpiecharts.com/tag/assignment/'>assignment</a>, <a href='http://4dpiecharts.com/tag/metadata/'>metadata</a>, <a href='http://4dpiecharts.com/tag/r/'>r</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/4dpiecharts.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/4dpiecharts.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/4dpiecharts.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/4dpiecharts.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/4dpiecharts.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/4dpiecharts.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/4dpiecharts.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/4dpiecharts.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/4dpiecharts.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/4dpiecharts.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/4dpiecharts.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/4dpiecharts.wordpress.com/439/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/4dpiecharts.wordpress.com/439/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/4dpiecharts.wordpress.com/439/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=439&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://4dpiecharts.com/2012/01/06/adding-metadata-to-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c1a01d3843ecaa30abd003b65811a8?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">richierocks</media:title>
		</media:content>
	</item>
		<item>
		<title>A quick primer on split-apply-combine problems</title>
		<link>http://4dpiecharts.com/2011/12/16/a-quick-primer-on-split-apply-combine-problems/</link>
		<comments>http://4dpiecharts.com/2011/12/16/a-quick-primer-on-split-apply-combine-problems/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 18:29:17 +0000</pubDate>
		<dc:creator>richierocks</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[apply]]></category>
		<category><![CDATA[combine]]></category>
		<category><![CDATA[plyr]]></category>
		<category><![CDATA[r]]></category>
		<category><![CDATA[split]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://4dpiecharts.com/?p=433</guid>
		<description><![CDATA[I&#8217;ve just answered my hundred billionth question on Stack Overflow that goes something like I want to calculate some statistic for lots of different groups. Although these questions provide a steady stream of easy points, its such a common and basic data analysis concept that I thought it would be useful to have a document [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=433&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just answered my hundred billionth question on Stack Overflow that goes something like</p>
<blockquote><p>
I want to calculate some statistic for lots of different groups.
</p></blockquote>
<p>Although these questions provide a steady stream of easy points, its such a common and basic data analysis concept that I thought it would be useful to have a document to refer people to.</p>
<p>First off, you need to data in the right format.  The canonical form in R is a data frame with one column containing the values to calculate a statistic for and another column containing the group to which that value belongs.  A good example is the InsectSprays dataset, built into R.</p>
<p><pre class="brush: r;">
head(InsectSprays)
  count spray
1    10     A
2     7     A
3    20     A
4    14     A
5    14     A
6    12     A
</pre></p>
<p>These problems are widely known as split-apply-combine problems after the three steps involved in their solution.  Let&#8217;s go through it step by step.</p>
<p>First, we split the <code>count</code> column by the <code>spray</code> column.</p>
<p><pre class="brush: r;">
(count_by_spray &lt;- with(InsectSprays, split(count, spray)))
</pre></p>
<p>Secondly, we apply the statistic to each element of the list.  Lets use the <code>mean</code> here.</p>
<p><pre class="brush: r;">
(mean_by_spray &lt;- lapply(count_by_spray, mean))
</pre></p>
<p>Finally, (if possible) we recombine the list as a vector.</p>
<p><pre class="brush: r;">
unlist(mean_by_spray)
</pre></p>
<p>This procedure is such a common thing that there are many functions to speed up the process.  <code>sapply</code> and <code>vapply</code> do the last two steps together.</p>
<p><pre class="brush: r;">
sapply(count_by_spray, mean)
vapply(count_by_spray, mean, numeric(1))
</pre></p>
<p>We can do even better than that however. <code>tapply</code>, <code>aggregate</code> and <code>by</code> all provide a one-function solution to these S-A-C problems.</p>
<p><pre class="brush: r;">
with(InsectSprays, tapply(count, spray, mean))
with(InsectSprays, by(count, spray, mean))
aggregate(count ~ spray, InsectSprays, mean)
</pre></p>
<p>The <code>plyr</code> package also provides several solutions, with a choice of output format. <code>ddply</code> takes a data frame and returned another data frame, which is what you&#8217;ll want most of the time.  <code>dlply</code> takes a data frame and returns the uncombined list, which is useful if you want to do another processing step before combining.</p>
<p><pre class="brush: r;">
ddply(InsectSprays, .(spray), summarise, mean.count = mean(count))
dlply(InsectSprays, .(spray), summarise, mean.count = mean(count))
</pre></p>
<p>You can read much more on this type of problem and the <code>plyr</code> solution in <a href="http://www.jstatsoft.org/v40/i01">The Split-Apply-Combine Strategy for Data Analysis</a>, in the Journal of Statistical Software, by the ubiquitous Hadley Wickham.</p>
<p>One tiny variation on the problem is when you want the output statistic vector to have the same length as the original input vectors.  For this, there is the <code>ave</code> function (which provides <code>mean</code> as the default function).</p>
<p><pre class="brush: r;">
with(InsectSprays, ave(count, spray))
</pre></p>
<br /> Tagged: <a href='http://4dpiecharts.com/tag/apply/'>apply</a>, <a href='http://4dpiecharts.com/tag/combine/'>combine</a>, <a href='http://4dpiecharts.com/tag/plyr/'>plyr</a>, <a href='http://4dpiecharts.com/tag/r/'>r</a>, <a href='http://4dpiecharts.com/tag/split/'>split</a>, <a href='http://4dpiecharts.com/tag/statistics/'>statistics</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/4dpiecharts.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/4dpiecharts.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/4dpiecharts.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/4dpiecharts.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/4dpiecharts.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/4dpiecharts.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/4dpiecharts.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/4dpiecharts.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/4dpiecharts.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/4dpiecharts.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/4dpiecharts.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/4dpiecharts.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/4dpiecharts.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/4dpiecharts.wordpress.com/433/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=433&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://4dpiecharts.com/2011/12/16/a-quick-primer-on-split-apply-combine-problems/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c1a01d3843ecaa30abd003b65811a8?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">richierocks</media:title>
		</media:content>
	</item>
		<item>
		<title>MATLAB&#8217;s stand out new feature</title>
		<link>http://4dpiecharts.com/2011/10/06/matlabs-stand-out-new-feature/</link>
		<comments>http://4dpiecharts.com/2011/10/06/matlabs-stand-out-new-feature/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 17:10:17 +0000</pubDate>
		<dc:creator>richierocks</dc:creator>
				<category><![CDATA[MATLAB]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[r2011b]]></category>
		<category><![CDATA[renaming]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://4dpiecharts.com/?p=426</guid>
		<description><![CDATA[It&#8217;s been a while since my last MATLAB post, not because I don&#8217;t love the language, but more because I do most of my blogging from home, where I have no license, and because (mostly thanks to R-bloggers) I get ten times as many page views for the R posts. (TODO: Create MATLAB-bloggers service.) Having [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=426&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since my last MATLAB post, not because I don&#8217;t love the language, but more because I do most of my blogging from home, where I have no license, and because (mostly thanks to R-bloggers) I get ten times as many page views for the R posts.  (TODO: Create MATLAB-bloggers service.)</p>
<p>Having returned from holiday (it was lovely, thanks for asking) I&#8217;ve been trying out the latest release of MATLAB &ndash; R2011b.  So far, the standout new feature is the automatic variable renaming.  If you change the name of a variable at the point where it was declared, then pressing Shift+Enter lets MATLAB rename all other instances.  IDEs for statically-typed languages have had this feature for years, but to see it in a dynamically-typed language is very impressive.</p>
<p><a href="http://4dpiecharts.files.wordpress.com/2011/10/matlab_auto_rename.png"><img src="http://4dpiecharts.files.wordpress.com/2011/10/matlab_auto_rename.png?w=600" alt="MATLAB&#039;s variable auto-renaming in action" title="MATLAB&#039;s variable auto-renaming in action"   class="aligncenter size-full wp-image-427" /></a></p>
<br /> Tagged: <a href='http://4dpiecharts.com/tag/ide/'>ide</a>, <a href='http://4dpiecharts.com/tag/matlab/'>matlab</a>, <a href='http://4dpiecharts.com/tag/r2011b/'>r2011b</a>, <a href='http://4dpiecharts.com/tag/renaming/'>renaming</a>, <a href='http://4dpiecharts.com/tag/variables/'>variables</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/4dpiecharts.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/4dpiecharts.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/4dpiecharts.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/4dpiecharts.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/4dpiecharts.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/4dpiecharts.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/4dpiecharts.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/4dpiecharts.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/4dpiecharts.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/4dpiecharts.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/4dpiecharts.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/4dpiecharts.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/4dpiecharts.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/4dpiecharts.wordpress.com/426/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=426&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://4dpiecharts.com/2011/10/06/matlabs-stand-out-new-feature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c1a01d3843ecaa30abd003b65811a8?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">richierocks</media:title>
		</media:content>

		<media:content url="http://4dpiecharts.files.wordpress.com/2011/10/matlab_auto_rename.png" medium="image">
			<media:title type="html">MATLAB&#039;s variable auto-renaming in action</media:title>
		</media:content>
	</item>
		<item>
		<title>A Great European Bailout Infographic</title>
		<link>http://4dpiecharts.com/2011/09/08/a-great-european-bailout-infographic/</link>
		<comments>http://4dpiecharts.com/2011/09/08/a-great-european-bailout-infographic/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 14:53:39 +0000</pubDate>
		<dc:creator>richierocks</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dataviz]]></category>
		<category><![CDATA[european bailout]]></category>
		<category><![CDATA[infographic]]></category>
		<category><![CDATA[jp morgan]]></category>
		<category><![CDATA[lego]]></category>

		<guid isPermaLink="false">http://4dpiecharts.com/?p=421</guid>
		<description><![CDATA[Whenever there&#8217;s a financial crisis, I tend to assume that it&#8217;s Dirk Eddelbuettel&#8216;s fault, though apparently the EMU debt crisis is more complicated than that. JP Morgan have just released a white paper about the problem, including a Lego infographic of who is asking who for money. Created, apparently, by Peter Cembalest, aged nine. Impressive [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=421&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Whenever there&#8217;s a financial crisis, I tend to assume that it&#8217;s <a href="http://dirk.eddelbuettel.com/blog/">Dirk Eddelbuettel</a>&#8216;s fault, though apparently the EMU debt crisis is more complicated than that.  JP Morgan have just released <a href="http://blogs.reuters.com/felix-salmon/files/2011/09/09-06-11-EOTM-European-Minifigure-Union.pdf">a white paper</a> about the problem, including a Lego infographic of who is asking who for money.  Created, apparently, by Peter Cembalest, aged nine.  Impressive stuff.</p>
<p><a href="http://4dpiecharts.files.wordpress.com/2011/09/euro_bailout.png"><img src="http://4dpiecharts.files.wordpress.com/2011/09/euro_bailout.png?w=300&#038;h=169" alt="European bailout graph" title="...and then a bionicle came and kicked all their asses" width="300" height="169" class="aligncenter size-medium wp-image-422" /></a></p>
<p>Found via <a href="http://www.theregister.co.uk/2011/09/08/lego_crisis/">The Register</a>.</p>
<br /> Tagged: <a href='http://4dpiecharts.com/tag/dataviz/'>dataviz</a>, <a href='http://4dpiecharts.com/tag/european-bailout/'>european bailout</a>, <a href='http://4dpiecharts.com/tag/infographic/'>infographic</a>, <a href='http://4dpiecharts.com/tag/jp-morgan/'>jp morgan</a>, <a href='http://4dpiecharts.com/tag/lego/'>lego</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/4dpiecharts.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/4dpiecharts.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/4dpiecharts.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/4dpiecharts.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/4dpiecharts.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/4dpiecharts.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/4dpiecharts.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/4dpiecharts.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/4dpiecharts.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/4dpiecharts.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/4dpiecharts.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/4dpiecharts.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/4dpiecharts.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/4dpiecharts.wordpress.com/421/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=421&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://4dpiecharts.com/2011/09/08/a-great-european-bailout-infographic/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c1a01d3843ecaa30abd003b65811a8?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">richierocks</media:title>
		</media:content>

		<media:content url="http://4dpiecharts.files.wordpress.com/2011/09/euro_bailout.png?w=300" medium="image">
			<media:title type="html">...and then a bionicle came and kicked all their asses</media:title>
		</media:content>
	</item>
		<item>
		<title>Interactive graphics for data analysis</title>
		<link>http://4dpiecharts.com/2011/09/01/interactive-graphics-for-data-analysis/</link>
		<comments>http://4dpiecharts.com/2011/09/01/interactive-graphics-for-data-analysis/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 22:06:08 +0000</pubDate>
		<dc:creator>richierocks</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[data-analysis]]></category>
		<category><![CDATA[dataviz]]></category>
		<category><![CDATA[exploratory]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[r]]></category>
		<category><![CDATA[theus]]></category>
		<category><![CDATA[urbanek]]></category>

		<guid isPermaLink="false">http://4dpiecharts.com/?p=416</guid>
		<description><![CDATA[I got a copy of Martin Theus and Simon Urbanek&#8217;s Interactive Graphics for Data Analysis a couple of years ago, whence it&#8217;s been sat on my bookshelf. Since I&#8217;ve recently become a self-proclaimed expert on interactive graphics I thought it was about time I read the thing. Which is exactly what I did last weekend [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=416&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://4dpiecharts.files.wordpress.com/2011/09/leeds.jpg"><img src="http://4dpiecharts.files.wordpress.com/2011/09/leeds.jpg?w=300&#038;h=208" alt="Rocking out, reading Theus &amp; Urbanek" title="30 Seconds to Mars recommend parallel coordinate plots for visualising high dimensional datasets" width="300" height="208" class="aligncenter size-medium wp-image-417" /></a></p>
<p>I got a copy of Martin Theus and Simon Urbanek&#8217;s <a href="http://books.google.com/books?id=xHIH1Q47FeoC">Interactive Graphics for Data Analysis</a> a couple of years ago, whence it&#8217;s been sat on my bookshelf.  Since I&#8217;ve recently become a <a href="http://4dpiecharts.com/2011/08/17/user2011-easy-interactive-ggplots-talk/">self-proclaimed expert on interactive graphics</a> I thought it was about time I read the thing.  Which is exactly what I did last weekend at the Leeds Festival (in between rocking out).</p>
<p>It&#8217;s a book of two halves, and despite the title the interactivity isn&#8217;t really the focus.  The book is actually a guide on how to do exploratory data analysis.  The first half of the book works like an advanced chart chooser, explaining which plots are useful for which types of data, and what types of interactivity they can benefit from.  For me, it was worth it for the many rare plots, like spineplots and interaction plots and mosaic plots and fluctuation diagrams.  If you&#8217;re bored of barcharts, this is a great way to expand your graphical vocabulary.  The second half of the book consists entirely of case studies, where you can practice a workflow for exploring data, which is something that&#8217;s always worthwhile doing.  </p>
<p>The really big takeaway that I got is that exploratory graphics have different priorities to publication graphics.  When you are in the courting stage with a dataset, just getting to know each other, you don&#8217;t really care so much about whether the greek letters in your axis label are formatted correctly or whether the shade of pink in your dots is quite right.  All you really need is to be able to generate lots and lots of plots quickly, and to be able to see the relationships between them.</p>
<p>It is this last point that the authors claim interactivity is most useful for.  Perhaps the canonical example of this is clicking a bar on a histogram or barchart, and having corresponding points on a scatterplot highlighted.  To demonstrate this, here&#8217;s an example using Simon&#8217;s <code>Acinonyx</code> package (shortly to be renamed <code>ix</code> for &#8220;iplots Extreme&#8221;).  Acinonyx isn&#8217;t yet available on CRAN, see its <a href="http://www.rforge.net/Acinonyx/index.html">home page</a><br />
 for installation details.</p>
<p><pre class="brush: r;">
library(Acinonyx)        
library(MASS)
data(Cars93)
interactive_scatter &lt;- with(Cars93, iplot(Horsepower, MPG.city))  
interactive_histo &lt;- with(Cars93, ihist(EngineSize))
</pre></p>
<p>Click a bar in the histogram and the the corresponding points in the scatterplot are highlighted.  Likewise, drag to select points in the scatterplot and fractions of the histgram are highlighted.</p>
<p>The equivalent static version would be to use trellising and draw each possible graph combination.  Splitting a scatterplot into different groups depending upon bars of a histogram works something like this:</p>
<p><pre class="brush: r;">
library(ggplot2)
Cars93$EngineSizeGroup &lt;- cut(Cars93$EngineSize, 11)
(static_trellis_scatter &lt;- ggplot(Cars93, aes(Horsepower, MPG.city)) +
  geom_point() +
  facet_wrap(~ EngineSizeGroup)
)
</pre></p>
<p>(We don&#8217;t actually need to bother with the histograms, since they are a little boring.)  The reverse operation &ndash; going from a selected region of scatterplot to a higlighted region of bar chart is also possible, but trickier.  In this case, we do need both graphs.</p>
<p><pre class="brush: r;">
Cars93 &lt;- within(Cars93, 
{
  selected &lt;- ifelse(
    Horsepower &lt; 200 &amp; MPG.city &gt; 20 &amp; MPG.city &lt; 30, 
    &quot;selected&quot;, 
    &quot;unselected&quot;
  )
})
(static_scatter_with_highlight &lt;-
  ggplot(Cars93, aes(Horsepower, MPG.city, colour = selected)) +
  geom_point()
)
(static_histo_with_highlight &lt;- 
  ggplot(Cars93, aes(EngineSizeGroup, fill = selected)) +
  geom_histogram() + 
  opts(axis.text.x = theme_text(angle = 30, hjust = 1, vjust = 1))
)
</pre></p>
<p>My conclusion from reading the book, and from my initial experimentation with <code>Acinonyx</code> is that anything you can do interactively is also possible by drawing many static graphs, but the interaction can let you see things quicker.</p>
<br /> Tagged: <a href='http://4dpiecharts.com/tag/data-analysis/'>data-analysis</a>, <a href='http://4dpiecharts.com/tag/dataviz/'>dataviz</a>, <a href='http://4dpiecharts.com/tag/exploratory/'>exploratory</a>, <a href='http://4dpiecharts.com/tag/interactive/'>interactive</a>, <a href='http://4dpiecharts.com/tag/r/'>r</a>, <a href='http://4dpiecharts.com/tag/theus/'>theus</a>, <a href='http://4dpiecharts.com/tag/urbanek/'>urbanek</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/4dpiecharts.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/4dpiecharts.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/4dpiecharts.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/4dpiecharts.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/4dpiecharts.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/4dpiecharts.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/4dpiecharts.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/4dpiecharts.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/4dpiecharts.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/4dpiecharts.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/4dpiecharts.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/4dpiecharts.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/4dpiecharts.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/4dpiecharts.wordpress.com/416/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=416&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://4dpiecharts.com/2011/09/01/interactive-graphics-for-data-analysis/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c1a01d3843ecaa30abd003b65811a8?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">richierocks</media:title>
		</media:content>

		<media:content url="http://4dpiecharts.files.wordpress.com/2011/09/leeds.jpg?w=300" medium="image">
			<media:title type="html">30 Seconds to Mars recommend parallel coordinate plots for visualising high dimensional datasets</media:title>
		</media:content>
	</item>
		<item>
		<title>Nomograms everywhere!</title>
		<link>http://4dpiecharts.com/2011/08/30/nomograms-everywhere/</link>
		<comments>http://4dpiecharts.com/2011/08/30/nomograms-everywhere/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 13:37:37 +0000</pubDate>
		<dc:creator>richierocks</dc:creator>
				<category><![CDATA[MATLAB]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[dataviz]]></category>
		<category><![CDATA[nomograms]]></category>
		<category><![CDATA[user2011]]></category>

		<guid isPermaLink="false">http://4dpiecharts.com/?p=408</guid>
		<description><![CDATA[At useR!, Jonty Rougier talked about nomograms, a once popular visualisation that has fallen by the wayside with the rise of computers. I&#8217;d seen a few before, but hadn&#8217;t understood how they worked or why you&#8217;d want to use them. Anyway, since that talk I&#8217;ve been digging around in biology books from the 60s and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=408&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At useR!, Jonty Rougier talked about nomograms, a once popular visualisation that has fallen by the wayside with the rise of computers.  I&#8217;d seen a few before, but hadn&#8217;t understood how they worked or why you&#8217;d want to use them.  Anyway, since that talk I&#8217;ve been digging around in biology books from the 60s and 70s, and it seems they are full of them.  So for those of you who haven&#8217;t seen the talk, here&#8217;s how they work.</p>
<p>A basic nomogram consists of three scales.  By reading off known values from two of the scales, you can estimate a third one.  Here&#8217;s an example I found in the <acronym title="International Commision on Radiological Protection">ICRP</acronym>&#8216;s <a href="http://www.icrp.org/publication.asp?id=ICRP%20Publication%2023">reference manual</a>.</p>
<p><a href="http://4dpiecharts.files.wordpress.com/2011/08/height_weight_skin_surface_area.png"><img src="http://4dpiecharts.files.wordpress.com/2011/08/height_weight_skin_surface_area.png?w=231&#038;h=300" alt="Nomogram estimating skin surface area from height and bodyweight" title="Nomogram estimating skin surface area from height and bodyweight" width="231" height="300" class="aligncenter size-medium wp-image-409" /></a></p>
<p>It&#8217;s difficult to measure people&#8217;s skin surface area, but height and bodyweight are very straightforward.  To use the nomogram, you place a ruler (or other straight edge) on the height* and weight scales and read of the point where the ruler crosses the surface area scale.  I&#8217;m 177cm tall and weigh 72kg, so according to this, my estimated skin surface area is 1.89m<sup>2</sup>.</p>
<p>Of course nowadays, the standard way to solve this sort of problem is to write a function.  Jonty suggested that the main modern use of nomograms is in fieldwork situations, where computers aren&#8217;t handily available.  (His case study was Kenyan vets trying to estimate the weight of donkeys form there height and girth.)</p>
<p>Altman and Dittmer&#8217;s <a href="http://books.google.com/books/about/Respiration_and_circulation.html?id=E-dqAAAAMAAJ">Respiration and Circulation</a> has many more pretty nomograms.  I was particularly impressed by those on blood pH, reproduced below for your pleasure.</p>
<p><a href="http://4dpiecharts.files.wordpress.com/2011/08/blood_acid_base_balance_siggard_andersen_alignment.png"><img src="http://4dpiecharts.files.wordpress.com/2011/08/blood_acid_base_balance_siggard_andersen_alignment.png?w=210&#038;h=300" alt="Nomogram estimating excess base in blood from pH and CO2 pressure via Siggard Andersen" title="Nomogram estimating excess base in blood from pH and CO2 pressure via Siggard Andersen" width="210" height="300" class="aligncenter size-medium wp-image-410" /></a></p>
<p><a href="http://4dpiecharts.files.wordpress.com/2011/08/blood_acid_base_balance_singer_hastings.png"><img src="http://4dpiecharts.files.wordpress.com/2011/08/blood_acid_base_balance_singer_hastings.png?w=300&#038;h=285" alt="Nomogram estimating excess base in blood from pH and CO2 pressure via Singer Hastings" title="Nomogram estimating excess base in blood from pH and CO2 pressure via Singer Hastings" width="300" height="285" class="aligncenter size-medium wp-image-411" /></a></p>
<p>Your homework is to dig out a pre-1980 textbook and hunt for more nomograms.</p>
<p>*Gruesomely, the fact that the scale is labelled &#8220;length&#8221; rather than &#8220;height&#8221; makes me suspect that the bodies that provided the data were in a permanent lying down position &ndash; that is, they were corpses.</p>
<br /> Tagged: <a href='http://4dpiecharts.com/tag/dataviz/'>dataviz</a>, <a href='http://4dpiecharts.com/tag/nomograms/'>nomograms</a>, <a href='http://4dpiecharts.com/tag/user2011/'>user2011</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/4dpiecharts.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/4dpiecharts.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/4dpiecharts.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/4dpiecharts.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/4dpiecharts.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/4dpiecharts.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/4dpiecharts.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/4dpiecharts.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/4dpiecharts.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/4dpiecharts.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/4dpiecharts.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/4dpiecharts.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/4dpiecharts.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/4dpiecharts.wordpress.com/408/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=4dpiecharts.com&amp;blog=15320431&amp;post=408&amp;subd=4dpiecharts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://4dpiecharts.com/2011/08/30/nomograms-everywhere/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c1a01d3843ecaa30abd003b65811a8?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">richierocks</media:title>
		</media:content>

		<media:content url="http://4dpiecharts.files.wordpress.com/2011/08/height_weight_skin_surface_area.png?w=231" medium="image">
			<media:title type="html">Nomogram estimating skin surface area from height and bodyweight</media:title>
		</media:content>

		<media:content url="http://4dpiecharts.files.wordpress.com/2011/08/blood_acid_base_balance_siggard_andersen_alignment.png?w=210" medium="image">
			<media:title type="html">Nomogram estimating excess base in blood from pH and CO2 pressure via Siggard Andersen</media:title>
		</media:content>

		<media:content url="http://4dpiecharts.files.wordpress.com/2011/08/blood_acid_base_balance_singer_hastings.png?w=300" medium="image">
			<media:title type="html">Nomogram estimating excess base in blood from pH and CO2 pressure via Singer Hastings</media:title>
		</media:content>
	</item>
	</channel>
</rss>
