Debian Codegraph @

man/sp2Mondrian.Rd

raw
1 \name{sp2Mondrian}
2 \alias{sp2Mondrian}
3 %- Also NEED an '\alias' for EACH other topic documented here.
4 \title{write map data for Mondrian}
5 \description{
6 The function outputs a SpatialPolygonsDataFrame object to be used by Mondrian
7 }
8 \usage{
9 sp2Mondrian(SP, file, new_format=TRUE)
10 }
11 %- maybe also 'usage' for other objects documented here.
12 \arguments{
13 \item{SP}{a SpatialPolygonsDataFrame object}
14 \item{file}{file where output is written}
15 \item{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)}
16 }
17
18
19 \references{\url{https://www.theusrus.de/Mondrian/}, Ihaka Lecture 1: 28 September 2023, Interactive Graphics and Data Analysis, Antony Unwin \url{https://www.auckland.ac.nz/en/science/about-the-faculty/department-of-statistics/ihaka-lecture-series.html}}
20 \author{Patrick Hausmann and Roger Bivand}
21 \note{
22 At this release, the function writes out a text file with both data and polygon(s) identified as belonging to each row of data.
23 }
24
25 \examples{
26 if (require("sf", quietly=TRUE)) {
27 td <- tempdir()
28 xx <- as(sf::st_read(system.file("shape/nc.shp", package="sf")[1], quiet=TRUE), "Spatial")
29 sp2Mondrian(xx, file=file.path(td, "sids1.txt"))
30 }
31 }
32 \keyword{spatial}