rgdal on MAC
Yeah, Roger. That was amazing, works like a charm.
I almost believe that I couldn't open my counties shape on R. Thanks
for prompt help.
brasil <- readOGR("/Users/daniel/bases/maps/Brasil/55mu2500gsr.shp",
"55mu2500gsr", input_field_name_encoding="iso-8859-1")
OGR data source with driver: ESRI Shapefile
Source: "/Users/daniel/bases/maps/Brasil/55mu2500gsr.shp", layer: "55mu2500gsr"
with 5566 features and 9 fields
Feature type: wkbPolygon with 2 dimensions
for(i in 1:length(names(brasil))) {
+ if (class(brasil[[i]]) == "factor") {
+ brasil[[i]] <- factor(iconv(brasil[[i]], from="latin1", to="utf-8"))
+ }
+ }
plot(brasil)
Daniel
On Wed, May 19, 2010 at 5:16 AM, Roger Bivand <Roger.Bivand at nhh.no> wrote:
On Wed, 19 May 2010, steven mosher wrote:
On Cran it indicates that the package is not available on MAC (OSX 10.5.8) Is that the whole story? Is it a situation that will change or am I missing something. I've left a similar Q on the Mac Sig, but havent ?got any feedback
It is always possible to use the instructions on the CRAN page under SystemRequirements: - that is install the external dependencies, for example using Kyngchaos' frameworks, and install from source, or from an OSX binary rgdal package at the same site. This probably gives a larger set of drivers. For those who prefer a Leopard-style binary with the same minimal set of drivers that we have on CRAN for Win32 and Win64: I can with pleasure thank Brian Ripley for making both 32-bit and 64-bit Intel versions available on CRAN extras - on OSX use:
setRepositories(ind=1:2)
install.packages('rgdal')
Please report back on whether this advice was helpful. Roger
? ? ? ?[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
-- 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
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo