| topFreq | R Documentation |
This function returns the most frequent toponym substrings in countries or a polygon.
topFreq(countries, len, limit, ...)
countries |
character string vector with country designations (names or ISO-codes). |
len |
numeric. The length of the substring within toponyms. |
limit |
numeric. The number of the most frequent toponym substrings. |
... |
Additional parameters:
|
Parameter countries accepts all designations found in country(query = "country table").
Polygons passed through the polygon parameter need to intersect or be within a country specified by the countries parameter.
Parameter toponym_path accepts "pkgdir" for the package directory or a full, alternative path.
With toponymOptions(), users can specify the path for toponym and map data downloaded by this package across sessions. See help(toponymOptions).
The data used is downloaded by getData() and is accessible on the GeoNames download server.
A table with toponym substrings and their frequency.
## We recommend setting a persistent path for downloaded data by using toponymOptions()
## Users can always set the path manually when a function is used
## For illustration purposes,
## 1. the path is manually set each time
## 2. and wrapped in donttest because data will be downloaded in the following examples:
topFreq(
countries = "Ecuador",
len = 3,
limit = 10,
toponym_path = tempdir())
## returns the top 10 most frequent toponym endings
## of three-character length in Ecuador
topFreq(
countries = "GB",
len = 3,
limit = 10,
polygon = toponym::danelaw_polygon,
toponym_path = tempdir())
## returns the top 10 most frequent toponym endings
## in the polygon which is inside the United Kingdom.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.