[R] Thanks for all the help (re: Trying to "pretty up" output from R job

Paul Johnson pauljohn at ukans.edu
Mon Aug 7 21:11:00 CEST 2000


Paul E Johnson wrote:
> 
> Running R 1.1 on RedHat Linux 6.2.
This is about the best email list I've ever been in. Unceasingly helpful
and polite.  I got quick answers from 10 different people telling me 5
different ways to round numbers after two decimal places and several
other ways to fiddle the output format. Awesome.

Just for the record, my opinion is that, if you need to have an R thing
done in each subdirectory, and each subdirectory's name can be some
completely arbitrary thing that you can't predict ahead of time, it is
much easier to make a shell script that traverses the directory
structure than it is to write an R program that goes into the
subdirectories.  The shell script just needs:

#!/bin/sh
for file in *;
 do
        echo $file
    if [ -d $file ]
        then 

	 cd $file

	        R BATCH ../Rcollector.R
       cd ..
     fi
done


-- 
Paul E. Johnson                       email: pauljohn at ukans.edu
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list