Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sp2Mondrian

write map data for Mondrian


Description

The function outputs a SpatialPolygonsDataFrame object to be used by Mondrian

Usage

sp2Mondrian(SP, file, new_format=TRUE)

Arguments

SP

a SpatialPolygonsDataFrame object

file

file where output is written

new_format

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)

Note

At this release, the function writes out a text file with both data and polygon(s) identified as belonging to each row of data.

Author(s)

Patrick Hausmann and Roger Bivand

References

Examples

## Not run: 
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"))

## End(Not run)

maptools

Tools for Handling Spatial Objects

v1.1-1
GPL (>= 2)
Authors
Roger Bivand [cre, aut] (<https://orcid.org/0000-0003-2392-6140>), Nicholas Lewin-Koh [aut], Edzer Pebesma [ctb], Eric Archer [ctb], Adrian Baddeley [ctb], Nick Bearman [ctb], Hans-Jörg Bibiko [ctb], Steven Brey [ctb], Jonathan Callahan [ctb], German Carrillo [ctb], Stéphane Dray [ctb], David Forrest [ctb], Michael Friendly [ctb], Patrick Giraudoux [ctb], Duncan Golicher [ctb], Virgilio Gómez Rubio [ctb], Patrick Hausmann [ctb], Karl Ove Hufthammer [ctb], Thomas Jagger [ctb], Kent Johnson [ctb], Matthew Lewis [ctb] (<https://orcid.org/0000-0003-2244-4078>), Sebastian Luque [ctb], Don MacQueen [ctb], Andrew Niccolai [ctb], Edzer Pebesma [ctb], Oscar Perpiñán Lamigueiro [ctb], Ethan Plunkett [ctb], Ege Rubak [ctb] (<https://orcid.org/0000-0002-6675-533X>), Tom Short [ctb], Greg Snow [ctb], Ben Stabler [ctb], Murray Stokely [ctb], Rolf Turner [ctb]
Initial release
2021-03-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.