Description Usage Arguments Details Value
Use this function to draw a choropleth on a human body map.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
mapping |
|
data |
data frame, like the type you'd feed into |
body_halves |
character string defining how to deal with body halves.
|
annotate |
|
bridge_side |
named list, specyfing the bridge from your laterality values
for each of the native values of |
bridge_loc |
named list specifying the bridge from your data format to the
native format of |
combine |
named list of vectors naming the regions to be combined and
mapped as one, e.g., |
controls |
named list of more specific parameters for fine-tuning the appereance of the humap. Currently, these controls are available (more will follow in the future):
|
type |
currently, only |
proj |
|
stat |
either |
na.rm |
logical indicating whether to remove missing data. Default is
|
show.legend, inherit.aes, ... |
passed on to the underlying machinery of the
|
The annotate
argument may be a named list
with any combination of the
following four elements:
details
: a character string, and may
be any of the valid values of the simple argument ("freq"
, "all"
,
NA
)
gp
: must be a gpar
object (see ?grid::gpar
). If
only gp
is specified, it is applied to both annotation text and lines.
gp_text
: must be a gpar
object, and is applied to annotation text.
gp_lines
: must be a gpar
object, and is applied to annotation lines
The bridge
argument allows you to use your own localisation values, and bridge
them to those of geom_body
. The idea is simple: you supply a named list
,
each element of which corresponds one region in the geom_body
map; the name of
the element should be the name of the region, and the element value a character vector
of values in your data that correspond to that region. See vignette [add reference to
vignette here] for examples.
If you want to combine several regions and map them as one, supply a named list
in combine
, following this logic: the name of each element will be printed as
the annotation text (if you so desire), and the element must be a character vector
specifying the names of geom_body
regions to map as one. Underscores in the
list element names will be converted to spaces. Make sure to not use a name for
a merged region that is already used for another region; e.g., this is not allowed,
because hand
is already the name of another region: list(hand =
c("shoulder", "arm", "elbow", "wrist"))
. You may, however, use a name of a region
inside the group, e.g., list(hand = c("wrist", "hand"))
.
A layer object to be added to a humap
object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.