Re: [R] Running R as root

From: Peter Dalgaard <>
Date: Tue 18 Jul 2006 - 21:36:37 EST writes:

> Hello
> Using R v. 2.3.1 which I installed recently, when I start it as root, there
> is nothing
> I can do. I get "Error: function xx not found" even when trying to leave R
> using
> q(). R works fine when started by an ordinary user. I rechecked the root
> environment
> several times and even have set it similar to that of an ordinary user
> (values of
> PATH etc.) but nothing helps. Using the command "env" did not reveal
> anything
> valuable. Going to root through the identity of an ordinary user and
> retaining his
> environment by doing "su user" instead of su - user" does not help either.
> This does not seem related to the particular version of R.
> Using: Linux RedHat AS 2.1
> Any hint?

File permissions? (it is possible to set them so that files can be read by anyone except the user...)

How exactly did you install R, and are there any other clues upon startup?

I get, BTW

> aa()

Error: could not find function "aa"

so I suspect you paraphrased the error message.

One other thing that can cause trouble is networked directories. Files that are physically on another machine can sometimes not be accessed by root on the local machine.

   O__  ---- Peter Dalgaard             ุster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (                  FAX: (+45) 35327907

______________________________________________ mailing list
PLEASE do read the posting guide!
and provide commented, minimal, self-contained, reproducible code.
Received on Wed Jul 19 01:02:47 2006

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 19 Jul 2006 - 02:16:57 EST.

Mailing list information is available at Please read the posting guide before posting to the list.