tmap_format | R Documentation |
Format options are tmap options that are shape dependent.
With tmap_format()
the predefined formats can be retrieved.
The values for a specific format can be retrieved with tmap_format(format)
,
where format is the name of the format. The function tmap_format_add()
is used to add a format.
tmap_format(format)
tmap_format_add(..., name)
format |
Name of the format. Run |
... |
Options from |
name |
Name of the new format. |
The function tmap_format()
returns the names of the available formats.
When format
is defined, it returns the option list corresponding the that format.
tm_layout()
for predefined styles
tmap_style_catalogue
(not migrated to v4 yet) to create a style catalogue of all available styles.
tmap_options()
for tmap options
# available formats
tmap_format()
# create option list to be used as a new format
World_small = tmap_format("World")
World_small$scale = 2
# add format
tmap_format_add(World_small, name = "World_small")
# observe that World_small is successfully added:
tmap_format()
data(World)
#qtm(World, fill="HPI", format="World_small")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.