Debian Codegraph @

man/tidy.map.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/maps.R
3 \name{tidy.map}
4 \alias{tidy.map}
5 \alias{maps_tidiers}
6 \title{Tidy a(n) map object}
7 \usage{
8 \method{tidy}{map}(x, ...)
9 }
10 \arguments{
11 \item{x}{A \code{map} object returned from \code{\link[maps:map]{maps::map()}}.}
12
13 \item{...}{Additional arguments. Not used. Needed to match generic
14 signature only. \strong{Cautionary note:} Misspelled arguments will be
15 absorbed in \code{...}, where they will be ignored. If the misspelled
16 argument has a default value, the default value will be used.
17 For example, if you pass \code{conf.lvel = 0.9}, all computation will
18 proceed using \code{conf.level = 0.95}. Two exceptions here are:
19 \itemize{
20 \item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if
21 it will be ignored.
22 \item \code{augment()} methods will warn when supplied a \code{newdata} argument if it
23 will be ignored.
24 }}
25 }
26 \description{
27 Tidy summarizes information about the components of a model.
28 A model component might be a single term in a regression, a single
29 hypothesis, a cluster, or a class. Exactly what tidy considers to be a
30 model component varies across models but is usually self-evident.
31 If a model has several distinct types of components, you will need to
32 specify which components to return.
33 }
34 \examples{
35 \dontshow{if (rlang::is_installed(c("maps", "ggplot2"))) withAutoprint(\{ # examplesIf}
36
37 # load libraries for models and data
38 library(maps)
39 library(ggplot2)
40
41 ca <- map("county", "ca", plot = FALSE, fill = TRUE)
42
43 tidy(ca)
44
45 qplot(long, lat, data = ca, geom = "polygon", group = group)
46
47 tx <- map("county", "texas", plot = FALSE, fill = TRUE)
48 tidy(tx)
49 qplot(long, lat,
50 data = tx, geom = "polygon", group = group,
51 colour = I("white")
52 )
53 \dontshow{\}) # examplesIf}
54 }
55 \seealso{
56 \code{\link[=tidy]{tidy()}}, \code{\link[maps:map]{maps::map()}}
57 }
58 \value{
59 A \code{\link[tibble:tibble]{tibble::tibble()}} with columns:
60 \item{term}{The name of the regression term.}
61 \item{long}{Longitude.}
62 \item{lat}{Latitude.}
63 Remaining columns give information on geographic attributes
64 and depend on the inputted map object. See ?maps::map for more information.
65 }