[Swift-user] swift and R

Marcin Hitczenko marcin at galton.uchicago.edu
Sun Sep 20 22:17:58 CDT 2009


Hi,

I am trying to use swift in order to run an R script on various datasets
on jazz. For each run, I would like to return some output by writing data
to a file. I have tried to do this in two ways, and while one works I was
told this was a potentially risky way of doing things.

What I try to do is to feed all relevant filenames to R (location of data
and location of output file) through swift as described on
http://www.ci.uchicago.edu/~erin/rguide/rforswift.php.

However, I run into two problems. Swift won't run because it complains
that the file to which I want to write the data does not exist (which is
true, but I would like to not have to create these files beforehand).
However, even when I create the (empty) file, nothing gets written to it.
I check the R log file and it seems that the data is written to something,
but when I check the file I created, it is still empty.

The method that works is for me to just feed the datafile to R via swift
and within the R program itself declare the location to write to. Like I
said before, I was told this was not ideal, but I am not sure how to fix
the problems described above?

Also, I noticed that a directory forms during the running of the swift
code, which I thought used to automatically be removed (except when there
was an error) at the completion of the run. This folder has not been
disappearing at completion (based on .out file). Am I not remembering
correctly that this should be a temporary directory? or am I doing
something incorrect?

Sorry for the long email, but I figured I should at least partially detail
what I am trying to do/having problems with. Thank you for your time and
effort.

Best,

Marcin



More information about the Swift-user mailing list