In R 1.6.2 you can do this if you start the script with

#! /path/to/r_home/lib/R/bin/R.bin

provided that you first define the environment variables R_HOME and LD_LIBRARY_PATH as they are defined in the R shell script (/usr/bin/R in your case).

I've only tested this running on Sun Solaris. I can't claim to have done extensive testing for pitfalls (i.e., pitfalls that aren't obvious to me!).

-Don

At 2:30 PM +0100 2/5/03, Havard Rue wrote:
is there any way i can use R as a tool for scripts in unix, as

wotan[hrue]$ cat example.R
#!/usr/bin/R
x=1

havard

--
Havard Rue
Department of Mathematical Sciences
Norwegian University of Science and Technology
N-7491 Trondheim, Norway
Voice: +47-7359-3533 URL : http://www.math.ntnu.no/~hrue Fax : +47-7359-3524 Email: [EMAIL PROTECTED]

______________________________________________
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help

--
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
--------------------------------------

______________________________________________
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to