I am trying to teach myself a little R and recently I found an entry 
over at R-Bloggers & Expansed, on how to create social graphs from your 
email 
<http://expansed.com/2011/08/sna-visualising-an-email-box-with-r/>, that 
interested me.

I am using Mac OS Lion, so I installed the R-2.13.1pkg and the R.app 
R-2.13-patched.  The script requires the Network, rJython, and rJava 
libraries, so I installed these as binaries.  Mac OS Lion does not come 
with a Java Development Kit installed, so I installed one from Mac Ports 
and then I also tried building it from source based on the 
instructions.  I then registered the JDK with R using "sudo R CMD 
javareconf".  The script fails when executed with the following error:

Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,  :
   Traceback (most recent call last):
   File "<string>", line 1, in <module>
   File 
"/Library/Frameworks/R.framework/Versions/2.13/Resources/library/rJython/jython.jar/Lib/imaplib.py", 
line 437, in fetch
   File 
"/Library/Frameworks/R.framework/Versions/2.13/Resources/library/rJython/jython.jar/Lib/imaplib.py", 
line 1055, in _simple_command
   File 
"/Library/Frameworks/R.framework/Versions/2.13/Resources/library/rJython/jython.jar/Lib/imaplib.py", 
line 892, in _command_complete
imaplib.error: FETCH command error: BAD ['Could not parse command']

I have tried many, many different things but I simply can not work out 
how to make this work.  As other people sound like they have run this, 
it is a mystery to me.  One of the things I have tried was trying the 
same thing in a virtual instance of Linux running on my Mac and that 
segfaults.  Another is installing the rJava library as source, so that 
it would be compiled on my machine.  This fails due to R expecting a 
different framework version.  The error returned is:

checking whether JNI programs can be compiled... configure: error: 
Cannot compile a simple JNI program. See config.log for details.

and checking the log I find:

Dyld Error Message:
   Library not loaded: 
/Library/Frameworks/R.framework/Versions/2.12/Resources/lib/libR.dylib
   Referenced from: /Applications/R.app/Contents/MacOS/R
   Reason: image not found

I am using Framework version 2.13, so I do not even have a directory for 
version 2.12.  The file "libR.dylib" is in the right place for 2.13 but 
I do not know how to configure R.app to use a particular version of the 
Framework.  Or even if this is actually the root of the problem above.

If anyone has any suggestions I would appreciate it... or even if 
someone could try the script Expansed published and see if it works for 
them, I would appreciate that as well.

Thanks!

	[[alternative HTML version deleted]]

