[R] installing a package in linux

Vojtěch Zeisek Vojtech.Zeisek at opensuse.org
Wed May 5 23:53:38 CEST 2010


There are a lot of R packages available in Ubuntu's repositories. Just search 
for R-* or r-cran-* within Your favorite package manager. It it the easiest 
way. :-)
Best regards,
Vojtěch Zeisek

Dne St 5. května 2010 17:03:22 Tengfei Yin napsal(a):
> Hi
> 
> The weird part in this case is that, if you didn't run sudo R, and install
> the package, it will create a library in your home directory, you should
> also be able to use the package next time.
> 
> Regards
> 
> Tengfei
> 
> On Wed, May 5, 2010 at 1:53 AM, Ruihong Huang <
> 
> ruihong.business na googlemail.com> wrote:
> > On 05/05/2010 02:44 AM, Tengfei Yin wrote:
> >> Hi
> >>
> >> R basic packages always works fine in my laptop (also ubuntu), you don't
> >> need to reinstall anything once you installed the package, did you do
> >> that in your terminal like
> >> $R (enter R session)
> >>
> >>> install.packages('package name')
> >>> q()
> >>
> >> then everytime you enter the R session, you just library('package
> >> name'), that should work... I don't know if it is sth about user
> >> privilege , do you
> >> use R on your own computer or on other servers?
> >>
> >> Regards
> >>
> >> Tengfei
> >>
> >> On Tue, May 4, 2010 at 2:25 PM, Fahim Md<fahim.md na gmail.com>  wrote:
> >>> I recently started using ubuntu 9.10 and I am using gedit editor and R
> >>> plugin for writing R code. To install any package I need to do:
> >>> $ install.packages()
> >>>  //window pop-up for mirror selection
> >>> //then another window pop up for package selection.
> >>> After this as long as I am not exiting, the function of the newly
> >>> installed
> >>> packages are available.
> >>>
> >>> After I exit (i use to put 'no' in 'save workspace' option) from R,  if
> >>> I want to again work in R, I have to repeat the process of package
> >>> install. This reintallation problem was not there in windows(I was
> >>> using Tinn-R as editor, I just need to put require('package-name') to
> >>> use its function).
> >>
> >> There is nothing to do with the editor. I guess, you should run "sudo R"
> >
> > (you shouldn't use this to run a normal R session) in Ubuntu, which will
> > give you the right to write into the R directory typically in /usr/lib. 
> > And then using "install.packages('package.name')" inside this R session. 
> > To load a library at beginning of each R session, you might consider the
> > .First function like,
> >
> > .First <- function(){
> >  library('package.name')
> >  invisible()
> > }
> >
> > and then quite R session with work space saved.
> >
> > Best,
> >
> > Ruihong
> >
> >  Is there anyway so that reinstallation of the package is avoided???
> >
> >>> thanks
> >>> --Fahim
> >>>
> >>>        [[alternative HTML version deleted]]
> >>>
> >>> ______________________________________________
> >>> R-help na r-project.org mailing list
> >>> https://stat.ethz.ch/mailman/listinfo/r-help
> >>> PLEASE do read the posting guide
> >>> http://www.R-project.org/posting-guide.html
> >>> and provide commented, minimal, self-contained, reproducible code.
> 

-- 
Vojtěch Zeisek

Komunita openSUSE GNU/Linuxu /
Community of the openSUSE GNU/Linux

http://www.opensuse.org/
http://web.natur.cuni.cz/~zeisek/
------------- dal�� ��st ---------------
A non-text attachment was scrubbed...
Name: [��dn� popis nen� k dispozici]
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100505/4b5bf0ce/attachment.bin>


More information about the R-help mailing list