Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R install 2.15.2 Renvirons not found, Ubuntu 12.10 x64

Ubuntu 12.10 x64, R 2.15.2

I'm at a loss, I've installed R numerous times and never had the slightest problem with the install. This time however when I launch the program (either by using the GUI or by typing "R" in the terminal) I get this;

cannot find system Renviron Error : .onLoad failed in loadNamespace() for 'utils', details: call: options(op.utils[toset]) error: invalid value for 'editor'

R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

Error : .onLoad failed in loadNamespace() for 'utils', details:
call: options(op.utils[toset]) error: invalid value for 'editor' In addition: Warning message: package "methods" in options("defaultPackages") was not found Error : .onLoad failed in loadNamespace() for 'utils', details: call: options(op.utils[toset]) error: invalid value for 'editor' In addition: Warning message: package ‘utils’ in options("defaultPackages") was not found Error : .onLoad failed in loadNamespace() for 'utils', details: call: options(op.utils[toset]) error: invalid value for 'editor' In addition: Warning message: package ‘stats’ in options("defaultPackages") was not found During startup - Warning message: package ‘methods’ in options("defaultPackages") was not found

Nothing works, no packages are found. I've never received any training on how to use Ubuntu, but from what I can gather I am missing the recommended packages for R.

I've tried completely removing R using both the Terminal as well as Synaptics Package Manager, then re-downloading the from CRAN servers (it seems to download too fast for my internet connection) and then reinstall. Same message. I'm at a loss.

like image 463
AlaskaKraska Avatar asked Feb 26 '13 13:02

AlaskaKraska


3 Answers

I had the same problem and setting the EDITOR environment variable solved the problem for me.

Try e.g.

EDITOR=vim R

If that works, put the line

export EDITOR=vim

at the end of your ~/.profile

EDIT: the root of the problem was that /etc/R/Renviron was not read by R. As Dirk commented on his reply,

sudo chmod 644 /etc/R/Renviron

solves the problem

like image 84
Tomas Mikula Avatar answered Nov 07 '22 13:11

Tomas Mikula


The error seems to be the following :

error: invalid value for 'editor'

You can try to type the following in a terminal to know what the value of your EDITOR environment variable currently is :

echo $EDITOR

And maybe you should be able to start R from the command-line with something like :

EDITOR="" R
like image 29
juba Avatar answered Nov 07 '22 15:11

juba


But it starts to get dicy before it gets to editor -- it seems like it fails to load your saved environment. Can you try

 R --no-restore-data

or even

 R --vanilla

Needless to say, it works for me and the only configuration change made was in the Java stack (see the Changelog file).

There is a dedicated list r-sig-debian for the Debian and Ubuntu packages where you'd get me (Debian packages), Johannes (Debian backports, available via CRAN) and Michael (Ubuntu builds, available via CRAN). I tend to run Michael's packages on my Ubuntu machines and have not had an issue.

like image 1
Dirk Eddelbuettel Avatar answered Nov 07 '22 14:11

Dirk Eddelbuettel