[R] Installing a package - and making it work?
Roger Bivand
Roger.Bivand at nhh.no
Fri Nov 3 11:32:44 CET 2006
On Fri, 3 Nov 2006, Torsten Hothorn wrote:
>
> On Fri, 3 Nov 2006, Hvidberg, Martin wrote:
>
> > Dear list
> >
> > - Propoerly a beginner question, so bare with my frustration...
> >
> > I tried install the 'shapefiles' package into R 2.4.0 but it seems that the install had little effect...
> >
> >
> > > install.packages(c("shapefiles"))
> > --- Please select a CRAN mirror for use in this session ---
> > trying URL 'http://cran.dk.r-project.org/bin/windows/contrib/2.4/shapefiles_0.5.zip'
> > Content type 'application/zip' length 42335 bytes
> > opened URL
> > downloaded 41Kb
> > package 'shapefiles' successfully unpacked and MD5 sums checked
> > The downloaded packages are in
> > C:\TEMP\RtmpMz5Pqb\downloaded_packages
> > updating HTML package descriptions
>
> library("shapefiles")
>
> > > dbf <- read.dbf("test.dbf")
> > Error: could not find function "read.dbf"
> > >
> >
> > Note thet the last line contains an error.
> >
> >
> > Is the package installed or not?
>
> yes. The book (package) is in the library (is is installed). But you need
> to take it from the shelf and open it to read (load it into R via
> `library("<pkgname>")').
Yes, rather a FAQ, and certainly the cause of the questioner's problem.
Perhaps reading sections 5.2 and 5.3 of the R FAQ? Or looking at the
Windows Packages menu a bit more carefully? Reading what sessionInfo()
says?
Roger
>
> Best wishes,
>
> Torsten
>
> > How do I get access to use the functionality it offers??
> >
> > :-? Martin Hvidberg
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch 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.
> >
> >
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-help
mailing list