[R] Installing a package - and making it work?

2006-11-03 Thread Hvidberg, Martin
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
  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?
How do I get access to use the functionality it offers??
 
:-? Martin Hvidberg

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] Installing a package - and making it work?

2006-11-03 Thread Torsten Hothorn

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)').

Best wishes,

Torsten

 How do I get access to use the functionality it offers??

 :-? Martin Hvidberg

   [[alternative HTML version deleted]]

 __
 R-help@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@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.


Re: [R] Installing a package - and making it work?

2006-11-03 Thread Roger Bivand
On Fri, 3 Nov 2006, Hvidberg, Martin wrote:

 Dear list
  
 - Propoerly a beginner question, so bare with my frustration...

Yes, and posting to R-help three minutes after posting to R-sig-geo, the 
correct list - raises the question about who's time is more important, 
doesn't it?

What does help.search(read.dbf) tell you? 

(hint: read.dbf() in shapefiles calls read.dbf() in the recommended 
foreign package, which is certainly already present in your (unstated) 
Windows binary R 2.4.0 installation.)

  
 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
 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?
 How do I get access to use the functionality it offers??
  
 :-? Martin Hvidberg
 
   [[alternative HTML version deleted]]
 
 __
 R-help@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: [EMAIL PROTECTED]

__
R-help@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.


Re: [R] Installing a package - and making it work?

2006-11-03 Thread Roger Bivand
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@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@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: [EMAIL PROTECTED]

__
R-help@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.