[R] installing and using a package

Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com
Fri Jan 11 01:18:37 CET 2008


I'm not sure what you have done but using a package requires two steps:
1) installing or downloading the package, 
2) loading an installed package.

Since you are using windows you can click on Packages, Install packages, and
after choosing a CRAN mirror, selecting the package you want.  R will do the
rest and tell you that it has installed the package (which it apparently has
in your case).

Now click on Packages again and choose Load package.


Charles Annis, P.E.

Charles.Annis at StatisticalEngineering.com
phone: 561-352-9699
eFax:  614-455-3265
http://www.StatisticalEngineering.com
 

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of jpolo at mail.usf.edu
Sent: Thursday, January 10, 2008 7:07 PM
To: r-help at r-project.org
Subject: [R] installing and using a package

i'm trying to learn R. i have no programing experience. i tried to add on
a package and just picked "yags". i can't get it to work or get any help.

---
> install.packages("yags")
Warning in install.packages("yags") :
  argument 'lib' is missing: using 'C:\Documents and Settings\j\My
Documents/R/win-library/2.6'
trying URL
'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.6/yags_4.0-2.zip'
Content type 'application/zip' length 183779 bytes (179 Kb)
opened URL
downloaded 179 Kb

package 'yags' successfully unpacked and MD5 sums checked

The downloaded packages are in
        C:\Documents and Settings\j\Local
Settings\Temp\RtmpXGE7rd\downloaded_packages
updating HTML package descriptions
---

then i tried:

---
> help("yags")
No documentation for 'yags' in specified packages and libraries:
you could try 'help.search("yags")'
---

help.search doesn't help. when i type library() the result says:

---
Packages in library 'C:\Documents and Settings\j\My
Documents/R/win-library/2.6':

yags                          Yet Another GEE Solver

Packages in library 'C:/PROGRA~1/R/R-26~1.0/library':

base                          The R Base Package
boot                          Bootstrap R (S-Plus) Functions (Canty)
class                         Functions for Classification
cluster                       Cluster Analysis Extended Rousseeuw et al.
...
---

i've checked the Admin and Maint manual, but i'm stumped as to how to get
yags to actually work. i copied and pasted the example from the html file
in the yags folder and after every line that called yags, there was an
error message that said:
Error: could not find function "yags".

______________________________________________
R-help at 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.




More information about the R-help mailing list