<?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>The Stata Things &#187; R</title>
	<atom:link href="http://enoriver.net/index.php/tag/r/feed/" rel="self" type="application/rss+xml" />
	<link>http://enoriver.net</link>
	<description>computing for fun and profit</description>
	<lastBuildDate>Tue, 31 Jan 2012 20:03:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Stata and Samba, BFF</title>
		<link>http://enoriver.net/index.php/2009/04/22/stata-and-samba-bff/</link>
		<comments>http://enoriver.net/index.php/2009/04/22/stata-and-samba-bff/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 17:21:12 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Stata]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=659</guid>
		<description><![CDATA[What can a Stata user do with a Samba server? Pretty much the same thing you would do with any computer. My Stata is installed on my Windows PC. Now Samba allows me to store either do-files or data on the remote FreeBSD server and access them easily. Suppose that the remote box were called [...]]]></description>
			<content:encoded><![CDATA[<p>What can a Stata user do with a Samba server? Pretty much the same thing you would do with any computer. My Stata is installed on my Windows PC. Now Samba allows me to store either do-files or data on the remote FreeBSD server and access them easily.</p>
<p>Suppose that the remote box were called myUnix. Also suppose that I had a folder there with do-files, called myDofiles and another, with data sets, called myDtafiles.</p>
<p>This is how I would make Stata run a do-file saved on the server:<br />
<code><br />
run \\myUnix\myDofiles\myFile.do<br />
</code><br />
And this is how I can load into the PC's memory a .dta file stored on the FreeBSD hard drive:<br />
<code><br />
use \\myUnix\myDtafiles\myFile.dta<br />
</code></p>
<p>If one of these days I can find the time to experiment with how Stata could hook up with R and to what profit, I will do that across the two computers, for a bit of extra educational benefit. But I can't be bothered right now.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2009/04/22/stata-and-samba-bff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing R on FreeBSD, part two</title>
		<link>http://enoriver.net/index.php/2009/02/18/installing-r-on-freebsd-take-two/</link>
		<comments>http://enoriver.net/index.php/2009/02/18/installing-r-on-freebsd-take-two/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 17:20:18 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=568</guid>
		<description><![CDATA[R took a long time to compile yesterday because it depends on all kinds of things that I didn't have installed already. One of them is the Tcl/Tk language, which apparently comes from two separate FreeBSD ports -- one named tcl85 and the other tk85. The latter made trouble. It aborted the installation and it [...]]]></description>
			<content:encoded><![CDATA[<p>R took a long time to compile yesterday because it depends on all kinds of things that I didn't have installed already. One of them is the Tcl/Tk language, which apparently comes from two separate FreeBSD ports -- one named tcl85 and the other tk85. The latter made trouble. It aborted the installation and it advised me to remove a directory called /nonexistent.</p>
<p>I googled around a bit and it turns out that /nonexistent is the default home directory of all sorts of system users, such as www or cups, which you might want to have. So, I read the <a href="http://www.freebsd.org/doc/en/books/handbook/users.html">friendly manual</a> and decided that these users needed a new home. There seem to be two steps to that.</p>
<p>The first is that you move their stuff, like so:<br />
<code><br />
# cp -R /nonexistent <em>/newhome</em><br />
</code><br />
The second is that you move them to the new address. You can see all the system users who reside at /nonexistent in the /etc/passwd file. If you don't have too many -- I had seven -- you can move them one by one with the command<br />
<code><br />
# chpass <em>user</em><br />
</code><br />
The <code>chpass</code> command uses the vi editor to do the job, or whatever is your default $EDITOR setting. If, like me, you don't use the thing often enough, you may prefer an easier one. For that, you need to change the environment variable EDITOR to something that works for you before you do <code>chpass</code>. I chose ee:<br />
<code><br />
# setenv EDITOR ee<br />
</code><br />
Finally, I removed the offending /nonexistent directory:<br />
<code><br />
# rm -Rf /nonexistent<br />
</code><br />
After that, I thought I'd resume installation. First I found the port:<br />
<code><br />
# whereis R<br />
</code><br />
Then I cd'd to it, then did:<br />
<code><br />
# make deinstall clean &amp;&amp; make reinstall clean<br />
</code><br />
The installation resumed where the tk85 port had left off. Now I have R under FreeBSD. I used to dabble in R a while back, with the help of <a title="viaLibri link" href="http://tinyurl.com/ddlt4s">this book</a>. I had it installed under Windows XP from <a title="Install R" href="http://cran.r-project.org/">binaries</a>, and I must say that that process was a lot more convenient.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2009/02/18/installing-r-on-freebsd-take-two/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing R on FreeBSD, part one</title>
		<link>http://enoriver.net/index.php/2009/02/17/installing-r-on-freebsd/</link>
		<comments>http://enoriver.net/index.php/2009/02/17/installing-r-on-freebsd/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 18:35:43 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=561</guid>
		<description><![CDATA[My installation of R 2.8.1-1 is in progress as I write this. The original instructions for installing R on FreeBSD are at the R Wiki, but before you dash there, you may want to know that I had to make some changes. They are listed below: First, the good news: on my FreeBSD 7.0 installed [...]]]></description>
			<content:encoded><![CDATA[<p>My installation of R 2.8.1-1 is in progress as I write this. The original instructions for installing R on FreeBSD are at the <a href="http://wiki.r-project.org/rwiki/doku.php?id=getting-started:installation:freebsd">R Wiki</a>, but before you dash there, you may want to know that I had to make some changes. They are listed below:</p>
<p>First, the good news: on my FreeBSD 7.0 installed in February of 2008, I did not need to make any changes to the PATH, nor did I have to set the symbolic links mentioned in the instructions right after the paragraph that begins with "A word of warning [...]". You may have to, but check first:<br />
<code><br />
# whereis make<br />
# whereis sed<br />
</code><br />
If your system is anything like mine, make and sed are in /usr/bin. Next, you need to check and see if the PATH includes /usr/bin, like so:<br />
<code><br />
# echo $PATH<br />
</code><br />
If the answer is yes, you're OK. If the answer is no, before you make changes to the PATH, check which shell you're using, like so:<br />
<code><br />
# echo $SHELL<br />
</code><br />
The instructions use the "export PATH" command, which is for the bash shell. The csh equivalent of that command is "setenv PATH". Finally, the symlinks mentioned in the instructions map your gsed to sed, but I have no such thing. I have psed instead. You can check what kind of stream editor you have like so:<br />
<code><br />
# ls /usr/local/bin | grep sed<br />
</code><br />
Next, I had to make changes to two files: /etc/login.conf and /boot/loader.conf.</p>
<p>The latter was easy. It used to be empty, and it now contains one line:<br />
<code><br />
kern.maxdsiz="734003200"<br />
</code></p>
<p>In the former, I had to comment out the settings that forwarded the standard user settings to the default, then de-comment the example settings for the standard user, and increase the datasize to 700M. The idea is that by default, the datasize is unlimited. You need to cap it to 700M for the standard user, in order for the gfortran43 port, on which the R port depends, to install with Java support, whatever that is.</p>
<p>I wouldn't have done any of this, but my first attempt at installing R aborted with all kinds of error messages that after a bit of googling pointed me this way. To be safe, before editing /etc/login.conf and /boot/loader.conf I copied them to /etc/login.conf_original and /boot/loader.conf_original. If I screwed anything up, I'll just de-install R and revert to those until I figure out what's wrong.</p>
<p>When you open /etc/login.conf for editing you will see some comments that instruct you to do<br />
<code><br />
# cap_mkdb /etc/login.conf<br />
</code><br />
after you've done your edits. I did. To make sure that the new settings took place, I also restarted the server. That's<br />
<code><br />
# shutdown -r now<br />
</code><br />
And now, like I said, the thing's in progress. It's taking a long time too.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2009/02/17/installing-r-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

