<?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>Psychwire</title>
	<atom:link href="http://psychwire.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://psychwire.wordpress.com</link>
	<description>Hayward&#039;s blog on psychology, visual cognition, and stats</description>
	<lastBuildDate>Thu, 18 Oct 2012 09:30:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='psychwire.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/e2048594ed412ca08d3eb088c9a3b626?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Psychwire</title>
		<link>http://psychwire.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://psychwire.wordpress.com/osd.xml" title="Psychwire" />
	<atom:link rel='hub' href='http://psychwire.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Science Open Day</title>
		<link>http://psychwire.wordpress.com/2012/03/14/science-open-day/</link>
		<comments>http://psychwire.wordpress.com/2012/03/14/science-open-day/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 22:10:35 +0000</pubDate>
		<dc:creator>Hayward Godwin</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://psychwire.wordpress.com/?p=529</guid>
		<description><![CDATA[This weekend, a crack team of students and postgrads were involved in giving demos of the kind of experiments that we get &#8230;<p><a href="http://psychwire.wordpress.com/2012/03/14/science-open-day/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=529&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This weekend, a crack team of students and postgrads were involved in giving demos of the kind of experiments that we get up to, as well as the eye-tracker, at an open day run by the university. Here they all are in their glory:</p>
<div id="attachment_530" class="wp-caption aligncenter" style="width: 539px"><a href="http://psychwire.files.wordpress.com/2012/03/imag0699.jpg"><img class="size-full wp-image-530" title="The people" src="http://psychwire.files.wordpress.com/2012/03/imag0699.jpg?w=529&#038;h=316" alt="" width="529" height="316" /></a><p class="wp-caption-text">From left to right: Sarah, Zoe, Leanne, Carl, Ascen, Charlotte and Karen</p></div>
<p>There was some also some silliness, totally out of character:</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='529' height='328' src='http://www.youtube.com/embed/wLt_Mhififs?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<p>Here you can watch it in a never-ending loop:</p>
<p><a href="http://psychwire.files.wordpress.com/2012/03/bouncycarlos.gif"><img class="aligncenter size-full wp-image-536" title="bouncyCarlos" src="http://psychwire.files.wordpress.com/2012/03/bouncycarlos.gif?w=529" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psychwire.wordpress.com/529/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psychwire.wordpress.com/529/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=529&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psychwire.wordpress.com/2012/03/14/science-open-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/058d9b4b0da389096a4211c5b1a9296f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psychwire</media:title>
		</media:content>

		<media:content url="http://psychwire.files.wordpress.com/2012/03/imag0699.jpg" medium="image">
			<media:title type="html">The people</media:title>
		</media:content>

		<media:content url="http://psychwire.files.wordpress.com/2012/03/bouncycarlos.gif" medium="image">
			<media:title type="html">bouncyCarlos</media:title>
		</media:content>
	</item>
		<item>
		<title>Achievement Get!</title>
		<link>http://psychwire.wordpress.com/2012/03/06/achievement-get/</link>
		<comments>http://psychwire.wordpress.com/2012/03/06/achievement-get/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 22:30:03 +0000</pubDate>
		<dc:creator>Hayward Godwin</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://psychwire.wordpress.com/?p=525</guid>
		<description><![CDATA[So apparently WordPress has achievements now. I wonder if they have achievements for trolling comment threads as well. &#160;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=525&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://psychwire.files.wordpress.com/2012/03/achievementlul.png"><img class="aligncenter size-full wp-image-526" title="achievementlul" src="http://psychwire.files.wordpress.com/2012/03/achievementlul.png?w=529" alt=""   /></a></p>
<p>So apparently WordPress has achievements now. I wonder if they have achievements for trolling comment threads as well.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psychwire.wordpress.com/525/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psychwire.wordpress.com/525/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=525&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psychwire.wordpress.com/2012/03/06/achievement-get/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/058d9b4b0da389096a4211c5b1a9296f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psychwire</media:title>
		</media:content>

		<media:content url="http://psychwire.files.wordpress.com/2012/03/achievementlul.png" medium="image">
			<media:title type="html">achievementlul</media:title>
		</media:content>
	</item>
		<item>
		<title>He&#8217;s coming for you!</title>
		<link>http://psychwire.wordpress.com/2012/03/06/hes-coming-for-you/</link>
		<comments>http://psychwire.wordpress.com/2012/03/06/hes-coming-for-you/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 22:24:06 +0000</pubDate>
		<dc:creator>Hayward Godwin</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://psychwire.wordpress.com/?p=518</guid>
		<description><![CDATA[He knew this was coming, he sent me the images expecting it. He knows who he is, and that we &#8230;<p><a href="http://psychwire.wordpress.com/2012/03/06/hes-coming-for-you/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=518&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>He knew this was coming, he sent me the images expecting it. He knows who he is, and that we all love his ways (and the suspicious eyebrow of many dooms).<a href="http://psychwire.files.wordpress.com/2012/03/greggif.gif"><img class="aligncenter size-full wp-image-519" title="Greg, coming for ya!" src="http://psychwire.files.wordpress.com/2012/03/greggif.gif?w=529" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psychwire.wordpress.com/518/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psychwire.wordpress.com/518/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=518&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psychwire.wordpress.com/2012/03/06/hes-coming-for-you/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/058d9b4b0da389096a4211c5b1a9296f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psychwire</media:title>
		</media:content>

		<media:content url="http://psychwire.files.wordpress.com/2012/03/greggif.gif" medium="image">
			<media:title type="html">Greg, coming for ya!</media:title>
		</media:content>
	</item>
		<item>
		<title>Migrating from SPSS/Excel to R, Part 3: Preparing your Data</title>
		<link>http://psychwire.wordpress.com/2011/10/29/migrating-from-spssexcel-to-r-part-3-preparing-your-data/</link>
		<comments>http://psychwire.wordpress.com/2011/10/29/migrating-from-spssexcel-to-r-part-3-preparing-your-data/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 10:00:18 +0000</pubDate>
		<dc:creator>Hayward Godwin</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[r]]></category>
		<category><![CDATA[reshape]]></category>
		<category><![CDATA[spss]]></category>

		<guid isPermaLink="false">http://psychwire.wordpress.com/?p=422</guid>
		<description><![CDATA[In this post, I describe how to prepare your data for migrating between SPSS/Excel and R. This is the third &#8230;<p><a href="http://psychwire.wordpress.com/2011/10/29/migrating-from-spssexcel-to-r-part-3-preparing-your-data/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=422&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In this post, I describe how to prepare your data for migrating between SPSS/Excel and R. This is the third post in a series, the first two of which can be found <a href="http://psychwire.wordpress.com/2011/07/10/migrating-from-spssexcel-to-r/">here</a> and <a href="http://psychwire.wordpress.com/2011/07/17/migrating-from-spssexcel-to-r-part-2-working-with-packages/">here</a>. Don&#8217;t forget, this is primarily aimed at those working on datasets for psychology experiments, as that&#8217;s what I do.</p>
<h1>Datasets in SPSS/Excel</h1>
<p>One of the golden rules of working with datasets in SPSS is that you need to have <strong><em>one row for each participant</em></strong>. I know there are some exceptions to this, but it&#8217;s an important general rule for SPSS.</p>
<p>The main consequence of this is that, when you&#8217;re dealing with any form of within-subjects data, your dataset quickly becomes very wide indeed. Let&#8217;s look at an example below. Here, we have 10 participants, involved in two experimental sessions. For each session, we&#8217;ve measured the Reaction Time (RT).</p>
<p><a href="http://psychwire.files.wordpress.com/2011/07/spss_base.png"><img class="alignnone size-thumbnail wp-image-430" title="spss_base" src="http://psychwire.files.wordpress.com/2011/07/spss_base.png?w=150&#038;h=112" alt="" width="150" height="112" /></a></p>
<p>That&#8217;s not too messy (note that I just pasted in 1200 for the values as this is just an illustration). But let&#8217;s make things worse. Let&#8217;s have 10 experimental sessions, each with three different blocks of trials, each representing a different within-subjects condition. What does it look like now?</p>
<p><a href="http://psychwire.files.wordpress.com/2011/07/spss_wider.png"><img class="alignnone size-thumbnail wp-image-431" title="spss_wider" src="http://psychwire.files.wordpress.com/2011/07/spss_wider.png?w=150&#038;h=95" alt="" width="150" height="95" /></a></p>
<p>Well, we can&#8217;t fit it all into a single screenshot, as the dataset has a large number of columns. This is an illustration of what gets referred to as a <strong><em>wide </em></strong>data format &#8211; you have a large number of columns mapping on to various factors, variables, etc.</p>
<p>R does things differently, for most of the statistical tests that I&#8217;ll be discussing: it uses the <strong><em>long </em></strong>data format instead.</p>
<h1>Long Datasets in R</h1>
<p>When you think about it, wide datasets can be a real pain. I&#8217;ve seen people spend hours running pivot tables and then having to drag columns around to get their datasets in a format that SPSS will be happy with.</p>
<p>With R, things are significantly easier: for many tests, such as t-tests and ANOVAs of various forms, you only need to use a single layout: the long data format. You can probably guess what this is already, but let&#8217;s do a direct comparison using the first example dataset described above.</p>
<p>Again, let&#8217;s say we have Reaction Times (RTs) for 10 participants involved in two sessions of experimental trials. In wide format, these data look like this:</p>
<p><a href="http://psychwire.files.wordpress.com/2011/07/r_wide.png"><img class="alignnone size-thumbnail wp-image-433" title="r_wide" src="http://psychwire.files.wordpress.com/2011/07/r_wide.png?w=143&#038;h=150" alt="" width="143" height="150" /></a></p>
<p>In the long format, these data look like this:</p>
<p><a href="http://psychwire.files.wordpress.com/2011/07/r_long.png"><img class="alignnone size-thumbnail wp-image-432" title="r_long" src="http://psychwire.files.wordpress.com/2011/07/r_long.png?w=73&#038;h=150" alt="" width="73" height="150" /></a></p>
<p>Here you can see the difference: in the long format, the one row per participant rule does not apply. Instead, you have one row for each combination of factors under examination.</p>
<h1>What if your Datasets are all in the Wide Format?</h1>
<p>There are a number of options that you can use to convert between the two different formats. I&#8217;ve covered perhaps one of the easiest methods, in the form of the reshape package, in a previous post. You&#8217;ll need to install the <strong>reshape2</strong> package to do this, using the <a href="http://psychwire.wordpress.com/2011/07/17/migrating-from-spssexcel-to-r-part-2-working-with-packages/">package installation guide I presented previously</a>.</p>
<p>Just to give an example, let&#8217;s work through the dataset I&#8217;ve been describing above.</p>
<p>First, let&#8217;s create some data:</p>
<p><pre class="brush: r;">

session1 &lt;- rnorm(mean=1500, sd=250, 10)

session2 &lt;- rnorm(mean=1000, sd=250, 10)

ppt &lt;- seq(1:10)

wide&lt;- data.frame(ppt, session1, session2)

</pre></p>
<p>That gives us a dataframe called <strong>wide</strong>. How do we reshape the dataset to the long format that we want? Simple, by using the following:</p>
<p><pre class="brush: r;">

long&lt;- melt(wide, id=c(&quot;ppt&quot;))

</pre></p>
<p>This then gives us a dataframe called <strong>long</strong>, arranged in the format we want.</p>
<p>In many cases, if you want to avoid having to do this, it&#8217;s best to make sure your datasets are in the long format beforehand &#8211; it&#8217;s a simple case of planning ahead and knowing that you can do things differently.</p>
<h1>Summary and Next Steps</h1>
<p>This post illustrated how to get your data organised for use in R for those who are used to using SPSS/Excel. There are many useful ways to re-organise your data, and I&#8217;ve covered one of them here (the reshape package). The next steps include aggregating your data and then running statistical tests.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psychwire.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psychwire.wordpress.com/422/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=422&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psychwire.wordpress.com/2011/10/29/migrating-from-spssexcel-to-r-part-3-preparing-your-data/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/058d9b4b0da389096a4211c5b1a9296f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psychwire</media:title>
		</media:content>

		<media:content url="http://psychwire.files.wordpress.com/2011/07/spss_base.png?w=150" medium="image">
			<media:title type="html">spss_base</media:title>
		</media:content>

		<media:content url="http://psychwire.files.wordpress.com/2011/07/spss_wider.png?w=150" medium="image">
			<media:title type="html">spss_wider</media:title>
		</media:content>

		<media:content url="http://psychwire.files.wordpress.com/2011/07/r_wide.png?w=143" medium="image">
			<media:title type="html">r_wide</media:title>
		</media:content>

		<media:content url="http://psychwire.files.wordpress.com/2011/07/r_long.png?w=73" medium="image">
			<media:title type="html">r_long</media:title>
		</media:content>
	</item>
		<item>
		<title>Posters: Ready!</title>
		<link>http://psychwire.wordpress.com/2011/08/30/posters-ready/</link>
		<comments>http://psychwire.wordpress.com/2011/08/30/posters-ready/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 21:58:58 +0000</pubDate>
		<dc:creator>Hayward Godwin</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://psychwire.wordpress.com/?p=500</guid>
		<description><![CDATA[Here&#8217;s a short video on how best to use a poster tube prior to a conference.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=500&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s a short video on how best to use a poster tube prior to a conference.</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='529' height='328' src='http://www.youtube.com/embed/QPih6N_5HKY?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psychwire.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psychwire.wordpress.com/500/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=500&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psychwire.wordpress.com/2011/08/30/posters-ready/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/058d9b4b0da389096a4211c5b1a9296f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psychwire</media:title>
		</media:content>
	</item>
		<item>
		<title>Using visual interruptions to explore the extent and time course of fixation planning in visual search</title>
		<link>http://psychwire.wordpress.com/2011/08/23/ecem_godwin_benson_drieghe_interruptions_2011/</link>
		<comments>http://psychwire.wordpress.com/2011/08/23/ecem_godwin_benson_drieghe_interruptions_2011/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 06:00:48 +0000</pubDate>
		<dc:creator>Hayward Godwin</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[eye movements]]></category>
		<category><![CDATA[psychology]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[visual cognition]]></category>

		<guid isPermaLink="false">http://psychwire.wordpress.com/?p=483</guid>
		<description><![CDATA[Here is a permanent copy of my poster for the European Conference in Eye Movements Poster for the 2011 ECEM Meeting. &#8230;<p><a href="http://psychwire.wordpress.com/2011/08/23/ecem_godwin_benson_drieghe_interruptions_2011/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=483&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Here is a permanent copy of my poster for the European Conference in Eye Movements Poster for the 2011 ECEM Meeting. The full reference is:</p>
<p>Godwin, H., Benson, V., &amp; Drieghe, D. (2011). <em>Using visual interruptions to explore the extent and time course of fixation planning in visual search.</em> Poster presented at the European Conference in Eye Movements, Marseille, France.</p>
<p>The poster can be downloaded via the following link:</p>
<p>Click here :<a href="http://psychwire.files.wordpress.com/2011/08/ecem_interruption_poster_final.pdf">ecem_interruption_poster_final</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psychwire.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psychwire.wordpress.com/483/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=483&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psychwire.wordpress.com/2011/08/23/ecem_godwin_benson_drieghe_interruptions_2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/058d9b4b0da389096a4211c5b1a9296f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psychwire</media:title>
		</media:content>
	</item>
		<item>
		<title>Summer</title>
		<link>http://psychwire.wordpress.com/2011/08/15/summer/</link>
		<comments>http://psychwire.wordpress.com/2011/08/15/summer/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 20:53:10 +0000</pubDate>
		<dc:creator>Hayward Godwin</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://psychwire.wordpress.com/?p=497</guid>
		<description><![CDATA[Wow, what a summer it&#8217;s been so far, and it&#8217;s not even over yet. I&#8217;ve not had time to catch &#8230;<p><a href="http://psychwire.wordpress.com/2011/08/15/summer/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=497&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Wow, what a summer it&#8217;s been so far, and it&#8217;s not even over yet. I&#8217;ve not had time to catch up on the posts I&#8217;d started a while back- and it looks like I&#8217;ll be away for a while longer.</p>
<p>Normally, summers involve a slight easing up of the workload, thanks to there being no students around, allowing people to catch up with things&#8230;but not this time! It&#8217;s been fun though, it&#8217;ll just be a little while before I&#8217;m back.</p>
<p>&nbsp;</p>
<p>See you&#8230;out there&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psychwire.wordpress.com/497/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psychwire.wordpress.com/497/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=497&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psychwire.wordpress.com/2011/08/15/summer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/058d9b4b0da389096a4211c5b1a9296f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psychwire</media:title>
		</media:content>
	</item>
		<item>
		<title>Watching other People Watching other People – Summer Edition</title>
		<link>http://psychwire.wordpress.com/2011/07/18/watching-other-people-watching-other-people-%e2%80%93-summer-edition/</link>
		<comments>http://psychwire.wordpress.com/2011/07/18/watching-other-people-watching-other-people-%e2%80%93-summer-edition/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 10:00:37 +0000</pubDate>
		<dc:creator>Hayward Godwin</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://psychwire.wordpress.com/?p=474</guid>
		<description><![CDATA[The venerable Sean Upton recently took this shot of someone taking a photo of the rain, enjoying the summer. It&#8217;s &#8230;<p><a href="http://psychwire.wordpress.com/2011/07/18/watching-other-people-watching-other-people-%e2%80%93-summer-edition/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=474&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>The venerable <a href="http://twitter.com/#!/_dylarama_">Sean Upton</a> recently took this shot of someone taking a photo of the rain, enjoying the summer. It&#8217;s part of the <a href="http://psychwire.wordpress.com/2011/05/11/watching-other-people-watching-other-peopleevents/">growing</a> <a href="http://psychwire.wordpress.com/2011/07/17/watching-other-people-watching-other-people-international-edition/">series</a> of posts here looking at people watching other people and events. Thanks, Sean!</p>
<p>Click on the image to see an enlarged version.</p>
<p><a href="http://psychwire.files.wordpress.com/2011/07/img_7254.jpg"><img class="alignnone size-thumbnail wp-image-476" title="IMG_7254" src="http://psychwire.files.wordpress.com/2011/07/img_7254.jpg?w=111&#038;h=150" alt="" width="111" height="150" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psychwire.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psychwire.wordpress.com/474/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=474&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psychwire.wordpress.com/2011/07/18/watching-other-people-watching-other-people-%e2%80%93-summer-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/058d9b4b0da389096a4211c5b1a9296f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psychwire</media:title>
		</media:content>

		<media:content url="http://psychwire.files.wordpress.com/2011/07/img_7254.jpg?w=111" medium="image">
			<media:title type="html">IMG_7254</media:title>
		</media:content>
	</item>
		<item>
		<title>Migrating from SPSS/Excel to R, Part 2: Working with Packages</title>
		<link>http://psychwire.wordpress.com/2011/07/17/migrating-from-spssexcel-to-r-part-2-working-with-packages/</link>
		<comments>http://psychwire.wordpress.com/2011/07/17/migrating-from-spssexcel-to-r-part-2-working-with-packages/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 09:09:50 +0000</pubDate>
		<dc:creator>Hayward Godwin</dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[r]]></category>
		<category><![CDATA[Rstudio]]></category>
		<category><![CDATA[spss]]></category>

		<guid isPermaLink="false">http://psychwire.wordpress.com/?p=440</guid>
		<description><![CDATA[In this post, I cover an important aspect of using R that users of SPSS/Excel won&#8217;t be familiar with: working &#8230;<p><a href="http://psychwire.wordpress.com/2011/07/17/migrating-from-spssexcel-to-r-part-2-working-with-packages/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=440&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In this post, I cover an important aspect of using R that users of SPSS/Excel won&#8217;t be familiar with: working with packages. Packages and the package system form a major difference between R and SPSS/Excel, which is why I&#8217;m devoting this entire post to them. It&#8217;s the second post in a series aimed at people wanting to migrate from SPSS/Excel to using R full-time. The previous post on this topic is <a href="http://psychwire.wordpress.com/2011/07/10/migrating-from-spssexcel-to-r/">available here</a>. Again, this post is aimed primarily at psychology researchers, as that&#8217;s what I am, though it will hopefully be relevant to others as well.</p>
<h1>Packages in R</h1>
<p>With SPSS/Excel, you pretty much get everything you could ever want to use, and more, installed with the default installation. This leads to a simple question. How many of the many hundreds of buttons, boxes and options in these programs have you used in total?</p>
<p>R is different. The basic installation of R comes with a large number of packages and commands. However, with R, people have been able to share their own packages which can help out, extend, and implement other useful things to make R even more funky and powerful. This is beneficial for a number of reasons, but, for the new user, it might seem a bit strange. Why doesn&#8217;t R just come with all the packages installed right away? Well, the chances are you won&#8217;t need <em>all </em>of the packages in existence, so there&#8217;s little point in installing them all by default. Doing so also reduces the size of an R download, saves hard drive space, and so on.</p>
<p>People are adding new and useful packages all the time, so let&#8217;s install a couple of popular ones that I use all the time.</p>
<h1>Installing Packages in R</h1>
<p>To get to the list of packages you have installed, go to the packages tab using RStudio:</p>
<p><a href="http://psychwire.files.wordpress.com/2011/07/packages.png"><img class="alignnone size-thumbnail wp-image-443" title="packages" src="http://psychwire.files.wordpress.com/2011/07/packages.png?w=150&#038;h=116" alt="" width="150" height="116" /></a></p>
<p>Packages are often updated, so you can use the <strong>Check for Updates </strong>button to update your packages.</p>
<p>To install a new package, you can either run the following command via the script tab or console window:</p>
<p><pre class="brush: r;">
install.packages(&quot;PACKAGENAME&quot;)
</pre></p>
<p>Where <strong>PACKAGENAME </strong>is the name of the package. Alternatively, using RStudio, you can hit the <strong>Install Packages</strong> button in the <strong>Packages </strong>window. You&#8217;ll be greeted with something like the following:</p>
<p><a href="http://psychwire.files.wordpress.com/2011/07/install_packages.png"><img class="alignnone size-thumbnail wp-image-444" title="install_packages" src="http://psychwire.files.wordpress.com/2011/07/install_packages.png?w=150&#038;h=111" alt="" width="150" height="111" /></a></p>
<p>In this window, just type the name of the package you want to install in the <strong>Packages </strong>text box. Here, I&#8217;ve gone for <strong>ggplot2 </strong>and <strong>plyr</strong>.</p>
<p>Once you hit the <strong>install </strong>button, the packages will be installed. It&#8217;s best to leave <strong>Install Dependencies </strong>checked because some packages need others to function. For example, ggplot2 uses plyr.</p>
<p><span class="Apple-style-span" style="font-weight:bold;line-height:12px;">Loading Packages in R</span></p>
<p>The packages you have installed won&#8217;t be loaded straight away. If R loaded all the packages you had installed, then you would often end up with packages loaded that you don&#8217;t need to use. To load your packages, you can do one of two things. First you can run the command:</p>
<p><pre class="brush: r;">

library(PACKAGENAME)

</pre></p>
<p>Where <strong>PACKAGENAME </strong>is the name of the package that you want to load.</p>
<p>An alternative method is to select the package using RStudio&#8217;s <strong>Package </strong>window. To load the package(s) that you want, all you need to do is click the checkbox next to the package name. See below.</p>
<p><a href="http://psychwire.files.wordpress.com/2011/07/load_package.png"><img class="alignnone size-thumbnail wp-image-449" title="load_package" src="http://psychwire.files.wordpress.com/2011/07/load_package.png?w=150&#038;h=117" alt="" width="150" height="117" /></a></p>
<p>There we go, <strong>ggplot2 </strong>has now been loaded! It&#8217;s also loaded <strong>plyr </strong>as <strong>ggplot2 </strong>needs plyr to function, as well as <strong>reshape</strong>.</p>
<p><strong>Getting Help with Using a Package</strong></p>
<p>Packages come with helpful documentation to get you started with using them. Again, you have two options in terms of accessing the documentation. First, you can type the command:</p>
<p><pre class="brush: r;">

?PACKAGENAME

</pre></p>
<p>Where <strong>PACKAGENAME </strong>is the name of your package.</p>
<p>Alternatively, you can click the name of the package in RStudio&#8217;s <strong>Packages </strong>window, as below.</p>
<p><a href="http://psychwire.files.wordpress.com/2011/07/package_help.png"><img class="alignnone size-thumbnail wp-image-451" title="package_help" src="http://psychwire.files.wordpress.com/2011/07/package_help.png?w=120&#038;h=150" alt="" width="120" height="150" /></a></p>
<p>Whichever method you use, you&#8217;ll be presented with the documentation in your packages window, which you can browse to work out what you need to do to use the package.</p>
<p><img class="alignnone size-thumbnail wp-image-450" title="package_docs" src="http://psychwire.files.wordpress.com/2011/07/package_docs.png?w=118&#038;h=150" alt="" width="118" height="150" /></p>
<h1>Which Packages should you Install?</h1>
<p>One of the daunting aspects of getting started with R is choosing <em>how </em>to use it, and <em>what packages</em> to install. I&#8217;ll cover some suggested packages in future guides, but for the eager, there&#8217;s a great list of popular packages that has been put up online by Matthew Dowle, and is available <a href="http://unknownr.r-forge.r-project.org/toppkgs.html">at this link</a>. The list is also part of his unknownR package, which is worth trying out if you are new. When learning R, I used that list to inspire me in terms of which packages I should learn.</p>
<p>You should also keep an eye on community sites such as <a href="http://www.r-bloggers.com/">R-Bloggers</a>, as you&#8217;ll often read about packages, as well as other tips and tricks, that you can use and learn from.</p>
<p>UPDATE: Thanks to <a href="http://www.r-statistics.com/">Tal Galili&#8217;s</a> comment, readers may also want to check out <a href="http://cran.r-project.org/web/views/">CRAN task views</a>, which has detailed info on a huge range of packages.</p>
<h1>Next Steps</h1>
<p>In the next guide, I&#8217;ll get into the interesting stuff: importing and manipulating data, and how doing so differs from SPSS/Excel.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psychwire.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psychwire.wordpress.com/440/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=440&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psychwire.wordpress.com/2011/07/17/migrating-from-spssexcel-to-r-part-2-working-with-packages/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:thumbnail url="http://psychwire.files.wordpress.com/2011/07/install_packages.png?w=150" />
		<media:content url="http://psychwire.files.wordpress.com/2011/07/install_packages.png?w=150" medium="image">
			<media:title type="html">install_packages</media:title>
		</media:content>

		<media:content url="http://0.gravatar.com/avatar/058d9b4b0da389096a4211c5b1a9296f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psychwire</media:title>
		</media:content>

		<media:content url="http://psychwire.files.wordpress.com/2011/07/packages.png?w=150" medium="image">
			<media:title type="html">packages</media:title>
		</media:content>

		<media:content url="http://psychwire.files.wordpress.com/2011/07/load_package.png?w=150" medium="image">
			<media:title type="html">load_package</media:title>
		</media:content>

		<media:content url="http://psychwire.files.wordpress.com/2011/07/package_help.png?w=120" medium="image">
			<media:title type="html">package_help</media:title>
		</media:content>

		<media:content url="http://psychwire.files.wordpress.com/2011/07/package_docs.png?w=118" medium="image">
			<media:title type="html">package_docs</media:title>
		</media:content>
	</item>
		<item>
		<title>Watching other People Watching other People &#8211; International Edition</title>
		<link>http://psychwire.wordpress.com/2011/07/17/watching-other-people-watching-other-people-international-edition/</link>
		<comments>http://psychwire.wordpress.com/2011/07/17/watching-other-people-watching-other-people-international-edition/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 09:07:00 +0000</pubDate>
		<dc:creator>Hayward Godwin</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://psychwire.wordpress.com/?p=459</guid>
		<description><![CDATA[Young David Corck-Adelman has been travelling the world lately after finishing his PhD, and sent on a photo as part &#8230;<p><a href="http://psychwire.wordpress.com/2011/07/17/watching-other-people-watching-other-people-international-edition/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=459&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Young <a href="http://www.southampton.ac.uk/psychology/postgraduate/research_students/dca106.page?">David Corck-Adelman</a> has been travelling the world lately after finishing his PhD, and sent on a photo as part of the <em><a href="http://psychwire.wordpress.com/2011/05/11/watching-other-people-watching-other-peopleevents/">Watching other People Watching other People </a></em>photograph series. This photo was taken in Hong Kong of all places. Thanks, Dave!</p>
<p>Click the image below to enlarge.</p>
<p><a href="http://psychwire.files.wordpress.com/2011/07/hk.png"><img class="alignnone size-thumbnail wp-image-460" title="hk" src="http://psychwire.files.wordpress.com/2011/07/hk.png?w=150&#038;h=112" alt="" width="150" height="112" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/psychwire.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/psychwire.wordpress.com/459/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=psychwire.wordpress.com&#038;blog=22990573&#038;post=459&#038;subd=psychwire&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://psychwire.wordpress.com/2011/07/17/watching-other-people-watching-other-people-international-edition/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/058d9b4b0da389096a4211c5b1a9296f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">psychwire</media:title>
		</media:content>

		<media:content url="http://psychwire.files.wordpress.com/2011/07/hk.png?w=150" medium="image">
			<media:title type="html">hk</media:title>
		</media:content>
	</item>
	</channel>
</rss>
