[R] R and bash script problem

Xavier Thibert spacemen12 at yahoo.com
Wed Apr 4 19:54:07 CEST 2007


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 at coyote DIR.3thTry_1]$ cat test.R
library(scatterplot3d)
[xavier at 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 at 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



More information about the R-help mailing list