| mapping.options | R Documentation |
Set or retrieve default values used in mapping functions availables in mapping package.
mapping.options(...)
... |
A single character vector, or a named list. The form |
The function change globally the option for the current R session, and locally if used in the mapping function, with the options argument, for example, options = mapping.options(legend.frame = FALSE, "title.position" = "left").
Many different options are used for the function in tmap package. For more details, look at tm_layout, tm_borders, and tm_fill.
Available options are the following:
palette.cont = "YlGnBu"palette for countinuous data
palette.cat = "Accent"palette for categorical data
palette.cont.vector = NULLa string vector with color names for countinuous data
palette.cont.vector = NULLa string vector with color names for categorical data
nclass = 5number of classes for countinuous data
check.unit.names = TRUEa ogical value indicating whether the input id names are checked before the link with the coordinates
use_cache = TRUEa ogical value indicating whether the cache is used to load the shape file
use_internet = TRUEa ogical value indicating whether the data are downloaded from internet or whether a internet connection is available
alpha = 1transparency
breaks = NULLa numerical value indicating the breaks
interval.closure = "left"a ogical value indicating where the interval are closed
labels = NULLa character vector with labels of the classes
NA.color = "grey"color for NA values
NA.text = "Missing"label for NA values
col.style = "order"type of color scale for numeric data. For other method look ad tm_fill
map.frame = TRUEa logical value indicating whether the frame is drawn
border.lwd = 1line width of the borders
border.col = "black"color of the borders
border.type = "solid"border type
border.alpha = NAtrasparency of the borders
title = NULLmain title
title.position = "center"main title position
title.color = "black"color of main title
title.fontface = 1main title font face
title.size = 1main title size
legend.title = NAtitle of the legend
legend.show = TRUEa logical value indicating whether include the legend
legend.only = FALSEa logical value indicating whether include the legend without map
legend.position = c("right","top")legend position
legend.digits = 5legend digits
legend.outside = FALSEa logical value indicating whether the legend is included outside the map
legend.outside.facetes = TRUE
a logical value indicating whether the legend is included outside the facetes
legend.width = 1width of the legend
legend.title.position = c("right","top")legend title position
legend.title.size = 1legend title size
legend.title.fontface = 1legend title font space
legend.title.color = "black"legend title color
legend.text.color = "black"legend title color
legend.text.size = 0.5legend title color size
legend.text.align = "left"legend.text.fontface = 1legend.frame = TRUEa logical value indicating whether the frame is drawn for the legend
legend.decimal.mark = "."legend.format = "fg"legend.big.mark = ","legend.text.separator = "-"facets.free.scale = FALSEfacetes.cols = NAfacetes.rows = NAinteractive.tiles = "CartoDB.Positron"interactive.popup.vars = NULLinteractive.popup.id = TRUEinteractive.popup.closeButton = TRUEinteractive.popup.width.max = 150interactive.popup.width.min = 35interactive.highlight.weight = 3interactive.highlight.color = "black"interactive.highlight.alpha = 1interactive.highlight.front = TRUEinteractive.control.collapse = TRUEinteractive.layer.control.position = c("left", "top")interactive.hovered.id = TRUEtext.size = 0.5text.col = "black"text.fontface = 1text.shadow = FALSEtext.alpha = NAcredits.source = NULLcredits.author = NULLcredits.size = 0.7credits.fontface = NAcredits.color = "black"credits.align = "left"credits.position = c("left", "bottom")popup.vars = NAa character vector indicating the variable to popoup in interactive maps
compass = NULLa character vector indicatin the type of compass (look at tm_layout)
style = "white"style (look at tm_style)
crs = NULLOptions may be reset using mapping.options().
Return a list with options.
Tennekes M (2018). “tmap: Thematic Maps in R.” _Journalstatisticaltical Software_, *84*(6), 1-39. doi: 10.18637/jss.v084.i06 (URL: https://doi.org/10.18637/jss.v084.i06).
mapping.options()
# A single options
mapping.options("title.position")
# Globally
mapping.options("title.position" = "left")
mapping.options("title.position")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.