| topZtest | R Documentation |
This function applies a Z-test.
topZtest(strings, countries, polygon, ...)
strings |
character string with a regular expression to be tested. |
countries |
character string vector with country designations (names or ISO-codes). |
polygon |
data frame. Defines the polygon for comparison with the remainder of a country (or countries). |
... |
Additional parameter:
|
This function lets users apply a Z-test (two proportion test), comparing the frequency of a given string in a polygon to the frequency in the rest of the country.
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.
An object of class htest containing the results.
## 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 example:
topZtest("thorpe$",
"GB",
toponym::danelaw_polygon,
toponym_path = tempdir())
## returns an object of class htest containing the results.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.