shapefile - gpclib 'non zero-exit' error despite installing R tools, rgeos, maptools -


this know common error gpclib feel i've tried lot of options , going around in circles. come against issue when using 'fortify' create data frame uk local authority shapefile, can create choropleth using ggplot2.

after trying install gpclib package in usual way tried install source:

install.packages("gpclib", type = "source") 

which says unsuccessfully unpacked 'error: compilation failed package 'gpclib'. read somewhere need have r tools installed tried no avail, same error. tried changing order in attach rgeos , maptools because apparently matters , didn't work.

my code dead simple , yet i'm @ brick wall in project.

are there other things try gpclib installed?

many in anticipation, code below. henry

install.packages("rgdal") library(rgdal) install.packages("maptools") library(maptools) install.packages("rgeos") library(rgeos) myshape <- readshapespatial("infuse_ward_lyr_2011.shp") myshape2 <- readshapespatial("infuse_dist_lyr_2011.shp") plot(myshape) plot(myshape2) install.packages("ggplot2") library(ggplot2) str(myshape2) myshape2frame <- fortify(myshape2, region="name") install.packages("gpclib", type = "source") library(gpclib) gpclibpermit() gpclibpermitstatus() 

for in future problem solved this.

i knew had install r tools didn't know it's essential have location of r tools in path.

i didn't want permanently set path did within r using:

pathrtools <- paste(c("c:\\rtools\\bin", "c:\\rtools\\mingw_64\\bin", "c:\\miktex\\miktex\\bin", "c:\\r\\bin\\i386", "c:\\windows", "c:\\windows\\system32"), collapse=";") sys.setenv(path=paste(pathrtools,sys.getenv("path"),sep=";")) 

please see following post details

install r package source, without changing path (windows)


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -