[ESS] How does one start R within Emacs/ESS with root privileges?

Patrick Connolly p_connolly at slingshot.co.nz
Thu Sep 8 10:38:37 CEST 2011


On Wed, 07-Sep-2011 at 02:19PM +0200, Karl Brand wrote:

|> <Reposted from r-help at r-project.org>
|> 
|> Esteemed ESS Users & Devs,
|> 
|> How does one start R within Emacs/ESS with root privileges?
|> 
|> I tried without success:
|> 
|> > M-x sudo R
|> 
|> Why i'm motivated to do so:
|> 

|> It seems logical to me, as the only user of the PC, to keep my R
|> library consolidated in the universal library rather than splitting
|> into universal and user libraries. Hence the desire to run R as
|> root.

It's more logical to me to keep at least 2 libraries (and a third if
you use Bioconductor).  Each new version of R has its recommended
packages which I handle differently from others I install.  The latter
don't all have to be reinstalled/updated when a new version of R is
installed so it's useful to have then available unchanged until it's
necessary to do so.  Bioconductor packages tend to be huge and I don't
want to reinstall them on each change of R version.

|> 
|> In addition, it's nice to be able to install packages 'on the fly'
|> when and as needed and not need to launch a separate R session (as
|> root) in the terminal just to install a package.

As someone else pointed out, on a machine with a single user, there's
no need to install anything to do with R or ESS as root.  Coming from
Windows, you're probably unaware of the general principle that it's
not good practice to run anything as root apart from administrative
tasks.

I use R on a machine where I don't have root access and another where
I do.  It's actually *less* mucking around to keep it all in the
/home/ directory and absolutely no disadvantage.  Updating and
installing to any of your libraries can be done with customary ease.


|> 
|> Migrating from windows, i'm completey new to linux (ubuntu) and am
|> seeing for myself if Emacs/ESS is as good as its purported to be.

It will take a bit of getting used to the way Emacs uses the control
and alt keys but it's certainly worth the effort.  Kind of like
learning how to touch type -- quite slow in the beginning, second
nature after a short while.  I'm unaware of anything remotely as good
as ESS for running R.

|> So maybe my motivation is nonsensical to expereinced ESS/R users.
|> If so i'd really appreciate tips on efficient package
|> installation/maintenance using Emacs/ESS.

Hope my suggestion above is helpful.  You've come to the right place,
even if your original idea was a bit strange.  You'll find great tips
on this list.



-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___    Patrick Connolly   
 {~._.~}                   Great minds discuss ideas    
 _( Y )_  	         Average minds discuss events 
(:_~*~_:)                  Small minds discuss people  
 (_)-(_)  	                      ..... Eleanor Roosevelt
	  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.



More information about the ESS-help mailing list