Last chance! 50% off unlimited learning
Sale ends in
The function outputs a SpatialPolygonsDataFrame object to be used by Mondrian
sp2Mondrian(SP, file, new_format=TRUE)
a SpatialPolygonsDataFrame object
file where output is written
default TRUE, creates a text data file and a separate map file; the old format put both data sets in a single file - the map file is named by inserting "MAP_" into the file= argument after the rightmost directory separator (if any)
Patrick Hausmann and Roger Bivand
if (FALSE) {
td <- tempdir()
xx <- readShapePoly(system.file("shapes/columbus.shp", package="maptools")[1])
sp2Mondrian(xx, file=file.path(td, "columbus1.txt"))
xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1])
sp2Mondrian(xx, file=file.path(td, "sids1.txt"))
}
Run the code above in your browser using DataLab