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

<channel>
	<title>Allen Day's Blog &#187; Mobile</title>
	<atom:link href="http://www.spicylogic.com/allenday/blog/category/mobile/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.spicylogic.com/allenday/blog</link>
	<description>♥data♥</description>
	<lastBuildDate>Mon, 21 Jun 2010 23:28:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Google/HTC Nexus One Unboxing</title>
		<link>http://www.spicylogic.com/allenday/blog/2010/01/15/googlehtc-nexus-one-unboxing/</link>
		<comments>http://www.spicylogic.com/allenday/blog/2010/01/15/googlehtc-nexus-one-unboxing/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 09:26:51 +0000</pubDate>
		<dc:creator>allenday</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.spicylogic.com/allenday/blog/2010/01/15/googlehtc-nexus-one-unboxing/</guid>
		<description><![CDATA[

]]></description>
			<content:encoded><![CDATA[<p><a class="image_link" title="P1000457" href="http://www.flickr.com/photos/allenday/4272763656/in/set-72157623204787854/"><img id="primary_photo_img" class="pc_img" src="http://farm3.static.flickr.com/2735/4272763656_db2320fdd1_m.jpg" border="0" alt="P1000457" width="180" height="240" /></a></p>
<p><a class="image_link" title="P1000441" href="http://www.flickr.com/photos/allenday/4272759774/in/set-72157623204787854/"><img class="pc_img" src="http://farm3.static.flickr.com/2783/4272759774_9cb415d140_s.jpg" border="0" alt="P1000441" width="75" height="75" /></a><a class="image_link" title="P1000442" href="http://www.flickr.com/photos/allenday/4272017657/in/set-72157623204787854/"><img class="pc_img" src="http://farm5.static.flickr.com/4018/4272017657_184b0a8d7d_s.jpg" border="0" alt="P1000442" width="75" height="75" /></a><a class="image_link" title="P1000443" href="http://www.flickr.com/photos/allenday/4272760332/in/set-72157623204787854/"><img class="pc_img" src="http://farm5.static.flickr.com/4063/4272760332_2dcc7f0f04_s.jpg" border="0" alt="P1000443" width="75" height="75" /></a><a class="image_link" title="P1000444" href="http://www.flickr.com/photos/allenday/4272018181/in/set-72157623204787854/"><img class="pc_img" src="http://farm5.static.flickr.com/4004/4272018181_3d7f324a9d_s.jpg" border="0" alt="P1000444" width="75" height="75" /></a><a class="image_link" title="P1000445" href="http://www.flickr.com/photos/allenday/4272760776/in/set-72157623204787854/"><img class="pc_img" src="http://farm3.static.flickr.com/2750/4272760776_2dfb13a90d_s.jpg" border="0" alt="P1000445" width="75" height="75" /></a><a class="image_link" title="P1000446" href="http://www.flickr.com/photos/allenday/4272018587/in/set-72157623204787854/"><img class="pc_img" src="http://farm5.static.flickr.com/4042/4272018587_e95f6d5682_s.jpg" border="0" alt="P1000446" width="75" height="75" /></a><a class="image_link" title="P1000447" href="http://www.flickr.com/photos/allenday/4272761272/in/set-72157623204787854/"><img class="pc_img" src="http://farm5.static.flickr.com/4065/4272761272_28007e0699_s.jpg" border="0" alt="P1000447" width="75" height="75" /></a><a class="image_link" title="P1000448" href="http://www.flickr.com/photos/allenday/4272761542/in/set-72157623204787854/"><img class="pc_img" src="http://farm3.static.flickr.com/2708/4272761542_5f1d400f77_s.jpg" border="0" alt="P1000448" width="75" height="75" /></a><a class="image_link" title="P1000449" href="http://www.flickr.com/photos/allenday/4272761770/in/set-72157623204787854/"><img class="pc_img" src="http://farm3.static.flickr.com/2695/4272761770_9cfe48716f_s.jpg" border="0" alt="P1000449" width="75" height="75" /></a><a class="image_link" title="P1000450" href="http://www.flickr.com/photos/allenday/4272761990/in/set-72157623204787854/"><img class="pc_img" src="http://farm3.static.flickr.com/2709/4272761990_7de6468ba4_s.jpg" border="0" alt="P1000450" width="75" height="75" /></a><a class="image_link" title="P1000451" href="http://www.flickr.com/photos/allenday/4272019775/in/set-72157623204787854/"><img class="pc_img" src="http://farm3.static.flickr.com/2714/4272019775_60ca1ee85b_s.jpg" border="0" alt="P1000451" width="75" height="75" /></a><a class="image_link" title="P1000452" href="http://www.flickr.com/photos/allenday/4272019997/in/set-72157623204787854/"><img class="pc_img" src="http://farm5.static.flickr.com/4052/4272019997_5df8e778b4_s.jpg" border="0" alt="P1000452" width="75" height="75" /></a><a class="image_link" title="P1000453" href="http://www.flickr.com/photos/allenday/4272762746/in/set-72157623204787854/"><img class="pc_img" src="http://farm5.static.flickr.com/4009/4272762746_1f041dc70f_s.jpg" border="0" alt="P1000453" width="75" height="75" /></a><a class="image_link" title="P1000454" href="http://www.flickr.com/photos/allenday/4272020533/in/set-72157623204787854/"><img class="pc_img" src="http://farm5.static.flickr.com/4060/4272020533_b8ff9e4618_s.jpg" border="0" alt="P1000454" width="75" height="75" /></a><a class="image_link" title="P1000455" href="http://www.flickr.com/photos/allenday/4272020741/in/set-72157623204787854/"><img class="pc_img" src="http://farm5.static.flickr.com/4052/4272020741_3c4ffc3cc6_s.jpg" border="0" alt="P1000455" width="75" height="75" /></a><a class="image_link" title="P1000456" href="http://www.flickr.com/photos/allenday/4272021009/in/set-72157623204787854/"><img class="pc_img" src="http://farm5.static.flickr.com/4027/4272021009_22b9a17e77_s.jpg" border="0" alt="P1000456" width="75" height="75" /></a><a class="image_link" title="P1000457" href="http://www.flickr.com/photos/allenday/4272763656/in/set-72157623204787854/"><img class="pc_img" src="http://farm3.static.flickr.com/2735/4272763656_db2320fdd1_s.jpg" border="0" alt="P1000457" width="75" height="75" /></a><a class="image_link" title="P1000458" href="http://www.flickr.com/photos/allenday/4272763880/in/set-72157623204787854/"><img class="pc_img" src="http://farm5.static.flickr.com/4057/4272763880_8c8b6bd290_s.jpg" border="0" alt="P1000458" width="75" height="75" /></a><a class="image_link" title="P1000459" href="http://www.flickr.com/photos/allenday/4272021759/in/set-72157623204787854/"><img class="pc_img" src="http://farm5.static.flickr.com/4064/4272021759_cbcf8e279b_s.jpg" border="0" alt="P1000459" width="75" height="75" /></a><a class="image_link" title="P1000460" href="http://www.flickr.com/photos/allenday/4272021993/in/set-72157623204787854/"><img class="pc_img" src="http://farm5.static.flickr.com/4064/4272021993_ec53985d95_s.jpg" border="0" alt="P1000460" width="75" height="75" /></a><a class="image_link" title="P1000461" href="http://www.flickr.com/photos/allenday/4272764658/in/set-72157623204787854/"><img class="pc_img" src="http://farm5.static.flickr.com/4029/4272764658_049b6d195c_s.jpg" border="0" alt="P1000461" width="75" height="75" /></a><a class="image_link" title="P1000464" href="http://www.flickr.com/photos/allenday/4272764868/in/set-72157623204787854/"><img class="pc_img" src="http://farm3.static.flickr.com/2796/4272764868_2060806d69_s.jpg" border="0" alt="P1000464" width="75" height="75" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spicylogic.com/allenday/blog/2010/01/15/googlehtc-nexus-one-unboxing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Android G1 APN Settings for AT&amp;T / Cingular, First Impressions</title>
		<link>http://www.spicylogic.com/allenday/blog/2008/12/31/google-android-g1-apn-settings-for-att-cingular-first-impressions/</link>
		<comments>http://www.spicylogic.com/allenday/blog/2008/12/31/google-android-g1-apn-settings-for-att-cingular-first-impressions/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 20:55:35 +0000</pubDate>
		<dc:creator>allenday</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.spicylogic.com/allenday/blog/2008/12/31/google-android-g1-apn-settings-for-att-cingular-first-impressions/</guid>
		<description><![CDATA[I got an unlocked T-Mobile G1 today.  Woo.  There is a bunch of mis-information out there on blogs and forum about how to get the phone set up.  Here&#8217;s the real deal, I found these settings on Piaw&#8217;s Blog.

Name: whatever_you_want_the_name_to_be
APN: wap.cingular
Username: wap@cingulargprs.com
Password: cingular1
MMSC: http://mmsc.cingular.com
MMS Proxy: wireless.cingular.com
MMS port: 80
MCC: 310
MNC: 410

Now, on to [...]]]></description>
			<content:encoded><![CDATA[<p>I got an unlocked T-Mobile G1 today.  Woo.  There is a bunch of mis-information out there on blogs and forum about how to get the phone set up.  Here&#8217;s the real deal, I found these settings on <a href="http://piaw.blogspot.com/2008/12/cheapskate-guide-to-getting-g1-running.html">Piaw&#8217;s Blog</a>.</p>
<pre>
Name: whatever_you_want_the_name_to_be
APN: wap.cingular
Username: wap@cingulargprs.com
Password: cingular1
MMSC: http://mmsc.cingular.com
MMS Proxy: wireless.cingular.com
MMS port: 80
MCC: 310
MNC: 410
</pre>
<p>Now, on to my first impressions of the phone.</p>
<p>Works:</p>
<ul>
<li>Calling works.</li>
<li>Google contact import works.</li>
<li>Google Chat works.</li>
<li>EDGE data works.</li>
<li>WiFi data works.</li>
<li>Keyboard works.  It rocks</li>
</ul>
<p>Doesn&#8217;t work:</p>
<ul>
<li>AOL Chat does not work.  Complains it can&#8217;t read my mobile number from my SIM card.</li>
<li>3G data does not work.  I read that the phone doesn&#8217;t support the 3G band used by AT&#038;T.</li>
</ul>
<p>Works, but not well:</p>
<ul>
<li>The browser works, but it sucks compared to the iPhone.  Feels very slow.  I was expecting a lot more given that it&#8217;s using MobileSafari/WebKit.</li>
<li>Video download/playback works.  The player was branded with the YouTube logo, so I&#8217;m guessing it only supports YouTube out of the box.</li>
<li>The UI feels clunky at first.  Sort of feels like Nokia S60, too many menus and inconsistency in how different tasks are done</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.spicylogic.com/allenday/blog/2008/12/31/google-android-g1-apn-settings-for-att-cingular-first-impressions/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>iPhone 2.0 User-Agent string, other iPhone/iPod data</title>
		<link>http://www.spicylogic.com/allenday/blog/2008/07/04/iphone-20-user-agent-string-other-iphoneipod-data/</link>
		<comments>http://www.spicylogic.com/allenday/blog/2008/07/04/iphone-20-user-agent-string-other-iphoneipod-data/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 01:53:10 +0000</pubDate>
		<dc:creator>allenday</dc:creator>
				<category><![CDATA[Informatics]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.spicylogic.com/allenday/blog/?p=39</guid>
		<description><![CDATA[I was preparing a report on iPhone locales from some web server logs, and noticed a few oddities.  Some of the hits appear to be coming from the new 3G iPhone 2.0, check out the User-Agent strings:

# observed from 1 metrocast.net (NY) IP
Mozilla/5.0 &#40;iPod; U; iPhone OS 2_0 like Mac OS X; en-us&#41; AppleWebKit/525.17 [...]]]></description>
			<content:encoded><![CDATA[<p>I was preparing a report on iPhone locales from some web server logs, and noticed a few oddities.  Some of the hits appear to be coming from the new 3G iPhone 2.0, check out the User-Agent strings:</p>

<div class="wp_syntax"><div class="code"><pre class="bash"><span style="color: #808080; font-style: italic;"># observed from 1 metrocast.net (NY) IP</span>
Mozilla<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5.0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>iPod; U; iPhone OS 2_0 like Mac OS X; en-us<span style="color: #7a0874; font-weight: bold;">&#41;</span> AppleWebKit<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">525.17</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>KHTML, like Gecko<span style="color: #7a0874; font-weight: bold;">&#41;</span> Version<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3.1</span> Mobile<span style="color: #000000; font-weight: bold;">/</span>5A240d Safari<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5525.7</span>
<span style="color: #808080; font-style: italic;"># observed from 1 optonline.net (NY) IP</span>
Mozilla<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5.0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>iPhone Simulator; U; CPU iPhone OS 2_0 like Mac OS X; en-us<span style="color: #7a0874; font-weight: bold;">&#41;</span> AppleWebKit<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">525.18</span><span style="color: #000000;">.1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>KHTML, like Gecko<span style="color: #7a0874; font-weight: bold;">&#41;</span> Version<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3.1</span><span style="color: #000000;">.1</span> Mobile<span style="color: #000000; font-weight: bold;">/</span>5A345 Safari<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">525.20</span></pre></div></div>

<p>The former is confirmed to be an <a href="http://forums.macrumors.com/showthread.php?t=471274">iPhone 2.0 User-Agent string</a> on the MacRumors Forums.</p>
<p>Other unusual/rare iPhone/iPod User-Agent/UA strings:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">Mozilla<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5.0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>iPhone; U; CPU like Mac OS X; en<span style="color: #7a0874; font-weight: bold;">&#41;</span> AppleWebKit<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">420.1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>KHTML, like Gecko<span style="color: #7a0874; font-weight: bold;">&#41;</span> Version<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3.0</span> Mobile<span style="color: #000000; font-weight: bold;">/</span>4A102 Safari<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">419</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>United States<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Mozilla<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5.0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>Windows; U; Windows NT <span style="color: #000000;">5.1</span>; en-US; rv:<span style="color: #000000;">1.9</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Gecko<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2008052906</span> Mozilla<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5.0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>iPhone; U; CPU like Mac OS X; en<span style="color: #7a0874; font-weight: bold;">&#41;</span> AppleWebKit<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">420</span>+ <span style="color: #7a0874; font-weight: bold;">&#40;</span>KHTML, like Gecko<span style="color: #7a0874; font-weight: bold;">&#41;</span> Version<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3.0</span> Mobile<span style="color: #000000; font-weight: bold;">/</span>1A543 Safari<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">419.3</span>
Mozilla<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5.0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>iPhone; U; CPU like Mac OS X; en<span style="color: #7a0874; font-weight: bold;">&#41;</span> AppleWebKit<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">420.1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>KHTML, like Gecko<span style="color: #7a0874; font-weight: bold;">&#41;</span> Cydia<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.0</span><span style="color: #000000;">.2460</span><span style="color: #000000;">-59</span></pre></div></div>

<p><b>Update July 11</b>.  iPhone 2.0 is out, and the UA is (note the Safari revision increment from the earlier pre-launch UA):</p>

<div class="wp_syntax"><div class="code"><pre class="bash">Mozilla<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5.0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>iPhone; U; CPU iPhone OS 2_0 like Mac OS X; en-us<span style="color: #7a0874; font-weight: bold;">&#41;</span> AppleWebKit<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">525.18</span><span style="color: #000000;">.1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>KHTML, like Gecko<span style="color: #7a0874; font-weight: bold;">&#41;</span> Version<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3.1</span><span style="color: #000000;">.1</span> Mobile<span style="color: #000000; font-weight: bold;">/</span>5A345 Safari<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">525.20</span></pre></div></div>

<p>While the iPod with iPhone 2.0 software update UA is:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">Mozilla<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5.0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>iPod; U; CPU iPhone OS 2_0 like Mac OS X; en-us<span style="color: #7a0874; font-weight: bold;">&#41;</span> AppleWebKit<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">525.18</span><span style="color: #000000;">.1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>KHTML, like Gecko<span style="color: #7a0874; font-weight: bold;">&#41;</span> Version<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3.1</span><span style="color: #000000;">.1</span> Mobile<span style="color: #000000; font-weight: bold;">/</span>5A347 Safari<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">525.20</span></pre></div></div>

<p>Note that both the upgraded iPod and the iPhone UAs both contain the string &#8220;iPhone&#8221; in them, so you may need to update your device-detection logic if you care about discriminating between iPods and iPhones.  Not yet clear to me how to discriminate between an upgraded iPhone 1.0 w/ 2.0 software, and a bona fide 3G iPhone 2.0.  Will post more when I figure this out.</p>
<p>Know anything else about these?  Leave me a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spicylogic.com/allenday/blog/2008/07/04/iphone-20-user-agent-string-other-iphoneipod-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>new R package: getopt</title>
		<link>http://www.spicylogic.com/allenday/blog/2008/04/12/new-r-package-getopt/</link>
		<comments>http://www.spicylogic.com/allenday/blog/2008/04/12/new-r-package-getopt/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 08:13:31 +0000</pubDate>
		<dc:creator>allenday</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.spicylogic.com/allenday/blog/?p=6</guid>
		<description><![CDATA[I just uploaded the getopt package to CRAN.  This will make it easy to use command line options with Rscript #! &#8220;shebang&#8221; scripts.  It&#8217;s pretty much like what is available in every other programming language (getopt.h in C, Getopt::Long in Perl), but oddly was not yet available for R.  So I wrote [...]]]></description>
			<content:encoded><![CDATA[<p>I just uploaded the <a href="http://cran.r-project.org/web/packages/getopt"><code>getopt</code></a> package to <a href="http://cran.r-project.org/">CRAN</a>.  This will make it easy to use command line options with <code>Rscript</code> <code>#!</code> &#8220;shebang&#8221; scripts.  It&#8217;s pretty much like what is available in every other programming language (<a href="http://www.gnu.org/software/libtool/manual/libc/Getopt.html">getopt</a>.h in C, <a href="http://perldoc.perl.org/Getopt/Long.html">Getopt::Long</a> in Perl), but oddly was not yet available for R.  So I wrote it! <img src='http://www.spicylogic.com/allenday/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Example usage, to print a sampling of a random normal variable, you might make a script named <code>./rnorm</code> that contains:</p>

<div class="wp_syntax"><div class="code"><pre class="c"><span style="color: #339933;">#!/usr/bin/Rscript</span>
library<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'getopt'</span><span style="color: #66cc66;">&#41;</span>;
opt <span style="color: #66cc66;">=</span> getopt<span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">&#40;</span>
<span style="color: #ff0000;">'verbose'</span>, <span style="color: #ff0000;">'v'</span>, <span style="color: #cc66cc;">2</span>, <span style="color: #ff0000;">&quot;integer&quot;</span>,
<span style="color: #ff0000;">'help'</span>   , <span style="color: #ff0000;">'h'</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #ff0000;">&quot;logical&quot;</span>,
<span style="color: #ff0000;">'count'</span>  , <span style="color: #ff0000;">'c'</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #ff0000;">&quot;integer&quot;</span>,
<span style="color: #ff0000;">'mean'</span>   , <span style="color: #ff0000;">'m'</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #ff0000;">&quot;double&quot;</span>,
<span style="color: #ff0000;">'sd'</span>     , <span style="color: #ff0000;">'s'</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #ff0000;">&quot;double&quot;</span>
<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">!</span>is.<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#40;</span>opt$help<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
self <span style="color: #66cc66;">=</span> commandArgs<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>;
cat<span style="color: #66cc66;">&#40;</span>paste<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Usage: &quot;</span>,self,<span style="color: #ff0000;">&quot; [-[gh]] [-[-mean|m] &lt;mean&gt;] [-[-sd|s] &lt;sd&gt;] [-[-count|c] &lt;count&gt;]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>,sep<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
q<span style="color: #66cc66;">&#40;</span>status<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> is.<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#40;</span>opt$mean    <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> opt$mean    <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span>     <span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> is.<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#40;</span>opt$sd      <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> opt$sd      <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span>     <span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> is.<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#40;</span>opt$count   <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> opt$count   <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">10</span>    <span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> is.<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#40;</span>opt$verbose <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> opt$verbose <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">FALSE</span> <span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> opt$verbose <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> write<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;writing...&quot;</span>,stderr<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span>
cat<span style="color: #66cc66;">&#40;</span>paste<span style="color: #66cc66;">&#40;</span>rnorm<span style="color: #66cc66;">&#40;</span>opt$count,mean<span style="color: #66cc66;">=</span>opt$mean,sd<span style="color: #66cc66;">=</span>opt$sd<span style="color: #66cc66;">&#41;</span>,collapse<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
cat<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;
q<span style="color: #66cc66;">&#40;</span>status<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>and can be called, e.g., like:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">blink:<span style="color: #000000; font-weight: bold;">/</span>tmp allenday$ .<span style="color: #000000; font-weight: bold;">/</span>rnorm  -s <span style="color: #000000;">10</span> -c <span style="color: #000000;">10</span> --<span style="color: #007800;">mean=</span><span style="color: #000000;">100</span> --<span style="color: #007800;">verbose=</span><span style="color: #000000;">2</span>
writing...
<span style="color: #000000;">80.2953014070924</span>
<span style="color: #000000;">109.36715703278</span>
<span style="color: #000000;">104.856588724070</span>
<span style="color: #000000;">97.7983406914681</span>
<span style="color: #000000;">102.163515767212</span>
<span style="color: #000000;">90.7613417541473</span>
<span style="color: #000000;">97.8344921793064</span>
<span style="color: #000000;">108.918662445162</span>
<span style="color: #000000;">100.725143995218</span>
<span style="color: #000000;">105.285435884127</span>
blink:<span style="color: #000000; font-weight: bold;">/</span>tmp allenday$</pre></div></div>

<p>Yay!  It&#8217;s a trivial example, but this can get pretty powerful once you can start passing in data files, reading from pipes, etc.  I have some more example code for doing that, but it&#8217;s not getopt related so I need to dig it up.</p>
<p><span style="text-decoration: line-through;">Ok, I seriously need to get a syntax highlighter installed on this blog.  Anyone have a recommendation?  Isn&#8217;t there an enscript plugin for wordpress?</span></p>
<p>Update: I installed <a href="http://wordpress.org/extend/plugins/wp-syntax/">wp-syntax</a>.  There is no R support, but the C highlighter seems to work okay&#8230; wonder what it will do if I start doing the funky &lt;- left arrow assign syntax&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spicylogic.com/allenday/blog/2008/04/12/new-r-package-getopt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving the blog, more on streaming to the iPhone/iPod</title>
		<link>http://www.spicylogic.com/allenday/blog/2008/04/02/moving-the-blog/</link>
		<comments>http://www.spicylogic.com/allenday/blog/2008/04/02/moving-the-blog/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 10:47:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.spicylogic.com/allenday/blog/?p=5</guid>
		<description><![CDATA[Moving things over here from over there.  The blog is not well-established so I doubt anyone will care, and this URL structure lets us bring Jordan onto the primary domain.
If I don&#8217;t get around to migrating the only useful post on the old blog, check it out, I managed to trick the iPhone to [...]]]></description>
			<content:encoded><![CDATA[<p>Moving things over here from <a href="http://blog.spicylogic.com/">over there</a>.  The blog is not well-established so I doubt anyone will care, and this URL structure lets us bring <a href="http://jordan.spicylogic.com/">Jordan</a> onto the primary domain.</p>
<p>If I don&#8217;t get around to migrating the only useful post on the old blog, check it out, I managed to trick the <a href="/allenday/blog/2008/02/08/streaming-audio-to-iphone-itouch/">iPhone to play internet radio</a>.  Yes, that means live broadcasts.  iPhone can stream live video too, but I&#8217;m not ready to show it off just yet.  I suspect this technique has some legs &#8212; Apple wouldn&#8217;t want to let their <a href="http://www.apple.com/itunes/overview/">cash cow</a> loose anytime soon, would they?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spicylogic.com/allenday/blog/2008/04/02/moving-the-blog/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Streaming Audio to iPhone &amp; iTouch</title>
		<link>http://www.spicylogic.com/allenday/blog/2008/02/08/streaming-audio-to-iphone-itouch/</link>
		<comments>http://www.spicylogic.com/allenday/blog/2008/02/08/streaming-audio-to-iphone-itouch/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 12:07:59 +0000</pubDate>
		<dc:creator>allenday</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ipod iphone apple streaming audio video icecast mp3 aac]]></category>

		<guid isPermaLink="false">http://blog.spicylogic.com/?p=4</guid>
		<description><![CDATA[
I&#8217;m going to refer to the iPod Touch as the iTouch when I write, it&#8217;s easier.
Anyway, I bought an iTouch earlier today, or rather TinyTube bought one b/c there are a lot of Apple mobile user-agents showing up over there.  We want to be able to test for the Apple devices, but there are [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" style="width: 250px;" src="http://blogs.magnatune.com/buckman/iphone2.jpg" alt="iphone playing mp3" /><br />
I&#8217;m going to refer to the iPod Touch as the iTouch when I write, it&#8217;s easier.</p>
<p>Anyway, I bought an iTouch earlier today, or rather <a href="http://blog.tinytube.net">TinyTube</a> bought one b/c there are a lot of Apple mobile user-agents showing up over there.  We want to be able to test for the Apple devices, but there are <a href="http://www.marketcircle.com/iphoney/">no good iPhone emulator</a>s available that I&#8217;m aware of.</p>
<p>I figured out earlier how to stream video to the iPhone, and it turns out that the iTouch works the same way.  Easy.  Basically it uses the Range: HTTP header to buffer chunks of the file for playback.  It&#8217;s progressive streaming the video.  Audio files work the same way.  I&#8217;ve been able to get this to work with MP3 files, but not (yet) AAC files.  Great, so we can stream audio files off our server to the iTouch.</p>
<p>But what about MP3 net radio, does it work?  Nope.  I tried surfing over to <a href="http://shoutcast.com">Shoutcast</a> on the iTouch and using the .pls files there to stream.  No go.  Looks like the iTouch doesn&#8217;t understand how to parse .pls or .m3u files.  I then tried ripping an <a href="http://www.icecast.org">Icecast</a> URL directly out of a .pls file.  Again, no go.  Looks like the iTouch doesn&#8217;t understand Icecast protocol either.</p>
<p>Hmm&#8230; but it is able to stream static audio files okay.  So, is there a way to trick iTouch into treating the Icecast stream as a static file?  Of course the answer is yes, and my next technical post will cover some of the details on how to make it happen.</p>
<p>For now you can just listen to the result, it&#8217;s serving up the &#8220;Groove Salad&#8221; station I found on Shoutcast.   Hit this on your thing: <a href="http://sparkle.wooly.org/cgi-bin/iStream">http://sparkle.wooly.org/cgi-bin/iStream</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spicylogic.com/allenday/blog/2008/02/08/streaming-audio-to-iphone-itouch/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
<enclosure url="http://sparkle.wooly.org/cgi-bin/iStream" length="99999999" type="audio/mpeg" />
<enclosure url="http://sparkle.wooly.org/cgi-bin/iStream" length="99999999" type="audio/mpeg" />
<enclosure url="http://sparkle.wooly.org/cgi-bin/iStream" length="99999999" type="audio/mpeg" />
<enclosure url="http://sparkle.wooly.org/cgi-bin/iStream" length="99999999" type="audio/mpeg" />
		</item>
	</channel>
</rss>
