<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"	>
<channel>
	<title>Comments for AnthroSpace</title>
	<atom:link href="http://www.stanford.edu/~cengel/cgi-bin/anthrospace/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://www.stanford.edu/~cengel/cgi-bin/anthrospace</link>
	<description>www.stanford.edu/~cengel/blog</description>
	<lastBuildDate>Mon, 02 Nov 2009 23:20:40 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Scraping New York Times Articles with R by Matthew Bascom</title>
		<link>http://www.stanford.edu/~cengel/cgi-bin/anthrospace/scraping-new-york-times-articles-with-r/comment-page-1#comment-11857</link>
		<dc:creator>Matthew Bascom</dc:creator>
		<pubDate>Mon, 02 Nov 2009 23:20:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.stanford.edu/~cengel/cgi-bin/anthrospace/?p=687#comment-11857</guid>
		<description>Thank you, Claudia!  I&#039;ll take a look at axis and the new RNYTimes packages.  

Best regards,

Matt Bascom</description>
		<content:encoded><![CDATA[<p>Thank you, Claudia!  I&#8217;ll take a look at axis and the new RNYTimes packages.  </p>
<p>Best regards,</p>
<p>Matt Bascom</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Scraping New York Times Articles with R by Claudia Engel</title>
		<link>http://www.stanford.edu/~cengel/cgi-bin/anthrospace/scraping-new-york-times-articles-with-r/comment-page-1#comment-11855</link>
		<dc:creator>Claudia Engel</dc:creator>
		<pubDate>Fri, 30 Oct 2009 14:39:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.stanford.edu/~cengel/cgi-bin/anthrospace/?p=687#comment-11855</guid>
		<description>Matt,

I don&#039;t have much experience on the Windows OS -- &lt;strong&gt;*maybe*&lt;/strong&gt; RJSONIO is not compiled for 2.10 yet?? But this is really just a wild guess.

See &lt;a href=&quot;http://www.omegahat.org/RJSONIO/ &quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; for difference between rjson and RJSONIO.

If you want to play with the tick marks layout you could take look at &lt;code&gt;axis&lt;/code&gt;.

Claudia</description>
		<content:encoded><![CDATA[<p>Matt,</p>
<p>I don&#8217;t have much experience on the Windows OS &#8212; <strong>*maybe*</strong> RJSONIO is not compiled for 2.10 yet?? But this is really just a wild guess.</p>
<p>See <a href="http://www.omegahat.org/RJSONIO/ " onclick="javascript:pageTracker._trackPageview('/outbound/comment/www.omegahat.org');" rel="nofollow">here</a> for difference between rjson and RJSONIO.</p>
<p>If you want to play with the tick marks layout you could take look at <code>axis</code>.</p>
<p>Claudia</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Scraping New York Times Articles with R by Claudia Engel</title>
		<link>http://www.stanford.edu/~cengel/cgi-bin/anthrospace/scraping-new-york-times-articles-with-r/comment-page-1#comment-11853</link>
		<dc:creator>Claudia Engel</dc:creator>
		<pubDate>Fri, 30 Oct 2009 14:34:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.stanford.edu/~cengel/cgi-bin/anthrospace/?p=687#comment-11853</guid>
		<description>Duncan Lang recently released a 0.1 version of a package called &lt;a href=&quot;http://www.omegahat.org/RNYTimes/&quot; rel=&quot;nofollow&quot;&gt;RNYTimes&lt;/a&gt;. It still lacks much documentation and I have not tried it, but it may make things easier.</description>
		<content:encoded><![CDATA[<p>Duncan Lang recently released a 0.1 version of a package called <a href="http://www.omegahat.org/RNYTimes/" onclick="javascript:pageTracker._trackPageview('/outbound/comment/www.omegahat.org');" rel="nofollow">RNYTimes</a>. It still lacks much documentation and I have not tried it, but it may make things easier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Scraping New York Times Articles with R by Matthew Bascom</title>
		<link>http://www.stanford.edu/~cengel/cgi-bin/anthrospace/scraping-new-york-times-articles-with-r/comment-page-1#comment-11851</link>
		<dc:creator>Matthew Bascom</dc:creator>
		<pubDate>Fri, 30 Oct 2009 01:24:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.stanford.edu/~cengel/cgi-bin/anthrospace/?p=687#comment-11851</guid>
		<description>Hi Claudia,

Thank you for the interesting code.  I tried unpacked the RJSONIO file folder into ..\R\win-library\2.10 but I get the following error:

Loading required package: RJSONIO
Error in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  : 
&#039;RJSONIO&#039; is not a valid installed packag

Any thought on why it&#039;s not working?  The code works using the rjson package.  What functionality is lost by not using RJSONIO?  Also, how can we change the chart axis tick marks to highlight the dates returned by the API?

Thank you!!

Matt</description>
		<content:encoded><![CDATA[<p>Hi Claudia,</p>
<p>Thank you for the interesting code.  I tried unpacked the RJSONIO file folder into ..\R\win-library\2.10 but I get the following error:</p>
<p>Loading required package: RJSONIO<br />
Error in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :<br />
&#8216;RJSONIO&#8217; is not a valid installed packag</p>
<p>Any thought on why it&#8217;s not working?  The code works using the rjson package.  What functionality is lost by not using RJSONIO?  Also, how can we change the chart axis tick marks to highlight the dates returned by the API?</p>
<p>Thank you!!</p>
<p>Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Scraping New York Times Articles with R by Claudia Engel</title>
		<link>http://www.stanford.edu/~cengel/cgi-bin/anthrospace/scraping-new-york-times-articles-with-r/comment-page-1#comment-11843</link>
		<dc:creator>Claudia Engel</dc:creator>
		<pubDate>Wed, 14 Oct 2009 20:09:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.stanford.edu/~cengel/cgi-bin/anthrospace/?p=687#comment-11843</guid>
		<description>Ricardo Pietrobon &lt;a href=&quot;http://twitter.com/rpietro/statuses/4614042873&quot; rel=&quot;nofollow&quot;&gt;suggested to try the above&lt;/a&gt; on &lt;a href=&quot;http://www.ncbi.nlm.nih.gov/pubmed/&quot; rel=&quot;nofollow&quot;&gt;Pubmed&lt;/a&gt;. Here is roughly how it might go.

Pubmed has an API, provided by NCBI. Details are &lt;a href=&quot;http://www.ncbi.nlm.nih.gov/bookshelf/br.fcgi?book=coursework&amp;part=eutils&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.  So all we&#039;d need to do is concatenate the appropriate URL string then parse the results in R. Results are in xml, so we&#039;d need the XML library.

To map keywords by publication date (like in the NYT example) we need to submit two different queries:

1. For the first query we use the &lt;strong&gt;esearch&lt;/strong&gt; utility to retrieve two important variables, &lt;em&gt;WebEnv&lt;/em&gt; and &lt;em&gt;QueryKey&lt;/em&gt;.
For the search term &quot;h1n1&quot; the URL needs to look like:
http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&amp;retmax=0&amp;term=h1n1&amp;usehistory=y

&lt;code&gt;#Read in:
raw.data &lt;- readLines(&quot;http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&amp;retmax=0&amp;term=h1n1&amp;usehistory=y&quot;)
&lt;/code&gt;
&lt;code&gt;# Parse the result for WebEnv and QueryKey:
library(XML)
parsed.data &lt;- xmlTreeParse(raw.data)
xmlValue(xmlChildren(xmlRoot(parsed.data))$QueryKey)
xmlValue(xmlChildren(xmlRoot(parsed.data))$WebEnv)
&lt;/code&gt;

2. For the second query we use the &lt;strong&gt;esummary&lt;/strong&gt; utility to retrieve the actual records. So the URL, using &lt;em&gt;WebEnv&lt;/em&gt; and &lt;em&gt;QueryKey&lt;/em&gt;, from the previous query looks in my example looks like:
http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&amp;retmode=xml&amp;query_key=1&amp;WebEnv=NCID_1_51824642_130.14.18.46_9001_1255542890

Now parse the result for PubDate.

For an example in php see &lt;a href=&quot;http://hublog.hubmed.org/archives/001518.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;

I will make this a separate post once I get time to write out the details. Or maybe someone else will.</description>
		<content:encoded><![CDATA[<p>Ricardo Pietrobon <a href="http://twitter.com/rpietro/statuses/4614042873" onclick="javascript:pageTracker._trackPageview('/outbound/comment/twitter.com');" rel="nofollow">suggested to try the above</a> on <a href="http://www.ncbi.nlm.nih.gov/pubmed/" onclick="javascript:pageTracker._trackPageview('/outbound/comment/www.ncbi.nlm.nih.gov');" rel="nofollow">Pubmed</a>. Here is roughly how it might go.</p>
<p>Pubmed has an API, provided by NCBI. Details are <a href="http://www.ncbi.nlm.nih.gov/bookshelf/br.fcgi?book=coursework&#038;part=eutils" onclick="javascript:pageTracker._trackPageview('/outbound/comment/www.ncbi.nlm.nih.gov');" rel="nofollow">here</a>.  So all we&#8217;d need to do is concatenate the appropriate URL string then parse the results in R. Results are in xml, so we&#8217;d need the XML library.</p>
<p>To map keywords by publication date (like in the NYT example) we need to submit two different queries:</p>
<p>1. For the first query we use the <strong>esearch</strong> utility to retrieve two important variables, <em>WebEnv</em> and <em>QueryKey</em>.<br />
For the search term &#8220;h1n1&#8243; the URL needs to look like:<br />
<a href="http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&#038;retmax=0&#038;term=h1n1&#038;usehistory=y" onclick="javascript:pageTracker._trackPageview('/outbound/comment/eutils.ncbi.nlm.nih.gov');" rel="nofollow">http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&#038;retmax=0&#038;term=h1n1&#038;usehistory=y</a></p>
<p><code>#Read in:<br />
raw.data < - readLines("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&#038;retmax=0&#038;term=h1n1&#038;usehistory=y")<br />
</code><br />
</code><code># Parse the result for WebEnv and QueryKey:<br />
library(XML)<br />
parsed.data < - xmlTreeParse(raw.data)<br />
xmlValue(xmlChildren(xmlRoot(parsed.data))$QueryKey)<br />
xmlValue(xmlChildren(xmlRoot(parsed.data))$WebEnv)<br />
</code></p>
<p>2. For the second query we use the <strong>esummary</strong> utility to retrieve the actual records. So the URL, using <em>WebEnv</em> and <em>QueryKey</em>, from the previous query looks in my example looks like:<br />
<a href="http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&#038;retmode=xml&#038;query_key=1&#038;WebEnv=NCID_1_51824642_130.14.18.46_9001_1255542890" onclick="javascript:pageTracker._trackPageview('/outbound/comment/eutils.ncbi.nlm.nih.gov');" rel="nofollow">http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&#038;retmode=xml&#038;query_key=1&#038;WebEnv=NCID_1_51824642_130.14.18.46_9001_1255542890</a></p>
<p>Now parse the result for PubDate.</p>
<p>For an example in php see <a href="http://hublog.hubmed.org/archives/001518.html" onclick="javascript:pageTracker._trackPageview('/outbound/comment/hublog.hubmed.org');" rel="nofollow">here</a></p>
<p>I will make this a separate post once I get time to write out the details. Or maybe someone else will.</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on R on Xgrid via Gridstuffer by Koen Hufkens</title>
		<link>http://www.stanford.edu/~cengel/cgi-bin/anthrospace/r-on-xgrid-via-gridstu%ef%ac%80er/comment-page-1#comment-11837</link>
		<dc:creator>Koen Hufkens</dc:creator>
		<pubDate>Thu, 01 Oct 2009 21:27:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.stanford.edu/~cengel/cgi-bin/anthrospace/?p=623#comment-11837</guid>
		<description>Hi,

thanks for the tutorial! It solved some issues I had with running a model on Xgrid with external input files.

Nice site btw. hope to see some more code snippets soon.

Cheers,
Koen</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>thanks for the tutorial! It solved some issues I had with running a model on Xgrid with external input files.</p>
<p>Nice site btw. hope to see some more code snippets soon.</p>
<p>Cheers,<br />
Koen</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Scraping New York Times Articles with R by Claudia Engel</title>
		<link>http://www.stanford.edu/~cengel/cgi-bin/anthrospace/scraping-new-york-times-articles-with-r/comment-page-1#comment-11835</link>
		<dc:creator>Claudia Engel</dc:creator>
		<pubDate>Sat, 26 Sep 2009 15:28:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.stanford.edu/~cengel/cgi-bin/anthrospace/?p=687#comment-11835</guid>
		<description>Thanks for letting me know about that typo on line 23 -- fixed now.

Right now the way it works is not very intuitive, but if you switch to PLAIN TEXT (top of the box where the code is displayed) you get the original code without the line numbers. (Yes, I need to find some time to get a better plugin for displaying code and fix up a few other things also.)

I am afraid I don&#039;t know any details about their request throttling.</description>
		<content:encoded><![CDATA[<p>Thanks for letting me know about that typo on line 23 &#8212; fixed now.</p>
<p>Right now the way it works is not very intuitive, but if you switch to PLAIN TEXT (top of the box where the code is displayed) you get the original code without the line numbers. (Yes, I need to find some time to get a better plugin for displaying code and fix up a few other things also.)</p>
<p>I am afraid I don&#8217;t know any details about their request throttling.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Scraping New York Times Articles with R by neil kodner</title>
		<link>http://www.stanford.edu/~cengel/cgi-bin/anthrospace/scraping-new-york-times-articles-with-r/comment-page-1#comment-11829</link>
		<dc:creator>neil kodner</dc:creator>
		<pubDate>Fri, 25 Sep 2009 12:22:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.stanford.edu/~cengel/cgi-bin/anthrospace/?p=687#comment-11829</guid>
		<description>Terrific tutorial, but a few comments/questions:
Would you provide the source as a downloadable link?  When copying/pasting from your example, the line numbers were included.  There are also better blog plugins for displaying source code.

To get your example to run, I had to remove &quot;amp;&quot; from line 23.  That wasn&#039;t present on line 15.

Is request throttling handled automatically by NYT?  I ask because I thought I read somewhere that NYT submissions are limited to 2/sec.</description>
		<content:encoded><![CDATA[<p>Terrific tutorial, but a few comments/questions:<br />
Would you provide the source as a downloadable link?  When copying/pasting from your example, the line numbers were included.  There are also better blog plugins for displaying source code.</p>
<p>To get your example to run, I had to remove &#8220;amp;&#8221; from line 23.  That wasn&#8217;t present on line 15.</p>
<p>Is request throttling handled automatically by NYT?  I ask because I thought I read somewhere that NYT submissions are limited to 2/sec.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Quickly retrieve elevation from lat/long by Claudia Engel</title>
		<link>http://www.stanford.edu/~cengel/cgi-bin/anthrospace/quickly-retrieve-levation-from-latlong/comment-page-1#comment-11753</link>
		<dc:creator>Claudia Engel</dc:creator>
		<pubDate>Mon, 01 Jun 2009 20:47:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.stanford.edu/~cengel/cgi-bin/anthrospace/quickly-retrieve-levation-from-latlong#comment-11753</guid>
		<description>For vertical data transformation you may want to check this out: http://vdatum.noaa.gov/</description>
		<content:encoded><![CDATA[<p>For vertical data transformation you may want to check this out: <a href="http://vdatum.noaa.gov/" onclick="javascript:pageTracker._trackPageview('/outbound/comment/vdatum.noaa.gov');" rel="nofollow">http://vdatum.noaa.gov/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Quickly retrieve elevation from lat/long by amartya</title>
		<link>http://www.stanford.edu/~cengel/cgi-bin/anthrospace/quickly-retrieve-levation-from-latlong/comment-page-1#comment-11751</link>
		<dc:creator>amartya</dc:creator>
		<pubDate>Mon, 01 Jun 2009 20:21:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.stanford.edu/~cengel/cgi-bin/anthrospace/quickly-retrieve-levation-from-latlong#comment-11751</guid>
		<description>How can one convert an elevation value thats with respect to &#039;mean sea level&#039; with one thats with respect to a geodetic datum, such as NAVD 1988 or NGVD ?</description>
		<content:encoded><![CDATA[<p>How can one convert an elevation value thats with respect to &#8216;mean sea level&#8217; with one thats with respect to a geodetic datum, such as NAVD 1988 or NGVD ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
