Can you load up the gpclib package? If not perhaps you need to reinstall that?


>library(gpclib)

General Polygon Clipper Library for R (version 1.5-1)

Type 'class ? gpc.poly' for help


Cheers,


Simon



--------------------------------
Simon O'Hanlon, BSc MSc
Department of Infectious Disease Epidemiology
Imperial College London
St. Mary's Hospital
London
W2 1PG
________________________________
From: Manuel Spínola [mspinola10@gmail.com]
Sent: 19 July 2012 03:26
To: O'Hanlon, Simon J
Cc: r-sig-geo@r-project.org
Subject: Re: [R-sig-Geo] Help with gpclib

Thank you very much Simon,

I get (I don't know why):

> library(maptools)
Loading required package: foreign
Loading required package: sp
Loading required package: lattice
Checking rgeos availability: TRUE
> library(rgdal)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.9.0, released 2011/12/29
Path to GDAL shared files: /Library/Frameworks/R.framework/Versions/2.15/Resources/library/rgdal/gdal
Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
Path to PROJ.4 shared files: /Library/Frameworks/R.framework/Versions/2.15/Resources/library/rgdal/proj
> library(rgeos)
Loading required package: stringr
Loading required package: plyr
rgeos: (SVN revision 348)
 GEOS runtime version: 3.3.3-CAPI-1.7.4
 Polygon checking: TRUE

> gpclibPermitStatus()
[1] FALSE
> gpclibPermit()
[1] FALSE

2012/7/18 O'Hanlon, Simon J <simon.ohanlon@imperial.ac.uk<mailto:simon.ohanlon@imperial.ac.uk>>
Dear Manuel,
I am also running R2.15.1 on Mac OS X 10.7.

I get:
> library(maptools)
Loading required package: foreign
Loading required package: sp
Loading required package: lattice
Checking rgeos availability: TRUE
> library(rgdal)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.9.0, released 2011/12/29
Path to GDAL shared files: /Users/Simon/R64Libs/rgdal/gdal
Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
Path to PROJ.4 shared files: /Users/Simon/R64Libs/rgdal/proj
> library(rgeos)
Loading required package: stringr
Loading required package: plyr
rgeos: (SVN revision 348)
 GEOS runtime version: 3.3.3-CAPI-1.7.4
 Polygon checking: TRUE

> gpclibPermitStatus()
[1] FALSE
> gpclibPermit()
[1] TRUE

Perhaps you can try updating to the latest rgeos release? And maybe try updating your rgdal from the kyngchaos website (if it isn't already the latest version)?

HTH,

Simon
--------------------------------
Simon O'Hanlon, BSc MSc
Department of Infectious Disease Epidemiology
Imperial College London
St. Mary's Hospital
London
W2 1PG
________________________________________
From: r-sig-geo-bounces@r-project.org<mailto:r-sig-geo-bounces@r-project.org> [r-sig-geo-bounces@r-project.org<mailto:r-sig-geo-bounces@r-project.org>] on behalf of Manuel Spínola [mspinola10@gmail.com<mailto:mspinola10@gmail.com>]
Sent: 15 July 2012 16:02
To: r-sig-geo@r-project.org<mailto:r-sig-geo@r-project.org>
Subject: [R-sig-Geo] Help with gpclib

Dear list members,

I am running R 2.15.1 on a MAC OSX 10.7.

I receive an error message regarding gpclib (see below):

> library(rgdal)
> library(maptools)
> library(rgeos)
Loading required package: stringr
rgeos: (SVN revision 330)
 GEOS runtime version: 3.3.2-CAPI-1.7.2
 Polygon checking: TRUE
 WARNING! if you turn polygon checking off, and polygons are
 not valid in GEOS, you risk losing data as your R session may crash!

> indice <- readOGR(".", "indicesalud2007crtm")
OGR data source with driver: ESRI Shapefile
Source: ".", layer: "indicesalud2007crtm"
with 82 features and 27 fields
Feature type: wkbPolygon with 2 dimensions

> map <- fortify(indice)
Using NCANTON to define regions.
Error: gpclib, maptools package required for this functionality.  Please
install and try again.

> gpclibPermit()
[1] FALSE

Best,

Manuel


--
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspinola@una.ac.cr<mailto:mspinola@una.ac.cr>
mspinola10@gmail.com<mailto:mspinola10@gmail.com>
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río <https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>

        [[alternative HTML version deleted]]




--
Manuel Spínola, Ph.D.
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspinola@una.ac.cr<mailto:mspinola@una.ac.cr>
mspinola10@gmail.com<mailto:mspinola10@gmail.com>
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río<https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS<http://www.icomvis.una.ac.cr/>

	[[alternative HTML version deleted]]

