Install R package

I have basically two questions.

  • How to find launched by default Rprofile? I haven't installed it yet Rprofile, so I'm not sure where it works from.

  • I am trying to install several packages using the command (after executing SUDO in the main terminal).

install.packages("RODBC","/home/rama/R/i486-pc-linux-gnu-library/2.9")

and I return an error message:

ERROR: could not lock the directory '/home/rama/R/i486-pc-linux-gnu-library/2.9 for modification Try deleting' / home / rama / R / i486-pc-linux-gnu-library / 2.9 / 00LOCK

Downloaded packages are located in the folder '/ tmp / RtmpkzDMVU / loaded_packages. Warning message: In install.packages ("RODBC", "/home/rama/R/i486-pc-linux-gnu-library/2.9"): installing the package "RODBC" had a non-zero exit status

+3
3

:

  • help(Startup). , $R_HOME/etc/Rprofile [ Ubuntu Debian /etc/R/Rprofile, ], $R_HOME/etc/Rprofile.site, ~/.Rprofile .
  • ls -l , . , R, . .
  • RODBC ODBC, - , Debian/Ubuntu sudo apt-get install r-cran-rodbc. , , RODBC.
  • ~/.Rprofile , fooobar.com/questions/27572/....
+5

, , "/home/rama/R/i486-pc-linux-gnu-library/2.9/00LOCK". rm , .

a ref : http://cos.name/cn/topic/108555#post-239310

+1

. !. RODBC sudo apt-get. . , , Rprofile . Ubuntu Jaunty.

whereis R, .

R:/usr/bin/R/etc/R/usr/lib/R/usr/local/lib/R/usr/share/R/usr/share/man/man1/R.1.gz

/etc/R

ldpaths Renecore.

cd /usr/lib/R/etc,

ldpaths Renecore.

1) My question is: which one is used to start R?

2) When I do sudo apt-get install r-cran-rodbc, where is the package installed?

3) I have a home folder for R in / home / rama / R / i 486-pc-linux-gnu-library / 2.9, where all my bio-conductor packages are located. How can I get sudo apt-get packages to install here? (? .Rprofile) Is it even necessary?

-3
source

Source: https://habr.com/ru/post/1716397/


All Articles