Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tmap_format

Get or add format options


Description

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.

Usage

tmap_format(format)

tmap_format_add(..., name)

Arguments

format

name of the format. Run tmap_format() to see the choices.

...

options from tm_layout or tm_view. Can also be a list of those options.

name

name of the new format.

Value

the function tmap_format() returns the names of the available formats. When format is defined, it returns the option list corresponding the that format.

See Also

tm_layout for predefined styles, tmap_style_catalogue to create a style catalogue of all available styles, and tmap_options for tmap options.

tmap_options for tmap options

Examples

# 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")

tmap

Thematic Maps

v3.3-1
GPL-3
Authors
Martijn Tennekes [aut, cre], Jakub Nowosad [ctb], Joel Gombin [ctb], Sebastian Jeworutzki [ctb], Kent Russell [ctb], Richard Zijdeman [ctb], John Clouse [ctb], Robin Lovelace [ctb], Jannes Muenchow [ctb]
Initial release
2021-03-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.