[R] Batch

partha_bagchi@hgsi.com partha_bagchi at hgsi.com
Tue Nov 23 13:53:30 CET 2004


You haven't given much detail to go on. So I have to make some assumptions 
(feel free to correct me if I am wrong):

1. You already know how to plot something in R from the R command line.
2. You know how to save your plotting commands in a text file (say 
fancyplots.R).

If these are true, then say you define 
$r_file = "/path/to/fancyplots.R";

Let
$Rbin = "/usr/local/R/bin/R"; #I am assuming you are on *nix

Then this should work (untested - so use at your own risk!!)[modify to 
your needs]:

  open(R, "| $Rbin --no-save > temp.out");
  print R "source(\"$r_file\")\n";
  close R;

Obviously there may be other sophisticated ways to do this.

HTH,
Partha





"Claudia Paladini" <claudiapaladini at web.de>
Sent by: r-help-bounces at stat.math.ethz.ch
11/23/2004 03:54 AM

 
        To:     R-help at stat.math.ethz.ch
        cc: 
        Subject:        [R] Batch


Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Received-SPF: none (hypatia: domain of claudiapaladini at web.de does not 
designate permitted sender hosts)
X-Virus-Scanned: by amavisd-new at stat.math.ethz.ch
X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on 
hypatia.math.ethz.ch
X-Spam-Level:
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50 autolearn=no 
version=3.0.1

Dear ladies and gentlemen,
I want to automatise my data-analysis with R. What I exactally want to do, 
is to start  R - functions out of a perl-skript and do some batch 
plotting.
But I have no idea how to realise  this. Can anybody help me?
Thank you very much.
With kind regards

Claudia Paladini
__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list