Search code examples
rinstallationpackageubuntu-12.10

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.


Solution

  • 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