Description Usage Arguments Details Value Author(s) See Also Examples

The function `lmap`

can be tweaked by various parameters determining the boundary of the interplolation. The function `boundary`

helps finding suitable parameters.

1 2 |

`points` |
Points, typically a two-column matrix with x and y coordinates. |

`density` |
Density of points below which there should be no interpolation. |

`grid` |
Density of the grid. |

`box.offset` |
Distance of the box around the points. |

`tightness` |
Parameter influencing how tightly the boundary should be wrapped around the points. Passed internally to kde2d. When |

`manual` |
Manually added boundary points in the form of a two-column matrix with coordinates. |

`plot` |
Logical: by default the impact of the chosen parameters is shown. If |

Instead of trying to use a polygon as a boundary for the interpolation internally in `lmap`

it turned out to be easier to use a collection of points that mark th

By default, returns a plot with the original points in black, the points below density in red, and the box around the points in blue. Contour lines of the density are shown to choose different density parameters.

When `plot = FALSE`

, the blue and red points from the graphic are returned as a two-column matrix of x and y coordinates.

Michael Cysouw <cysouw@mac.com>

Used internally in `lmap`

. The parameters of this function can be passed through, typically `density`

and `box.offset`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
data(hessen)
# show impact of the chosen parameters
boundary(hessen$villages, density = 0.1, grid = 20
, manual = cbind(x = c(8.3, 9.2), y = c(49.9, 50.0)))
# return coordinates
boundary(hessen$villages, plot = FALSE)
# abstract example, showing tightness in action
p <- cbind(c(1:10, 1:10), c(1:10, 10:1))
par(mfrow = c(1,3))
boundary(p, density = 0.005, grid = 20, tightness = "auto")
boundary(p, density = 0.005, grid = 20, tightness = 5)
boundary(p, density = 0.005, grid = 20, tightness = 3)
par(mfrow = c(1,1))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.