<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3549061528972344272</id><updated>2012-03-16T06:01:05.167-07:00</updated><category term='sweave'/><category term='install'/><category term='wiki'/><category term='textmate'/><category term='resources'/><category term='help'/><category term='svn'/><category term='bundles'/><title type='text'>World of R-Craft</title><subtitle type='html'>This blog is my learning-journal learning about R (the statistics app)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://worldofrcraft.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3549061528972344272/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://worldofrcraft.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>:)-k</name><uri>http://www.blogger.com/profile/17485147414717938612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://everlearn.bamberg.uni-erlangen.de/blogs/kadewe/img/kdw.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3549061528972344272.post-8583617276101728892</id><published>2010-08-09T07:19:00.000-07:00</published><updated>2010-08-11T02:01:26.006-07:00</updated><title type='text'>Installing RApache on Mac OS X Snow Leopard</title><content type='html'>Hi Folks,&lt;br /&gt;for a research project I needed to install &lt;a href="http://biostat.mc.vanderbilt.edu/rapache/"&gt;RApache&lt;/a&gt; on my Mac OS X 10.6.4 (Snow Leopard) machine.&lt;br /&gt;&lt;br /&gt;It did take some time, a lot of beeping in the video documentary, a lot of recompiles…&lt;br /&gt;&lt;br /&gt;Here is the way to do it:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Install Gnu Fortran on your Mac&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You need to install Gnu Fortran on your Mac, because you have to build R on your Mac to run RApache.&lt;br /&gt;&lt;br /&gt;Fortunately, there is a nicely Mac-style installer available at &lt;br /&gt;&lt;a href="http://gcc.gnu.org/wiki/GFortranBinaries#MacOS"&gt;http://gcc.gnu.org/wiki/GFortranBinaries#MacOS&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Go ahead and install it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Install libapreq on your Mac&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;libapreq2 is a library for your Apache 2 installation. Download libapreq2-2.12 (or newer) &lt;a href="http://httpd.apache.org/apreq/"&gt;here&lt;/a&gt; and install it via Terminal:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;tar xzvf libapreq2-2.12.tar.gz&lt;br /&gt;cd libapreq2-2.12&lt;br /&gt;./configure &lt;br /&gt;make&lt;br /&gt;sudo make install&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;3. Build R&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Go to your favorite CRAN-mirror (&lt;a href="http://ftp5.gwdg.de/pub/misc/cran/"&gt;Georg-August Universität Göttingen&lt;/a&gt;) and download the &lt;b&gt;source&lt;/b&gt; for R, e.g. R-2.11.1.tar.gz (section source code for all platforms). Now build R. Watch out for the configure option --enable-R-shlib! &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;tar xzvf R-2.11.1.tar.gz&lt;br /&gt;&lt;br /&gt;cd R-2.11.1&lt;br /&gt;./configure --enable-R-shlib&lt;br /&gt;make&lt;br /&gt;sudo make install&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;4. Install RApache&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Download RApache from &lt;a href="http://biostat.mc.vanderbilt.edu/rapache/downloads.html"&gt;http://biostat.mc.vanderbilt.edu/rapache/downloads.html&lt;/a&gt;&lt;br /&gt;Install RApache with the special configure option with-apache2-apxs!&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;tar xzvf rapache-1.1.9.tar.gz&lt;br /&gt;cd rapache-1.1.9&lt;br /&gt;./configure --with-apache2-apxs=/usr/sbin/apxs&lt;br /&gt;sudo make&lt;br /&gt;sudo make install&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;5. Reconfigure your Apache&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Go to your Apache configuration file:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;cd /private/etc/apache2/&lt;br /&gt;sudo pico httpd.conf&lt;/pre&gt;&lt;br /&gt;(if you have TextMate installed, just use sudo mate httpd.conf)&lt;br /&gt;&lt;br /&gt;now add the line after the other LoadModule entries in the httpd.conf file&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;LoadModule R_module           libexec/apache2/mod_R.so&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Add the following line for debugging just below&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;ROutputErrors&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;as well as (put this somewhere at the end of the conf-file:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;# Prints out a nice report about R running within Apache&lt;br /&gt;&amp;lt;Location /RApacheInfo&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;SetHandler r-info&lt;br /&gt;&amp;lt;/Location&amp;gt;&lt;/pre&gt;&lt;br /&gt;Save httpd.conf.&lt;br /&gt;Restart Apache (open up Systempreferences, select Sharing and uncheck and check Websharing).&lt;br /&gt;Now you should be able to go to&lt;br /&gt;&lt;br /&gt;http://yourcomputer/RApacheInfo&lt;br /&gt;(you find the name of your computer in System preferences -&gt; Sharing if you click on websharing: if websharing is running, it shows you a link to your computer - use the second link)&lt;br /&gt;&lt;br /&gt;to get a nice info about RApache running on your system.&lt;br /&gt;&lt;br /&gt;Have fun!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update 8/11/2011&lt;/b&gt;&lt;br /&gt;After that you have to reinstall R from CRAN again, because your regular R install will be broken. Hmmmm, I hope this gives all you RApache-Macheads enough headstart to come up with a cleaner solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3549061528972344272-8583617276101728892?l=worldofrcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://worldofrcraft.blogspot.com/feeds/8583617276101728892/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3549061528972344272&amp;postID=8583617276101728892' title='6 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3549061528972344272/posts/default/8583617276101728892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3549061528972344272/posts/default/8583617276101728892'/><link rel='alternate' type='text/html' href='http://worldofrcraft.blogspot.com/2010/08/installing-rapache-on-mac-os-x-snow.html' title='Installing RApache on Mac OS X Snow Leopard'/><author><name>:)-k</name><uri>http://www.blogger.com/profile/17485147414717938612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://everlearn.bamberg.uni-erlangen.de/blogs/kadewe/img/kdw.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3549061528972344272.post-6155052304287175966</id><published>2009-02-25T07:39:00.001-08:00</published><updated>2009-02-25T07:41:45.745-08:00</updated><title type='text'>Absolutely great resource</title><content type='html'>A very nice resource which helped me a lot in kickstarting my Sweave efforts is &lt;a href="http://www.scribd.com/doc/6451985/Learning-to-Sweave-in-APA-Style"&gt;Learning to Sweave in APA Style&lt;/a&gt; by clementi on &lt;a href="www.scribd.com"&gt;scribd&lt;/a&gt;. This is a down to earth tutorial containing a lot of good tips! See for yourself:&lt;br /&gt;&lt;br /&gt;&lt;a title="View Learning to Sweave in APA Style on Scribd" href="http://www.scribd.com/doc/6451985/Learning-to-Sweave-in-APA-Style" style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;"&gt;Learning to Sweave in APA Style&lt;/a&gt; &lt;object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="doc_611504360859911" name="doc_611504360859911" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" align="middle" height="500" width="100%"&gt;  &lt;param name="movie" value="http://d.scribd.com/ScribdViewer.swf?document_id=6451985&amp;access_key=key-2966rm6anklc789e1t81&amp;page=1&amp;version=1&amp;viewMode=list"&gt;   &lt;param name="quality" value="high"&gt;   &lt;param name="play" value="true"&gt;  &lt;param name="loop" value="true"&gt;   &lt;param name="scale" value="showall"&gt;  &lt;param name="wmode" value="opaque"&gt;   &lt;param name="devicefont" value="false"&gt;  &lt;param name="bgcolor" value="#ffffff"&gt;   &lt;param name="menu" value="true"&gt;  &lt;param name="allowFullScreen" value="true"&gt;   &lt;param name="allowScriptAccess" value="always"&gt;   &lt;param name="salign" value=""&gt;            &lt;param name="mode" value="list"&gt;       &lt;embed src="http://d.scribd.com/ScribdViewer.swf?document_id=6451985&amp;access_key=key-2966rm6anklc789e1t81&amp;page=1&amp;version=1&amp;viewMode=list" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="true" scale="showall" wmode="opaque" devicefont="false" bgcolor="#ffffff" name="doc_611504360859911_object" menu="true" allowfullscreen="true" allowscriptaccess="always" salign="" type="application/x-shockwave-flash" align="middle" mode="list" height="500" width="100%"&gt;&lt;/embed&gt; &lt;/object&gt; &lt;div style="margin: 6px auto 3px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block;"&gt;    &lt;a href="http://www.scribd.com/upload" style="text-decoration: underline;"&gt;Publish at Scribd&lt;/a&gt; or &lt;a href="http://www.scribd.com/browse" style="text-decoration: underline;"&gt;explore&lt;/a&gt; others:            &lt;a href="http://www.scribd.com/browse/Academic-Work/?style=text-decoration%3A+underline%3B"&gt;Academic Work&lt;/a&gt;                  &lt;a href="http://www.scribd.com/tag/training" style="text-decoration: underline;"&gt;training&lt;/a&gt;              &lt;a href="http://www.scribd.com/tag/learning" style="text-decoration: underline;"&gt;learning&lt;/a&gt;       &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3549061528972344272-6155052304287175966?l=worldofrcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://worldofrcraft.blogspot.com/feeds/6155052304287175966/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3549061528972344272&amp;postID=6155052304287175966' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3549061528972344272/posts/default/6155052304287175966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3549061528972344272/posts/default/6155052304287175966'/><link rel='alternate' type='text/html' href='http://worldofrcraft.blogspot.com/2009/02/absolutely-great-resource.html' title='Absolutely great resource'/><author><name>:)-k</name><uri>http://www.blogger.com/profile/17485147414717938612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://everlearn.bamberg.uni-erlangen.de/blogs/kadewe/img/kdw.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3549061528972344272.post-6533773742909431739</id><published>2009-01-06T14:16:00.001-08:00</published><updated>2009-01-08T11:41:21.690-08:00</updated><title type='text'>Combining R and LaTeX with Sweave</title><content type='html'>Today I did some experiments to learn how to combine R and LaTeX to create reproducible research reports. Here are my first results:&lt;br /&gt;&lt;br /&gt;&lt;a title="View First Demo on Scribd" href="http://www.scribd.com/doc/9789620/First-Demo" style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;"&gt;First Demo&lt;/a&gt; &lt;object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="doc_333878907645871" name="doc_333878907645871" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" align="middle" height="500" width="100%"&gt;  &lt;param name="movie" value="http://documents.scribd.com/ScribdViewer.swf?document_id=9789620&amp;access_key=key-19043xlq76bun5nlxzpz&amp;page=1&amp;version=1&amp;viewMode="&gt;   &lt;param name="quality" value="high"&gt;   &lt;param name="play" value="true"&gt;  &lt;param name="loop" value="true"&gt;   &lt;param name="scale" value="showall"&gt;  &lt;param name="wmode" value="opaque"&gt;   &lt;param name="devicefont" value="false"&gt;  &lt;param name="bgcolor" value="#ffffff"&gt;   &lt;param name="menu" value="true"&gt;  &lt;param name="allowFullScreen" value="true"&gt;   &lt;param name="allowScriptAccess" value="always"&gt;   &lt;param name="salign" value=""&gt;        &lt;embed src="http://documents.scribd.com/ScribdViewer.swf?document_id=9789620&amp;access_key=key-19043xlq76bun5nlxzpz&amp;page=1&amp;version=1&amp;viewMode=" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="true" scale="showall" wmode="opaque" devicefont="false" bgcolor="#ffffff" name="doc_333878907645871_object" menu="true" allowfullscreen="true" allowscriptaccess="always" salign="" type="application/x-shockwave-flash" align="middle"  height="500" width="100%"&gt;&lt;/embed&gt; &lt;/object&gt; &lt;div style="margin: 6px auto 3px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block;"&gt;    &lt;a href="http://www.scribd.com/upload" style="text-decoration: underline;"&gt;Publish at Scribd&lt;/a&gt; or &lt;a href="http://www.scribd.com/browse" style="text-decoration: underline;"&gt;explore&lt;/a&gt; others:            &lt;a href="http://www.scribd.com/browse?c=117-unix" style="text-decoration: underline;"&gt;UNIX&lt;/a&gt;              &lt;a href="http://www.scribd.com/browse?c=114-technology" style="text-decoration: underline;"&gt;Technology&lt;/a&gt;                  &lt;a href="http://www.scribd.com/tag/latex" style="text-decoration: underline;"&gt;latex&lt;/a&gt;              &lt;a href="http://www.scribd.com/tag/sweave" style="text-decoration: underline;"&gt;sweave&lt;/a&gt;       &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And this is the source code:&lt;br /&gt;&lt;br /&gt;&lt;a title="View firstDemo.Rnw on Scribd" href="http://www.scribd.com/doc/9789711/firstDemoRnw" style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;"&gt;firstDemo.Rnw&lt;/a&gt; &lt;object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="doc_676324289496456" name="doc_676324289496456" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" align="middle" height="500" width="100%"&gt;  &lt;param name="movie" value="http://documents.scribd.com/ScribdViewer.swf?document_id=9789711&amp;access_key=key-2g6kp9ezxsfhg7fjcbdo&amp;page=1&amp;version=1&amp;viewMode="&gt;   &lt;param name="quality" value="high"&gt;   &lt;param name="play" value="true"&gt;  &lt;param name="loop" value="true"&gt;   &lt;param name="scale" value="showall"&gt;  &lt;param name="wmode" value="opaque"&gt;   &lt;param name="devicefont" value="false"&gt;  &lt;param name="bgcolor" value="#ffffff"&gt;   &lt;param name="menu" value="true"&gt;  &lt;param name="allowFullScreen" value="true"&gt;   &lt;param name="allowScriptAccess" value="always"&gt;   &lt;param name="salign" value=""&gt;        &lt;embed src="http://documents.scribd.com/ScribdViewer.swf?document_id=9789711&amp;access_key=key-2g6kp9ezxsfhg7fjcbdo&amp;page=1&amp;version=1&amp;viewMode=" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="true" scale="showall" wmode="opaque" devicefont="false" bgcolor="#ffffff" name="doc_676324289496456_object" menu="true" allowfullscreen="true" allowscriptaccess="always" salign="" type="application/x-shockwave-flash" align="middle"  height="500" width="100%"&gt;&lt;/embed&gt; &lt;/object&gt; &lt;div style="margin: 6px auto 3px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block;"&gt;    &lt;a href="http://www.scribd.com/upload" style="text-decoration: underline;"&gt;Publish at Scribd&lt;/a&gt; or &lt;a href="http://www.scribd.com/browse" style="text-decoration: underline;"&gt;explore&lt;/a&gt; others:         &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Very nice stuff for a first 60 minute session. I will come back with more examples over the next few weeks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3549061528972344272-6533773742909431739?l=worldofrcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://worldofrcraft.blogspot.com/feeds/6533773742909431739/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3549061528972344272&amp;postID=6533773742909431739' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3549061528972344272/posts/default/6533773742909431739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3549061528972344272/posts/default/6533773742909431739'/><link rel='alternate' type='text/html' href='http://worldofrcraft.blogspot.com/2009/01/combining-r-and-latex-with-sweave.html' title='Combining R and LaTeX with Sweave'/><author><name>:)-k</name><uri>http://www.blogger.com/profile/17485147414717938612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://everlearn.bamberg.uni-erlangen.de/blogs/kadewe/img/kdw.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3549061528972344272.post-744399929365045597</id><published>2008-12-05T14:04:00.001-08:00</published><updated>2008-12-09T01:15:12.402-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='resources'/><category scheme='http://www.blogger.com/atom/ns#' term='help'/><category scheme='http://www.blogger.com/atom/ns#' term='wiki'/><title type='text'>Some of my other R-resources</title><content type='html'>I am running this blog as a kind of learning journal, so I can look up some of the solutions I come up when I run into problems on my way to R-mastery. I have some other R-related resources which may be of interest to other R-fellas.&lt;br /&gt;&lt;br /&gt;A much more structured resource than this blog is the &lt;a href="http://www.ifeb.uni-bremen.de/repf"&gt;REPF-wiki&lt;/a&gt;, where I try to provide information about using R in educational (and other social) sciences: &lt;a href="http://www.ifeb.uni-bremen.de/repf"&gt;REPF-wiki&lt;/a&gt; (only available in German right now).&lt;br /&gt;&lt;br /&gt;I am also collecting R-releated links on the web using del.icio.us: you can see them in the right side column of this blog at the top.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3549061528972344272-744399929365045597?l=worldofrcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://worldofrcraft.blogspot.com/feeds/744399929365045597/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3549061528972344272&amp;postID=744399929365045597' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3549061528972344272/posts/default/744399929365045597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3549061528972344272/posts/default/744399929365045597'/><link rel='alternate' type='text/html' href='http://worldofrcraft.blogspot.com/2008/12/some-of-my-other-r-resources.html' title='Some of my other R-resources'/><author><name>:)-k</name><uri>http://www.blogger.com/profile/17485147414717938612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://everlearn.bamberg.uni-erlangen.de/blogs/kadewe/img/kdw.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3549061528972344272.post-8348401042008283724</id><published>2008-11-28T14:34:00.000-08:00</published><updated>2008-11-28T15:12:16.044-08:00</updated><title type='text'>First and easy steps with R and Sweave</title><content type='html'>What really sold me to the idea of using Sweave and therefore (re)learning LaTeX was the idea of &lt;a href="http://www.stat.umn.edu/~charlie/Sweave/"&gt;Reproducible Research&lt;/a&gt;. &lt;a href="http://www.stat.umn.edu/~charlie/"&gt;Charlie Geyer&lt;/a&gt; has put together some examples how to mix and match R and LaTeX with Sweave. Today's goal therefore is to run his examples and to see, what problems I run into :)&lt;br /&gt;&lt;br /&gt;Allright, if you all go to the example section of Charlie's &lt;a href="http://www.stat.umn.edu/~charlie/Sweave/#exam"&gt;Reproducible Research Page&lt;/a&gt;, you will find three examples. Let's start with the first one.&lt;br /&gt;&lt;br /&gt;To start, I created a folder ReproducibleResearch, copied my Sweave.sty file into it and created a project within Textmate by dragging the folder onto the Textmate icon in my dock. Then I created a document foo.Rnw, copied the contents of the first example into it and saved it (if you have the R, SWeave and LaTeX bundles installed, TextMate should be recognizing this *.Rnw document as a Sweave document.&lt;br /&gt;&lt;br /&gt;Feeling lucky, I just pressed cmd-R to run this code in R.&lt;br /&gt;&lt;br /&gt;…drumroll…&lt;br /&gt;&lt;br /&gt;It just worked. Wow! A TextMate "Sweave, Typeset &amp; View" window just showed me "An (sic!) Sweave Demo" by Charles J. Geyer! Complete with LaTeX typesetting, R output and even graphics. That's what I want, so this is a great start! Many kudos to Charles.&lt;br /&gt;&lt;br /&gt;Now, let's analyse the code to see what we can rip off this example.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;\documentclass{article}&lt;br /&gt;&lt;br /&gt;\usepackage{amsmath}&lt;br /&gt;\usepackage{amscd}&lt;br /&gt;\usepackage[tableposition=top]{caption}&lt;br /&gt;\usepackage{ifthen}&lt;br /&gt;\usepackage[utf8]{inputenc}&lt;br /&gt;&lt;br /&gt;\begin{document}&lt;br /&gt;&lt;br /&gt;\title{An Sweave Demo}&lt;br /&gt;\author{Charles J. Geyer}&lt;br /&gt;\maketitle&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;All right, so this is just plain LaTeX. It is a document of class article, it uses some packages, it begins the document and defines a title. Doesn't look pretty in code, but hey, this is LaTeX - you better get used to this ;)&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;This is a demo for using the \verb@Sweave@ command in R.  To&lt;br /&gt;get started make a regular \LaTeX\ file (like this one) but&lt;br /&gt;give it the suffix \verb@.Rnw@ instead of \verb@.tex@ and then&lt;br /&gt;turn it into a \LaTeX\ file (\verb@foo.tex@) with the (unix) command&lt;br /&gt;\begin{verbatim}&lt;br /&gt;R CMD Sweave foo.Rnw&lt;br /&gt;\end{verbatim}&lt;br /&gt;So you can do&lt;br /&gt;\begin{verbatim}&lt;br /&gt;latex foo&lt;br /&gt;xdvi foo&lt;br /&gt;\end{verbatim}&lt;br /&gt;and so forth.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Now there is some text - all this \verb@sometext@ gives you a code-like text formating within normal text. \begin{verbatim} starts a code block, \end{verbatim} stops it. Pretty standard LaTeX stuff.&lt;br /&gt;&lt;br /&gt;A few lines later it gets more interesting:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;&lt;two&gt;&gt;=&lt;br /&gt;2 + 2&lt;br /&gt;@&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Alright, so this is a code chunk, which will be run and the output of R will be written. Very nice! Try it out and alter the 2 + 2 to something else and sweave the file again. I typed in 2 * 1024 - 35 and the result has been 2013. Easy enough.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_UPTH3sS5XaU/STB6g2SynnI/AAAAAAAAABA/s1GumNUnTR8/s1600-h/Bild+5.png"&gt;&lt;img style="display:block; margin:1px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 70px;" src="http://4.bp.blogspot.com/_UPTH3sS5XaU/STB6g2SynnI/AAAAAAAAABA/s1GumNUnTR8/s400/Bild+5.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5273849868399582834" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the next post I will digg deeper into creating graphs and doing more complex analysis reports with Sweave. For tonight, I am happy with the first results.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3549061528972344272-8348401042008283724?l=worldofrcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://worldofrcraft.blogspot.com/feeds/8348401042008283724/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3549061528972344272&amp;postID=8348401042008283724' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3549061528972344272/posts/default/8348401042008283724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3549061528972344272/posts/default/8348401042008283724'/><link rel='alternate' type='text/html' href='http://worldofrcraft.blogspot.com/2008/11/first-and-easy-steps-with-r-and-sweave.html' title='First and easy steps with R and Sweave'/><author><name>:)-k</name><uri>http://www.blogger.com/profile/17485147414717938612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://everlearn.bamberg.uni-erlangen.de/blogs/kadewe/img/kdw.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_UPTH3sS5XaU/STB6g2SynnI/AAAAAAAAABA/s1GumNUnTR8/s72-c/Bild+5.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3549061528972344272.post-2385707494871863070</id><published>2008-11-21T03:34:00.000-08:00</published><updated>2008-11-21T04:08:58.730-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bundles'/><category scheme='http://www.blogger.com/atom/ns#' term='install'/><category scheme='http://www.blogger.com/atom/ns#' term='textmate'/><category scheme='http://www.blogger.com/atom/ns#' term='sweave'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>Setting up Textmate to use R</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_UPTH3sS5XaU/SSakyVKN5cI/AAAAAAAAAAc/ur0E-EuNkwk/s1600-h/Bild+10.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 104px;" src="http://3.bp.blogspot.com/_UPTH3sS5XaU/SSakyVKN5cI/AAAAAAAAAAc/ur0E-EuNkwk/s400/Bild+10.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5271081598464157122" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After becoming frustrated using the &lt;a href="http://www.walware.de/goto/statet"&gt;StatET&lt;/a&gt; plugin for &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt; on my Mac (sometimes the R console would start and sometimes not), I decided to use &lt;a href="http://macromates.com/"&gt;Textmate&lt;/a&gt; instead. Textmate allows you to install extra &lt;a href="http://svn.textmate.org/trunk/Bundles/"&gt;bundles&lt;/a&gt; which are plug-ins to add some new functionality to TextMate. There are two bundles relevant for R developers:&lt;br /&gt;- R bundle (&lt;a href="http://svn.textmate.org/trunk/Bundles/R.tmbundle/"&gt;here&lt;/a&gt;)&lt;br /&gt;- Latex bundle (&lt;a href="http://svn.textmate.org/trunk/Bundles/Latex.tmbundle/"&gt;here&lt;/a&gt;)&lt;br /&gt;- Sweave bundle (&lt;a href="http://svn.textmate.org/trunk/Bundles/SWeave.tmbundle/"&gt;here&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;If you are running Leopard (Mac OS 10.5), the subversion client should be installed (otherwise, do so - you can find more info about this on the TextMate &lt;a href="http://manual.macromates.com/en/bundles"&gt;help pages&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;To install the two bundles, invoke the following terminal spells:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;mkdir -p /Library/Application\ Support/TextMate/Bundles&lt;br /&gt;cd /Library/Application\ Support/TextMate/Bundles&lt;br /&gt;svn co http://svn.textmate.org/trunk/Bundles/R.tmbundle&lt;br /&gt;svn co http://svn.textmate.org/trunk/Bundles/Latex.tmbundle&lt;br /&gt;svn co http://svn.textmate.org/trunk/Bundles/SWeave.tmbundle&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Start up TextMate and now you have support for R and Sweave in TextMate (this assumes that you already have installed a copy of Latex - &lt;a href="http://www.tug.org/mactex/"&gt;get the MacTeX-2008 distribution here&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Chances are that if you want to "Sweave, Typeset and View" R will choke because it does not find the necessary Sweave LaTeX style file (sweave.sty) file. If this is the case, just put a copy of sweave.sty into your working directory and everything will work wonderfully (yes, I know that this should be fixable by setting up the right search path somewhere, so if you have run into this problem and fixed it better than me, please send some enlightening commentaries!).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3549061528972344272-2385707494871863070?l=worldofrcraft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://worldofrcraft.blogspot.com/feeds/2385707494871863070/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3549061528972344272&amp;postID=2385707494871863070' title='3 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3549061528972344272/posts/default/2385707494871863070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3549061528972344272/posts/default/2385707494871863070'/><link rel='alternate' type='text/html' href='http://worldofrcraft.blogspot.com/2008/11/setting-up-textmate-to-use-r.html' title='Setting up Textmate to use R'/><author><name>:)-k</name><uri>http://www.blogger.com/profile/17485147414717938612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://everlearn.bamberg.uni-erlangen.de/blogs/kadewe/img/kdw.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_UPTH3sS5XaU/SSakyVKN5cI/AAAAAAAAAAc/ur0E-EuNkwk/s72-c/Bild+10.png' height='72' width='72'/><thr:total>3</thr:total></entry></feed>
