[R] R and bash script problem

From: Xavier Thibert <spacemen12_at_yahoo.com>
Date: Wed 04 Apr 2007 - 17:54:07 GMT


Hi,

   I have a problem with R package and bash.

   I have the package scatterplot3d installed and working.

   I'm using bash as the command line interpretor.

   When I open R interactively I can load scatterplot3d without problem and use it.

   When I create an R script it also works and execute it interactively in bash it works
[xavier@coyote DIR.3thTry_1]$ cat test.R library(scatterplot3d)
[xavier@coyote DIR.3thTry_1]$ R --no-save < test.R ...
> library(scatterplot3d)
>

   When I create a bash script that do the same thing it doesn't work anymore
[xavier@coyote DIR.3thTry_1]$ cat overviewInter.sh #!/bin/bash
R --no-save < test.R
./overviewInter.sh
...
> library(scatterplot3d)

Error in library(scatterplot3d) : there is no package called 'scatterplot3d'
Execution halted

More info on my setup:
Linux Fedora Core 4
AMD64 dual core
R version 2.4.1 (2006-12-18)
GNU bash, version 3.00.16(1)-release
(x86_64-redhat-linux-gnu)

Someone can help me?

Thanks



R-help@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 and provide commented, minimal, self-contained, reproducible code. Received on Thu Apr 05 04:03:57 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 04 Apr 2007 - 18:30:56 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.