[R] Starting R from .RData in linux

Marianne Promberger mpromber at psych.upenn.edu
Tue May 20 13:09:19 CEST 2008


On 05/20/08 10:42, Agustin Lobo wrote:
> Marianne, I do the equivalent
> gnome-terminal -e R
> or
> xterm -e R
>
> and R starts on the home directory and indicating:
> ARGUMENT '/media/mifat32/Rexercises/.RData' __ignored__

Oops, turns out I get the same message, I just overlooked it.

However, for me R starts in the appropriate directory and does load
the objects in .RData in that directory, something I took as "success"
given that normally I don't use this 
(I have "alias R='R --no-restore-data --no-save'" in my ~/.bashrc).

So it seems R automatically loads the .RData in the given directory
from wich you start it, and in your case you need to (a) get R to
start from the dir that your .RDatat file is in (something Thunar does
for me), then (b) if you plan to have more than one .RData file in any
given dir, pass that as an arg to R. I guess (a) is a Nautilus
question, (b) seems like might be unlikely/ impractical (better
separate projects into separate dirs); and I don't know the answer to
either (a) nor (b).

m.

p.s.for  (a) you could also check whether gnome-terminal has an option
to explicitly tell it a directory.


>
> Are you sure you do not add any other parameter?

No, I don't but oops.

I g

> I've tried
> xterm -e R --restore
> gnome-terminal -e R --restore
> same result.
>
> On 05/19/08 09:06, Agustin Lobo wrote:
>> Hi!
>>
>> Is it possible to start R by clicking
>> the .RData file in linux as in Windows?
>> I've tried with ubuntu hardy using
>> the right button and selecting R, but does
>> not work. Is there any way to set it up?
>
> Marianne Promberger Wrote:
>> You presumably need to associate the file type .RData with starting a
>> terminal and then executing R in that terminal.
>> I'm using Xubuntu, so my file manager is Thunar, and if I right click
>> on an .RData and select "use other application" then "custom command",
>> then put in xfterm4 -e R
>> this works.
>> On Ubuntu, your terminal is probably something else and may have
>> different syntax.  (gnome-terminal maybe? then man gnome-terminal in
>> case the -e option doesn't work for you).
>> m.
>> -- 
>> Marianne Promberger
>> Graduate student in Psychology
>> http://www.psych.upenn.edu/~mpromber
>
>
>
>
> -- 
> Dr. Agustin Lobo
> Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
> LLuis Sole Sabaris s/n
> 08028 Barcelona
> Spain
> Tel. 34 934095410
> Fax. 34 934110012
> email: Agustin.Lobo at ija.csic.es
> http://www.ija.csic.es/gt/obster
>

-- 
Marianne Promberger
Graduate student in Psychology
http://www.psych.upenn.edu/~mpromber



More information about the R-help mailing list