diff --git a/DESCRIPTION b/DESCRIPTION
index 667366ffd..e2a307f48 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -12,7 +12,8 @@ Authors@R: c(
person("Richard", "Zijdeman", email = "richard.zijdeman@iisg.nl", role = "ctb"),
person("John", "Clouse", email = "johnaclouse@gmail.com", role = "ctb"),
person("Robin", "Lovelace", email = "rob00x@gmail.com", role = "ctb"),
- person("Jannes", "Muenchow", email = "jannes.muenchow@uni-jena.de", role = "ctb")
+ person("Jannes", "Muenchow", email = "jannes.muenchow@uni-jena.de", role = "ctb"),
+ person("Olivier", "Roy", role = "ctb")
)
Description: Thematic maps are geographical maps in which spatial data distributions are visualized. This package offers a flexible, layer-based, and easy to use approach to create thematic maps, such as choropleths and bubble maps.
Version: 4.0
@@ -22,8 +23,8 @@ Depends:
R (>= 3.5.0),
methods
Imports:
- data.table,
- tmaptools (>= 3.1),
+ data.table,
+ tmaptools (>= 3.1),
sf (>= 0.9-3),
stars (>= 0.4-2),
units (>= 0.6-1),
@@ -66,4 +67,5 @@ VignetteBuilder: knitr
RoxygenNote: 7.2.3
Config/Needs/check: Nowosad/spDataLarge, lwgeom
Config/Needs/coverage: Nowosad/spDataLarge, lwgeom
+Roxygen: list(markdown = TRUE)
Config/testthat/edition: 3
diff --git a/NEWS.md b/NEWS.md
index e12e46792..ff5f9b59c 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,48 +1,50 @@
+# tmap 4.0
+
# tmap 3.3-4
- (!) last version of tmap 3.x. Next CRAN version will be tmap 4.x (release planned at the end of 2023)
- fixed bug (some stars appeared upside down in plot mode)
- fixed newly introduced shiny bug (#767)
# tmap 3.3-3
-- added device to tmap_save
+- added device to `tmap_save()`
- fixed many small bugs (see github issue list)
# tmap 3.3-2
-- World has been fixed (it is now 's2' proof, see github issue #564)
+- `World`s has been fixed (it is now 's2' proof, see github issue #564)
# tmap 3.3-1
- fixed view titles
-- added html.escape to popup.format to control whether html code is escaped in view popups
+- added html.escape to `popup.format` to control whether html code is escaped in view popups
- fixed many small bugs (see github issue list)
# tmap 3.3
-- tmap_grob added, which exports tmap plots to grob objects (grid package)
-- SpatRaster objects (terra package) supported
+- `tmap_grob()` added, which exports tmap plots to grob objects (grid package)
+- `SpatRaster` objects (terra package) supported
- fixed many small bugs (see github issue list)
# tmap 3.2
-- tmap_animation improved: now using av and gifski under the hood; added progress bar; lists of tmap objects supported; improved default settings
-- improved tmapOutput; it now works with reactive shiny objects
-- improved internally used margins; also small exported maps look good (see example tmap_save)
-- improved tmap_design_mode; tmap.design.mode is now a global option (and not a tmap option anymore)
-- reexported providers from leafet
-- added show.warnings to tmap_options
-- added "width" argument to tm_credits
-- tm_text improved: added "id" argument, and tm_remove_layer can be applied to it
+- `tmap_animation()` improved: now using av and gifski under the hood; added progress bar; lists of tmap objects supported; improved default settings
+- improved `tmapOutput()`; it now works with reactive shiny objects
+- improved internally used margins; also small exported maps look good (see example `tmap_save()`)
+- improved `tmap_design_mode()`; tmap.design.mode is now a global option (and not a tmap option anymore)
+- reexported providers from `leafet`
+- added `show.warnings` to `tmap_options()`
+- added `width` argument to `tm_credits()`
+- `tm_text()` improved: added "id" argument, and `tm_remove_layer()` can be applied to it
# tmap 3.1
-- interactive maps in origin CRS working: tmap_options(projection = 0, basemaps = NULL)
-- added tm_mouse_coordinates() to show mouse coordinates in view mode
-- added tmap_design_mode() to toggle the desgin mode.
+- interactive maps in origin CRS working: `tmap_options(projection = 0, basemaps = NULL)`
+- added `tm_mouse_coordinates()` to show mouse coordinates in view mode
+- added `tmap_design_mode()` to toggle the design mode.
- made backgrond symbol grob shapes transparent
-- added in.iframe and selfcontained to tmap_save
-- improved tm_add_legend: added type = "title" for title only legend elements
-- added ttmp() which shows the last map in the other mode.
+- added in.iframe and `selfcontained` to `tmap_save()`
+- improved `tm_add_legend()`: added `type = "title"` for title only legend elements
+- added `ttmp()` which shows the last map in the other mode.
- fixed many small bugs (see github issue list)
# tmap 3.0
- [!] spatial rasters/arrays now implemented using the stars package (instead of the raster package)
-- as.count argument added to layer functions; numeric variables can be treated as count variables (integers)
+- `as.count` argument added to layer functions; numeric variables can be treated as count variables (integers)
- drop.levels argument added to layer functions which allows to drop unused levels
- new style added for color classes: "dpih" and "headtails"; also added style.args to pass on arguments to classIntervals
- grid labels specification per axis
@@ -56,23 +58,23 @@
# tmap 2.3-1
- improved popups in view mode
-- added validity checks for sf objects
+- added validity checks for `sf` objects
- minor bugs fixed: see github issue list
# tmap 2.3
-- [!] shiny integration: added tmapOutput, renderTmap, tmapProxy, and, tm_remove_layer
-- improved tmap_save (regarding default values)
-- improved tm_rgb (added r g b and max.value arguments)
-- added tm_graticules
+- [!] shiny integration: added `tmapOutput()`, `renderTmap()`, `tmapProxy()`, and, `tm_remove_layer()`
+- improved `tmap_save()` (regarding default values)
+- improved `tm_rgb()` (added r g b and max.value arguments)
+- added `tm_graticules()`
- supported TMS servers
-- in view mode, layers can be hidden from the legend with group = NULL
-- replaced mapview by leafsync
+- in view mode, layers can be hidden from the legend with `group = NULL`
+- replaced `mapview` by `leafsync`
- minor bugs fixed: see github issue list
# tmap 2.2
-- improved tm_rgb
+- improved `tm_rgb()`
- improved breaks in interactive maps
-- added bbox argument to qtm
+- added `bbox` argument to `qtm()`
- improved projection shortcut codes (using EPSG database)
- fixed several bugs (see github)
@@ -84,20 +86,20 @@
- made rasters in view mode faster
- bug fixed for geometry collection objects without data in view mode
- improved handling of manual palettes
-- tmap_arrange can take a list of tmap objects
+- `tmap_arrange()` can take a list of tmap objects
# tmap 2.0
- [!] tmap migrated from sp to sf. sp objects are still supported, but all internal functions are based on sf
- [!] added tm_sf which draws sf objects
- [!] renamed all xxx_tmap functions (e.g. save_tmap) to tmap_xxx for consistency
-- [!] added tm_basemap and tm_tiles: now, multiple (overlay) tiled maps can be shown
-- [!] rearranged tmap options, styles and formats. See tmap_options, tmap_style, tmap_format, tm_style and tm_format
-- [!] added filter argument to tm_shape and added colorNULL to layer functions
-- added tm_minimap
+- [!] added `tm_basemap()` and `tm_tiles()`: now, multiple (overlay) tiled maps can be shown
+- [!] rearranged tmap options, styles and formats. See `tmap_options()`, `tmap_style()`, `tmap_format()`, `tm_style()` and `tm_format()`
+- [!] added `filter` argument to `tm_shape()` and added `colorNULL` to layer functions
+- added `tm_minimap()`
- added remove.NA.facets to tm_facets
- units data columns are supported
- tmap_animation enhanced with loop options
-- added tmap_tips()
+- added `tmap_tips()`
- all changes are backwards compatible with 1.11-2
- vignettes rewritten, including a vignette that describes the changes of 2.0
@@ -105,7 +107,7 @@
- added references to JSS paper (including citation)
# tmap 1.11-1
-- fixed bug in labels argument of tm_fill
+- fixed bug in labels argument of `tm_fill()`
- fixed bug regarding legend symbols in facets with free scales
- fixed bug in rasters in view mode
- improved popup width in view mode
@@ -153,11 +155,11 @@
- [!] tm_symbols added, to create proportional symbol maps: besides bubbles, it also supports other symbol shapes, png icons, and small ggplot2 plots
- [!] imported cartogram function from cartogram package (tnx Sebastian!)
- [!] reverse geocoding function rev_geocode_OSM added
-- [!] tm_logo added
+- [!] `tm_logo()` added
- added popup.vars to base layer functions
- bounding box (argument bbox in tm_shape) working in view mode
- geocode_OSM improved: a SpatialPointsDataFrame can now be returned
-- last_map added, which retrieves the last produced map
+- `last_tmap()` added, which retrieves the last produced map
- crop_shape can also handle polygons as cropping area
- append_data improved; the under and over coverage information can be retrieved with under_coverage and over_coverage
- interpolate parameter added to tm_rasters
@@ -253,6 +255,6 @@
# tmap 0.6
- this is the the first CRAN version
-- a newer version may be available on https://github.com/mtennekes/tmap
+- a newer version may be available on https://github.com/r-tmap/tmap
- to get started, see the package vignette 'tmap in a nutshell' and the help files
- if you have any questions or suggestions, please contact me (mtennekes at gmail dot com)
diff --git a/R/data.R b/R/data.R
index dee2ff8fa..e291ddb58 100644
--- a/R/data.R
+++ b/R/data.R
@@ -1,69 +1,55 @@
#' World and Netherlands map
#'
-#' Maps of the world and the Netherlands (province and municipality level), class \code{\link[sf:sf]{sf}}
+#' Maps of the world and the Netherlands (province and municipality level), class [`sf`][`sf::sf`]
#'
-#' The default projections for these maps are Eckhart IV (World) and Rijksdriehoekstelsel (Netherlands). See below. The projection can be changed temporarily for plotting purposes by using the projection argument of \code{\link{tm_shape}}.
+#' The default projections for these maps are Eckhart IV (World) and Rijksdriehoekstelsel (Netherlands). See below. The projection can be changed temporarily for plotting purposes by using the projection argument of [tm_shape()].
#'
-#' \code{World} World map. The default projection for this world map is Eckhart IV since area sizes are preserved, which is a very important property for choropleths.
+#' `World` World map. The default projection for this world map is Eckhart IV since area sizes are preserved, which is a very important property for choropleths.
#'
-#' \code{NLD_prov} and \code{NLD_muni}, maps of the Netherlands at province and municipality level of 2013. The used projection is the Rijksdriehoekstelsel projection. \strong{Important:} publication of these maps is only allowed when cited to Statistics Netherlands (CBS) and Kadaster Nederland as source.
+#' `NLD_prov` and `NLD_muni`, maps of the Netherlands at province and municipality level of 2013. The used projection is the Rijksdriehoekstelsel projection.
+#'
+#' **Important:** publication of these maps is only allowed when citing Statistics Netherlands (CBS) and Kadaster Nederland as source.
#'
-#' @usage data(World)
-#' @name World
#' @rdname Shapes
-#' @docType data
-#' @source \url{https://www.naturalearthdata.com/} for \code{World}
-#' @source \url{https://happyplanetindex.org/} for \code{World}
-#' @source \url{https://www.cbs.nl/} for \code{NLD_prov} and \code{NLD_muni}.
-#' @references Statistics Netherlands (2014), The Hague/Heerlen, Netherlands, \url{https://www.cbs.nl/}.
-#' @references Kadaster, the Netherlands' Cadastre, Land Registry, and Mapping Agency (2014), Apeldoorn, Netherlands, \url{https://www.kadaster.nl/}.
-NULL
+#' @format NULL
+#' @source for `World`
+#' @source for `World`
+#' @source for `NLD_prov` and `NLD_muni`.
+#' @references Statistics Netherlands (2014), The Hague/Heerlen, Netherlands, .
+#' @references Kadaster, the Netherlands' Cadastre, Land Registry, and Mapping Agency (2014), Apeldoorn, Netherlands, .
+"World"
-#' @usage data(NLD_prov)
-#' @name NLD_prov
#' @rdname Shapes
-#' @docType data
-NULL
+#' @format NULL
+
+"NLD_prov"
-#' @usage data(NLD_muni)
-#' @name NLD_muni
#' @rdname Shapes
-#' @docType data
-NULL
+#' @format NULL
+"NLD_muni"
#' Spatial data of rivers
#'
-#' Spatial data of rivers, of class \code{\link[sf:sf]{sf}}
-#'
-#' @usage data(rivers)
-#' @name rivers
-#' @docType data
-#' @source \url{https://www.naturalearthdata.com}
-NULL
+#' @source
+"rivers"
#' Spatial data of metropolitan areas
#'
-#' Spatial data of metropolitan areas, of class \code{\link[sf:sf]{sf}}. The data includes a population times series from 1950 to (forecasted) 2030. All metro areas with over 1 million inhabitants in 2010 are included.
+#' `metro` includes a population time series from 1950 to (forecasted) 2030. All metro areas with over 1 million inhabitants in 2010 are included.
#'
-#' @usage data(metro)
-#' @name metro
-#' @docType data
#' @references United Nations, Department of Economic and Social Affairs, Population Division (2014). World Urbanization Prospects: The 2014 Revision, CD-ROM Edition.
-#' @source \url{https://population.un.org/wup/}
-NULL
+#' @source
+"metro"
#' Spatial data of global land cover
#'
-#' Spatial data of global land cover, percent tree cover, and elevation of class \code{\link[stars:st_as_stars]{stars}}.
+#' Spatial data of global land cover, percent tree cover, and elevation of class [`stars`][stars::st_as_stars()].
#' Two attributes in this object relates to global land cover.
#' The cover layer classifies the status of land cover of the whole globe into 20 categories, while
#' the cover_cls layer uses 8 simplified categories.
#' Percent Tree Cover (trees) represents the density of trees on the ground, and the last attribute represents elevation.
#'
-#' \strong{Important:} publication of these maps is only allowed when cited to Tateishi et al. (2014), and when "Geospatial Information Authority of Japan, Chiba University and collaborating organizations." is shown.
+#' **Important:** publication of these maps is only allowed when cited to Tateishi et al. (2014), and when "Geospatial Information Authority of Japan, Chiba University and collaborating organizations." is shown.
#'
-#' @usage data(land)
-#' @name land
-#' @docType data
#' @references Production of Global Land Cover Data - GLCNMO2008, Tateishi, R., Thanh Hoan, N., Kobayashi, T., Alsaaideh, B., Tana, G., Xuan Phong, D. (2014), Journal of Geography and Geology, 6 (3).
-NULL
+"land"
diff --git a/R/pkg.R b/R/pkg.R
index 0977714ed..98fd110ca 100644
--- a/R/pkg.R
+++ b/R/pkg.R
@@ -2,109 +2,109 @@
#'
#' Thematic maps are geographical maps in which spatial data distributions are visualized. This package offers a flexible, layer-based, and easy to use approach to create thematic maps, such as choropleths and bubble maps. It is based on the grammar of graphics, and resembles the syntax of ggplot2.
#'
-#' This page provides a brief overview of all package functions. See \href{../doc/tmap-getstarted.html}{\code{vignette("tmap-getstarted")}} for a short introduction with examples.
+#' This page provides a brief overview of all package functions. See `vignette("tmap_sneek_peek")` for a short introduction with examples.
#'
#' @section Quick plotting method:
#' \tabular{ll}{
-#' \code{\link{qtm}}\tab Plot a thematic map \cr
-#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+#' [qtm()]\tab Plot a thematic map \cr
+#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' @section Main plotting method:
#' Shape specification:
#' \tabular{ll}{
-#' \code{\link{tm_shape}}\tab Specify a shape object \cr
-#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+#' [tm_shape()]\tab Specify a shape object \cr
+#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' Aesthetics base layers:
#' \tabular{ll}{
-#' \code{\link{tm_polygons}}\tab Create a polygon layer (with borders) \cr
-#' \code{\link{tm_symbols}}\tab Create a layer of symbols \cr
-#' \code{\link{tm_lines}}\tab Create a layer of lines \cr
-#' \code{\link{tm_raster}}\tab Create a raster layer \cr
-#' \code{\link{tm_text}}\tab Create a layer of text labels \cr
-#' \code{\link{tm_basemap}}\tab Create a layer of basemap tiles \cr
-#' \code{\link{tm_tiles}}\tab Create a layer of overlay tiles \cr
+#' [tm_polygons()]\tab Create a polygon layer (with borders) \cr
+#' [tm_symbols()]\tab Create a layer of symbols \cr
+#' [tm_lines()]\tab Create a layer of lines \cr
+#' [tm_raster()]\tab Create a raster layer \cr
+#' [tm_text()]\tab Create a layer of text labels \cr
+#' [tm_basemap()]\tab Create a layer of basemap tiles \cr
+#' [tm_tiles()]\tab Create a layer of overlay tiles \cr
#' }
#'
#' Aesthetics derived layers:
#' \tabular{ll}{
-#' \code{\link{tm_fill}}\tab Create a polygon layer (without borders) \cr
-#' \code{\link{tm_borders}}\tab Create polygon borders \cr
-#' \code{\link{tm_bubbles}}\tab Create a layer of bubbles \cr
-#' \code{\link{tm_squares}}\tab Create a layer of squares \cr
-#' \code{\link{tm_dots}}\tab Create a layer of dots \cr
-#' \code{\link{tm_markers}}\tab Create a layer of markers \cr
-#' \code{\link{tm_iso}}\tab Create a layer of iso/contour lines \cr
-#' \code{\link{tm_rgb}}\tab Create a raster layer of an image \cr
-#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+#' [tm_fill()]\tab Create a polygon layer (without borders) \cr
+#' [tm_borders()]\tab Create polygon borders \cr
+#' [tm_bubbles()]\tab Create a layer of bubbles \cr
+#' [tm_squares()]\tab Create a layer of squares \cr
+#' [tm_dots()]\tab Create a layer of dots \cr
+#' [tm_markers()]\tab Create a layer of markers \cr
+#' [tm_iso()]\tab Create a layer of iso/contour lines \cr
+#' [tm_rgb()]\tab Create a raster layer of an image \cr
+#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' Faceting (small multiples)
#' \tabular{ll}{
-#' \code{\link{tm_facets}}\tab Define facets \cr
-#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+#' [tm_facets()]\tab Define facets \cr
+#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' Attributes:
#' \tabular{ll}{
-#' \code{\link{tm_grid}}\tab Create grid lines \cr
-#' \code{\link{tm_scale_bar}}\tab Create a scale bar \cr
-#' \code{\link{tm_compass}}\tab Create a map compass \cr
-#' \code{\link{tm_credits}}\tab Create a text for credits \cr
-#' \code{\link{tm_logo}}\tab Create a logo \cr
-#' \code{\link{tm_xlab} and \link{tm_ylab}}\tab Create axis labels \cr
-#' \code{\link{tm_minimap}}\tab Create a minimap (view mode only) \cr
-#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+#' [tm_grid()]\tab Create grid lines \cr
+#' [tm_scale_bar()]\tab Create a scale bar \cr
+#' [tm_compass()]\tab Create a map compass \cr
+#' [tm_credits()]\tab Create a text for credits \cr
+#' [tm_logo()]\tab Create a logo \cr
+#' [tm_xlab()] and [tm_ylab()]\tab Create axis labels \cr
+#' [tm_minimap()]\tab Create a minimap (view mode only) \cr
+#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' Layout element:
#' \tabular{ll}{
-#' \code{\link{tm_layout}}\tab Adjust the layout (main function)\cr
-#' \code{\link{tm_legend}}\tab Adjust the legend \cr
-#' \code{\link{tm_view}}\tab Configure the interactive view mode \cr
-#' \code{\link{tm_style}}\tab Apply a predefined style \cr
-#' \code{\link{tm_format}}\tab Apply a predefined format \cr
-#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+#' [tm_layout()]\tab Adjust the layout (main function)\cr
+#' [tm_legend()]\tab Adjust the legend \cr
+#' [tm_view()]\tab Configure the interactive view mode \cr
+#' [tm_style()]\tab Apply a predefined style \cr
+#' [tm_format()]\tab Apply a predefined format \cr
+#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' Change options:
#' \tabular{ll}{
-#' \code{\link{tmap_mode}}\tab Set the tmap mode: \code{"plot"} or \code{"view"}\cr
-#' \code{\link{ttm}}\tab Toggle between the modes \cr
-#' \code{\link{tmap_options}}\tab Set global tmap options (from \code{\link{tm_layout}}, \code{\link{tm_view}}, and a couple of others) \cr
-#' \code{\link{tmap_style}}\tab Set the default style \cr
-#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+#' [tmap_mode()]\tab Set the tmap mode: `"plot"` or `"view"`\cr
+#' [ttm()]\tab Toggle between the modes \cr
+#' [tmap_options()]\tab Set global tmap options (from [tm_layout()], [tm_view()], and a couple of others) \cr
+#' [tmap_style()]\tab Set the default style \cr
+#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' Create icons:
#' \tabular{ll}{
-#' \code{\link{tmap_icons}}\tab Specify icons for markers or proportional symbols \cr
-#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+#' [tmap_icons()]\tab Specify icons for markers or proportional symbols \cr
+#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#'
#' @section Output functions:
#' \tabular{ll}{
-#' \code{\link{print}}\tab Plot in graphics device or view interactively in web browser or RStudio's viewer pane \cr
-#' \code{\link{tmap_last}}\tab Redraw the last map \cr
-#' \code{\link{tmap_leaflet}}\tab Obtain a leaflet widget object \cr
-#' \code{\link{tmap_animation}}\tab Create an animation \cr
-#' \code{\link{tmap_arrange}}\tab Create small multiples of separate maps \cr
-#' \code{\link{tmap_save}}\tab Save thematic maps (either as image or HTML file) \cr
-#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+#' [print()]\tab Plot in graphics device or view interactively in web browser or RStudio's viewer pane \cr
+#' [tmap_last()]\tab Redraw the last map \cr
+#' [tmap_leaflet()]\tab Obtain a leaflet widget object \cr
+#' [tmap_animation()]\tab Create an animation \cr
+#' [tmap_arrange()]\tab Create small multiples of separate maps \cr
+#' [tmap_save()]\tab Save thematic maps (either as image or HTML file) \cr
+#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' @section Spatial datasets:
#' \tabular{ll}{
-#' \code{\link{World}}\tab World country data (\code{\link[sf:sf]{sf}} object of polygons) \cr
-#' \code{\link{NLD_prov}}\tab Netherlands province data (\code{\link[sf:sf]{sf}} object of polygons) \cr
-#' \code{\link{NLD_muni}}\tab Netherlands municipal data (\code{\link[sf:sf]{sf}} object of polygons) \cr
-#' \code{\link{metro}}\tab Metropolitan areas (\code{\link[sf:sf]{sf}} object of points) \cr
-#' \code{\link{rivers}}\tab Rivers (\code{\link[sf:sf]{sf}} object of lines) \cr
-#' \code{\link{land}}\tab Global land cover (\code{\link[stars:st_as_stars]{stars}} object)\cr
-#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+#' [`World`]\tab World country data ([`sf`][`sf::sf`] object of polygons) \cr
+#' [`NLD_prov`]\tab Netherlands province data ([`sf`][`sf::sf`] object of polygons) \cr
+#' [`NLD_muni`]\tab Netherlands municipal data ([`sf`][`sf::sf`] object of polygons) \cr
+#' [`metro`]\tab Metropolitan areas ([`sf`][`sf::sf`] object of points) \cr
+#' [`rivers`]\tab Rivers ([`sf`][`sf::sf`] object of lines) \cr
+#' [`land`]\tab Global land cover ([`stars`][stars::st_as_stars()] object)\cr
+#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' @author Martijn Tennekes \email{mtennekes@@gmail.com}
@@ -113,6 +113,6 @@
#' @concept statistical maps
#' @concept choropleth
#' @concept bubble map
-#' @seealso \href{../doc/tmap-getstarted.html}{\code{vignette("tmap-getstarted")}}
+#' @seealso `vignette("tmap_sneek_peek")`,
#' @references Tennekes, M., 2018, {tmap}: Thematic Maps in {R}, Journal of Statistical Software, 84(6), 1-39, \doi{10.18637/jss.v084.i06}
"_PACKAGE"
diff --git a/R/print.R b/R/print.R
index 79f3e7f55..c9a27386c 100644
--- a/R/print.R
+++ b/R/print.R
@@ -5,7 +5,7 @@
#' @param x tmap object.
#' @param return.asp should the aspect ratio be returned?
#' @param show show the map
-#' @param vp viewport (for \code{"plot"} mode)
+#' @param vp viewport (for `"plot"` mode)
#' @param ... not used
#' @export
#' @method print tmap
diff --git a/R/qtm.R b/R/qtm.R
index 64bbc3654..5e05019ec 100644
--- a/R/qtm.R
+++ b/R/qtm.R
@@ -1,34 +1,34 @@
#' Quick thematic map plot
#'
-#' Draw a thematic map quickly. This function is a convenient wrapper of the main plotting method of stacking \code{\link{tmap-element}}s. Without arguments or with a search term, this functions draws an interactive map.
+#' Draw a thematic map quickly. This function is a convenient wrapper of the main plotting method of stacking [tmap-element()]s. Without arguments or with a search term, this functions draws an interactive map.
#'
-#' The first argument is a shape object (normally specified by \code{\link{tm_shape}}). The next arguments, from \code{fill} to \code{raster}, are the aesthetics from the main layers. The remaining arguments are related to the map layout. Any argument from any main layer function, such as \code{\link{tm_polygons}}, can be specified (see \code{...}). It is also possible to stack \code{\link{tmap-element}}s on a \code{qtm} plot. See examples.
+#' The first argument is a shape object (normally specified by [tm_shape()]). The next arguments, from `fill` to `raster`, are the aesthetics from the main layers. The remaining arguments are related to the map layout. Any argument from any main layer function, such as [tm_polygons()], can be specified (see `...`). It is also possible to stack [tmap-element()]s on a `qtm` plot. See examples.
#'
-#' By default, a scale bar is shown. This option can be set with \code{\link{tmap_options}} (argument \code{qtm.scalebar}). A minimap is shown by default when \code{qtm} is called without arguments of with a search term. This option can be set with \code{\link{tmap_options}} (argument \code{qtm.minimap}).
+#' By default, a scale bar is shown. This option can be set with [tmap_options()] (argument `qtm.scalebar`). A minimap is shown by default when `qtm` is called without arguments of with a search term. This option can be set with [tmap_options()] (argument `qtm.minimap`).
#'
#' @param shp One of
#' \itemize{
-#' \item shape object, which is an object from a class defined by the \code{\link[sf:sf]{sf}} or \code{\link[stars:st_as_stars]{stars}} package. Objects from the packages \code{sp} and \code{raster} are also supported, but discouraged.
-#' \item Not specified, i.e. \code{qtm()} is executed. In this case a plain interactive map is shown.
-#' \item A OSM search string, e.g. \code{qtm("Amsterdam")}. In this case a plain interactive map is shown positioned according to the results of the search query (from OpenStreetMap nominatim)
+#' \item shape object, which is an object from a class defined by the [`sf`][`sf::sf`] or [`stars`][stars::st_as_stars()] package. Objects from the packages `sp` and `raster` are also supported, but discouraged.
+#' \item Not specified, i.e. `qtm()` is executed. In this case a plain interactive map is shown.
+#' \item A OSM search string, e.g. `qtm("Amsterdam")`. In this case a plain interactive map is shown positioned according to the results of the search query (from OpenStreetMap nominatim)
#' }
#' @param fill,col,size,shape,lwd,lty,fill_alpha,col_alpha Visual variables.
-#' @param by data variable name by which the data is split, or a vector of two variable names to split the data by two variables (where the first is used for the rows and the second for the columns). See also \code{\link{tm_facets}}
-#' @param scale numeric value that serves as the global scale parameter. All font sizes, symbol sizes, border widths, and line widths are controlled by this value. The parameters \code{symbols.size}, \code{text.size}, and \code{lines.lwd} can be scaled seperately with respectively \code{symbols.scale}, \code{text.scale}, and \code{lines.scale}. See also \code{...}.
-#' @param title main title. For legend titles, use \code{X.style}, where X is the layer name (see \code{...}).
-#' @param crs Either a \code{\link[sf:st_crs]{crs}} object or a character value (\code{PROJ.4} character string). By default, the projection is used that is defined in the \code{shp} object itself.
-#' @param bbox bounding box. Arugment passed on to \code{\link{tm_shape}}
-#' @param basemaps name(s) of the provider or an URL of a tiled basemap. It is a shortcut to \code{\link{tm_basemap}}. Set to \code{NULL} to disable basemaps. By default, it is set to the tmap option \code{basemaps}.
-#' @param overlays name(s) of the provider or an URL of a tiled overlay map. It is a shortcut to \code{\link{tm_tiles}}.
+#' @param by data variable name by which the data is split, or a vector of two variable names to split the data by two variables (where the first is used for the rows and the second for the columns). See also [tm_facets()]
+#' @param scale numeric value that serves as the global scale parameter. All font sizes, symbol sizes, border widths, and line widths are controlled by this value. The parameters `symbols.size`, `text.size`, and `lines.lwd` can be scaled seperately with respectively `symbols.scale`, `text.scale`, and `lines.scale`. See also `...`.
+#' @param title main title. For legend titles, use `X.style`, where X is the layer name (see `...`).
+#' @param crs Either a [`crs`][sf::st_crs()] object or a character value (`PROJ.4` character string). By default, the projection is used that is defined in the `shp` object itself.
+#' @param bbox bounding box. Arugment passed on to [tm_shape()]
+#' @param basemaps name(s) of the provider or an URL of a tiled basemap. It is a shortcut to [tm_basemap()]. Set to `NULL` to disable basemaps. By default, it is set to the tmap option `basemaps`.
+#' @param overlays name(s) of the provider or an URL of a tiled overlay map. It is a shortcut to [tm_tiles()].
#' @param zindex zindex
#' @param group group
#' @param group.control group.control
-#' @param style Layout options (see \code{\link{tm_layout}}) that define the style. See \code{\link{tmap_style}} for details.
-#' @param format Layout options (see \code{\link{tm_layout}}) that define the format. See \code{\link{tmap_format}} for details.
-#' @param ... arguments passed on to the \code{tm_*} functions. The prefix of these arguments should be with the layer function name without \code{"tm_"} and a period. For instance, the palette for polygon fill color is called \code{fill.palette}. The following prefixes are supported: \code{shape.}, \code{fill.}, \code{borders.}, \code{polygons.}, \code{symbols.}, \code{dots.}, \code{lines.}, \code{raster.}, \code{text.}, \code{layout.}, \code{grid.}, \code{facets.}, and \code{view.}. Arguments that have a unique name, i.e. that does not exist in any other layer function, e.g. \code{convert2density}, can also be called without prefix.
-#' @return \code{\link{tmap-element}}
+#' @param style Layout options (see [tm_layout()]) that define the style. See [tmap_style()] for details.
+#' @param format Layout options (see [tm_layout()]) that define the format. See [tmap_format()] for details.
+#' @param ... arguments passed on to the `tm_*` functions. The prefix of these arguments should be with the layer function name without `"tm_"` and a period. For instance, the palette for polygon fill color is called `fill.palette`. The following prefixes are supported: `shape.`, `fill.`, `borders.`, `polygons.`, `symbols.`, `dots.`, `lines.`, `raster.`, `text.`, `layout.`, `grid.`, `facets.`, and `view.`. Arguments that have a unique name, i.e. that does not exist in any other layer function, e.g. `convert2density`, can also be called without prefix.
+#' @return [tmap-element()]
#' @example ./examples/qtm.R
-#' @seealso \href{../doc/tmap-getstarted.html}{\code{vignette("tmap-getstarted")}}
+#' @seealso `vignette("tmap_sneek_peek")`
#' @references Tennekes, M., 2018, {tmap}: Thematic Maps in {R}, Journal of Statistical Software, 84(6), 1-39, \doi{10.18637/jss.v084.i06}
#' @export
qtm <- function(shp,
diff --git a/R/tm_components.R b/R/tm_components.R
index d39c20cfe..df4d3a160 100644
--- a/R/tm_components.R
+++ b/R/tm_components.R
@@ -142,7 +142,7 @@ tm_compass <- function(north,
#' Map component: scale bar
#'
-#' Map component that adds a scale bar. As of version 4.0, `tm_scalebar` is used instead of `tm_scale_bar` (now deprecated), because of the potential confusion with the `tm_scale_x` scaling functions (like \code{\link{tm_scale_continuous}}).
+#' Map component that adds a scale bar. As of version 4.0, `tm_scalebar()` is used instead of `tm_scale_bar` (now deprecated), because of the potential confusion with the `tm_scale_x` scaling functions (like [tm_scale_continuous()]).
#'
#' @param breaks breaks
#' @param width width
@@ -219,4 +219,4 @@ tm_mouse_coordinates <- function(stack,
tm_element_list(do.call(tm_element, c(args, list(subclass = c("tm_mouse_coordinates", "tm_component")))))
}
-
\ No newline at end of file
+
diff --git a/R/tm_element.R b/R/tm_element.R
index 3b4ff57b0..8aadeab98 100644
--- a/R/tm_element.R
+++ b/R/tm_element.R
@@ -21,7 +21,7 @@ tm_element_list_sel = function(tml, subclass) {
#' Stacking of tmap elements
#'
-#' The plus operator allows you to stack tmap elements (functions with a prefix \code{tm_})
+#' The plus operator allows you to stack tmap elements (functions with a prefix `tm_`)
#'
#' @param e1 first tmap element
#' @param e2 second tmap element
@@ -39,11 +39,11 @@ tm_element_list_sel = function(tml, subclass) {
#' Retrieve the last map to be modified or created
#'
-#' Retrieve the last map to be modified or created. Works in the same way as \code{ggplot2}'s \code{\link[ggplot2:last_plot]{last_plot}}, although there is a difference: \code{last_map} returns the last call instead of the stacked \code{\link{tmap-element}s}.
+#' Retrieve the last map to be modified or created. Works in the same way as [ggplot2::last_plot()], although there is a difference: `tmap_last()` returns the last call instead of the stacked [`tmap-element`]s.
#'
#' @return call
#' @export
-#' @seealso \code{\link{tmap_save}}
+#' @seealso [tmap_save()]
tmap_last = function() {
.x = get("last_map", envir = .TMAP)
if (is.null(.x) && get("tmapOptions", envir = .TMAP)$show.warnings) warning("A map has not been created yet")
diff --git a/R/tm_facets.R b/R/tm_facets.R
index 7e4b97260..b6e2be7ff 100644
--- a/R/tm_facets.R
+++ b/R/tm_facets.R
@@ -1,6 +1,6 @@
#' Facets
#'
-#' Specify facets. \code{tm_facets} is the core function, but recommended is to use \code{tm_facets_wrap}, \code{tm_facets_stack} or \code{tm_facets_grid}. The former two specify facets for one grouping variable (so one faceting dimension). The difference is that wrap may place facets in multiple rows and columns whereas \code{tm_facets_stack} stacks the facets either horizontally or vertically. \code{tm_facets_grid} supports up to three faceting dimensions.
+#' Specify facets. `tm_facets()` is the core function, but recommended is to use `tm_facets_wrap()`, `tm_facets_stack()` or `tm_facets_grid()`. The former two specify facets for one grouping variable (so one faceting dimension). The difference is that wrap may place facets in multiple rows and columns whereas `tm_facets_stack()` stacks the facets either horizontally or vertically. `tm_facets_grid()` supports up to three faceting dimensions.
#'
#' @param by Group by variable (only for a facet wrap or facet stack)
#' @param rows Variable that specifies the rows (only for a facet grid)
@@ -11,16 +11,16 @@
#' @param ncols Number of columns
#' @param byrow Should facets be wrapped by row?
#' @param orientation For facet stack: horizontal or vertical?
-#' @param free.coords Logical. If the \code{by} argument is specified, should each map has its own coordinate ranges? By default \code{TRUE}, unless facets are shown in as different layers (\code{as.layers = TRUE})
-#' @param drop.units Logical. If the \code{by} argument is specified, should non-selected spatial units be dropped? If \code{FALSE}, they are plotted where mapped aesthetics are regarded as missing values. Not applicable for raster shapes. By default \code{TRUE}.
-#' @param drop.empty.facets Logical. If the \code{by} argument is specified, should empty facets be dropped? Empty facets occur when the \code{by}-variable contains unused levels. When \code{TRUE} and two \code{by}-variables are specified, empty rows and columns are dropped.
-#' @param drop.NA.facets Logical. If the \code{by} argument is specified, and all data values for specific facets are missing, should these facets be dropped? \code{FALSE} by default.
-#' @param sync Logical. Should the navigation in view mode (zooming and panning) be synchronized? By default \code{TRUE} if the facets have the same bounding box. This is generally the case when rasters are plotted, or when free.coords is \code{FALSE}.
-#' @param showNA If the \code{by} argument is specified, should missing values of the \code{by}-variable be shown in a facet? If two \code{by}-variables are specified, should missing values be shown in an additional row and column? If \code{NA}, missing values only are shown if they exist. Similar to the \code{useNA} argument of \code{\link[base:table]{table}}, where \code{TRUE}, \code{FALSE}, and \code{NA} correspond to \code{"always"}, \code{"no"}, and \code{"ifany"} respectively.
+#' @param free.coords Logical. If the `by` argument is specified, should each map has its own coordinate ranges? By default `TRUE`, unless facets are shown in as different layers (`as.layers = TRUE`)
+#' @param drop.units Logical. If the `by` argument is specified, should non-selected spatial units be dropped? If `FALSE`, they are plotted where mapped aesthetics are regarded as missing values. Not applicable for raster shapes. By default `TRUE`.
+#' @param drop.empty.facets Logical. If the `by` argument is specified, should empty facets be dropped? Empty facets occur when the `by`-variable contains unused levels. When `TRUE` and two `by`-variables are specified, empty rows and columns are dropped.
+#' @param drop.NA.facets Logical. If the `by` argument is specified, and all data values for specific facets are missing, should these facets be dropped? `FALSE` by default.
+#' @param sync Logical. Should the navigation in view mode (zooming and panning) be synchronized? By default `TRUE` if the facets have the same bounding box. This is generally the case when rasters are plotted, or when free.coords is `FALSE`.
+#' @param showNA If the `by` argument is specified, should missing values of the `by`-variable be shown in a facet? If two `by`-variables are specified, should missing values be shown in an additional row and column? If `NA`, missing values only are shown if they exist. Similar to the `useNA` argument of [table()][base::table()], where `TRUE`, `FALSE`, and `NA` correspond to `"always"`, `"no"`, and `"ifany"` respectively.
#' @param textNA Text used for facets of missing values.
-#' @param scale.factor Number that determines how the elements (e.g. font sizes, symbol sizes, line widths) of the small multiples are scaled in relation to the scaling factor of the shapes. The elements are scaled to the \code{scale.factor}th root of the scaling factor of the shapes. So, for \code{scale.factor=1}, they are scaled proportional to the scaling of the shapes. Since elements, especially text, are often too small to read, a higher value is recommended. By default, \code{scale.factor=2}.
-#' @param type \code{"grid"}, \code{"wrap"} or \code{"stack"}
-#' @param along deceprated Please use \code{tm_facets_page}
+#' @param scale.factor Number that determines how the elements (e.g. font sizes, symbol sizes, line widths) of the small multiples are scaled in relation to the scaling factor of the shapes. The elements are scaled to the `scale.factor`th root of the scaling factor of the shapes. So, for `scale.factor=1`, they are scaled proportional to the scaling of the shapes. Since elements, especially text, are often too small to read, a higher value is recommended. By default, `scale.factor=2`.
+#' @param type `"grid"`, `"wrap"` or `"stack"`
+#' @param along deceprated Please use `tm_facets_page()`
#' @export
#' @rdname tm_facets
#' @name tm_facets
@@ -104,7 +104,7 @@ tm_facets_grid = function(rows = NULL,
#' @export
#' @rdname tm_facets
-#' @param ... paseed on to `tm_facets`
+#' @param ... paseed on to `tm_facets()`
#' @name tm_facets_wrap
tm_facets_wrap = function(by = "VARS__",
nrows = NA,
diff --git a/R/tm_layers_aux.R b/R/tm_layers_aux.R
index f595c1deb..07e0bb9a0 100644
--- a/R/tm_layers_aux.R
+++ b/R/tm_layers_aux.R
@@ -1,11 +1,11 @@
#' Map layer: basemap / overlay tiles
#'
-#' Map layer that draws tiles from a tile server. The function \code{tm_basemap} draws the tile layer as basemap, i.e. as bottom layer. In contrast, \code{tm_tiles} draws the tile layer as overlay layer, where the stacking order corresponds with the order in which this layer is called, just like other map layers.
+#' Map layer that draws tiles from a tile server. `tm_basemap()` draws the tile layer as basemap, i.e. as bottom layer. In contrast, `tm_tiles()` draws the tile layer as overlay layer, where the stacking order corresponds with the order in which this layer is called, just like other map layers.
#'
-#' @param server Name of the provider or an URL. The list of available providers can be obtained with \code{providers} (tip: in RStudio, type \code{providers$} to see the options). See \url{https://leaflet-extras.github.io/leaflet-providers/preview/} for a preview of those. When a URL is provided, it should be in template format, e.g. \code{"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}. Use \code{NULL} in \code{tm_basemap} to disable basemaps.
+#' @param server Name of the provider or an URL. The list of available providers can be obtained with `providers` (tip: in RStudio, type `providers$` to see the options). See for a preview of those. When a URL is provided, it should be in template format, e.g. \code{"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}. Use `NULL` in `tm_basemap()` to disable basemaps.
#' @param alpha Transparency level
#' @param zoom Zoom level (only used in plot mode)
-#' @param zindex zindex of the pane in view mode. By default, it is set to the layer number plus 400. By default, the tmap layers will therefore be placed in the custom panes \code{"tmap401"}, \code{"tmap402"}, etc., except for the base tile layers, which are placed in the standard \code{"tile"}. This parameter determines both the name of the pane and the z-index, which determines the pane order from bottom to top. For instance, if \code{zindex} is set to 500, the pane will be named \code{"tmap500"}.
+#' @param zindex zindex of the pane in view mode. By default, it is set to the layer number plus 400. By default, the tmap layers will therefore be placed in the custom panes `"tmap401"`, `"tmap402"`, etc., except for the base tile layers, which are placed in the standard `"tile"`. This parameter determines both the name of the pane and the z-index, which determines the pane order from bottom to top. For instance, if `zindex` is set to 500, the pane will be named `"tmap500"`.
#' @param group Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)
#' @param group.control In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).
#' @export
@@ -55,42 +55,42 @@ tm_graticules = function(x = NA,
#' Coordinate grid / graticule lines
#'
-#' Creates a \code{\link{tmap-element}} that draws coordinate grid lines. It serves as a layer that can be drawn anywhere between other layers. By default, \code{tm_grid} draws horizontal and vertical lines acording to the coordinate system of the (master) shape object. Latitude and longitude graticules are drawn with \code{tm_graticules}.
+#' Creates a [`tmap-element`] that draws coordinate grid lines. It serves as a layer that can be drawn anywhere between other layers. By default, `tm_grid()` draws horizontal and vertical lines acording to the coordinate system of the (master) shape object. Latitude and longitude graticules are drawn with `tm_graticules()`.
#'
-#' @param x X coordinates for vertical grid lines. If \code{NA}, it is specified with a pretty scale and \code{n.x}.
-#' @param y Y coordinates for horizontal grid lines. If \code{NA}, it is specified with a pretty scale and \code{n.y}.
-#' @param n.x Preferred number of grid lines for the x axis. For the labels, a \code{\link{pretty}} sequence is used, so the number of actual labels may be different than \code{n.x}.
-#' @param n.y Preferred number of grid lines for the y axis. For the labels, a \code{\link{pretty}} sequence is used, so the number of actual labels may be different than \code{n.y}.
+#' @param x X coordinates for vertical grid lines. If `NA`, it is specified with a pretty scale and `n.x`.
+#' @param y Y coordinates for horizontal grid lines. If `NA`, it is specified with a pretty scale and `n.y`.
+#' @param n.x Preferred number of grid lines for the x axis. For the labels, a [pretty()] sequence is used, so the number of actual labels may be different than `n.x`.
+#' @param n.y Preferred number of grid lines for the y axis. For the labels, a [pretty()] sequence is used, so the number of actual labels may be different than `n.y`.
#' @param crs Projection character. If specified, the grid lines are projected accordingly. Many world maps are projected, but still have latitude longitude (EPSG 4326) grid lines.
#' @param col Color of the grid lines.
#' @param lwd Line width of the grid lines
-#' @param alpha Alpha transparency of the grid lines. Number between 0 and 1. By default, the alpha transparency of \code{col} is taken.
-#' @param labels.show Show tick labels. Either one value for both \code{x} and \code{y} axis, or a vector two: the first for \code{x} and latter for \code{y}.
+#' @param alpha Alpha transparency of the grid lines. Number between 0 and 1. By default, the alpha transparency of `col` is taken.
+#' @param labels.show Show tick labels. Either one value for both `x` and `y` axis, or a vector two: the first for `x` and latter for `y`.
#' @param labels.pos position of the labels. Vector of two: the horizontal ("left" or "right") and the vertical ("top" or "bottom") position.
#' @param labels.size Font size of the tick labels
#' @param labels.col Font color of the tick labels
-#' @param labels.rot Rotation angles of the labels. Vector of two values: the first is the rotation angle (in degrees) of the tick labels on the x axis and the second is the rotation angle of the tick labels on the y axis. Only \code{0}, \code{90}, \code{180}, and \code{270} are valid values.
+#' @param labels.rot Rotation angles of the labels. Vector of two values: the first is the rotation angle (in degrees) of the tick labels on the x axis and the second is the rotation angle of the tick labels on the y axis. Only `0`, `90`, `180`, and `270` are valid values.
#' @param labels.format List of formatting options for the grid labels. Parameters are:
#' \describe{
-#' \item{fun}{Function to specify the labels. It should take a numeric vector, and should return a character vector of the same size. By default it is not specified. If specified, the list items \code{scientific}, \code{format}, and \code{digits} (see below) are not used.}
-#' \item{scientific}{Should the labels be formatted scientifically? If so, square brackets are used, and the \code{format} of the numbers is \code{"g"}. Otherwise, \code{format="f"}, and \code{text.separator}, \code{text.less.than}, and \code{text.or.more} are used. Also, the numbers are automatically rounded to millions or billions if applicable.}
-#' \item{format}{By default, \code{"f"}, i.e. the standard notation \code{xxx.xxx}, is used. If \code{scientific=TRUE} then \code{"g"}, which means that numbers are formatted scientifically, i.e. \code{n.dddE+nn} if needed to save space.}
-#' \item{digits}{Number of digits after the decimal point if \code{format="f"}, and the number of significant digits otherwise.}
-#' \item{...}{Other arguments passed on to \code{\link[base:formatC]{formatC}}}
+#' \item{fun}{Function to specify the labels. It should take a numeric vector, and should return a character vector of the same size. By default it is not specified. If specified, the list items `scientific`, `format`, and `digits` (see below) are not used.}
+#' \item{scientific}{Should the labels be formatted scientifically? If so, square brackets are used, and the `format` of the numbers is `"g"`. Otherwise, `format="f"`, and `text.separator`, `text.less.than`, and `text.or.more` are used. Also, the numbers are automatically rounded to millions or billions if applicable.}
+#' \item{format}{By default, `"f"`, i.e. the standard notation `xxx.xxx`, is used. If `scientific=TRUE` then `"g"`, which means that numbers are formatted scientifically, i.e. `n.dddE+nn` if needed to save space.}
+#' \item{digits}{Number of digits after the decimal point if `format="f"`, and the number of significant digits otherwise.}
+#' \item{...}{Other arguments passed on to [formatC()]}
#' }
#' @param labels.cardinal Add the four cardinal directions (N, E, S, W) to the labels, instead of using negative coordinates for west and south (so it assumes that the coordinates are positive in the north-east direction).
-#' @param labels.margin.x Margin between tick labels of x axis and the frame. Note that when \code{labels.inside.frame == FALSE} and \code{ticks == TRUE}, the ticks will be adjusted accordingly.
-#' @param labels.margin.y Margin between tick labels of y axis and the frame. Note that when \code{labels.inside.frame == FALSE} and \code{ticks == TRUE}, the ticks will be adjusted accordingly.
-#' @param labels.space.x Space that is used for the labels and ticks for the x-axis when \code{labels.inside.frame == FALSE}. By default, it is determined automatically using the widths and heights of the tick labels. The unit of this parameter is text line height.
-#' @param labels.space.y Space that is used for the labels and ticks for the y-axis when \code{labels.inside.frame == FALSE}. By default, it is determined automatically using the widths and heights of the tick labels. The unit of this parameter is text line height.
-#' @param labels.inside.frame Show labels inside the frame? By default \code{FALSE}
-#' @param ticks If \code{labels.inside.frame = FALSE}, should ticks can be drawn between the labels and the frame? Either one value for both \code{x} and \code{y} axis, or a vector two: the first for \code{x} and latter for \code{y}.
-#' @param lines If \code{labels.inside.frame = FALSE}, should grid lines can be drawn?
+#' @param labels.margin.x Margin between tick labels of x axis and the frame. Note that when `labels.inside.frame == FALSE` and `ticks == TRUE`, the ticks will be adjusted accordingly.
+#' @param labels.margin.y Margin between tick labels of y axis and the frame. Note that when `labels.inside.frame == FALSE` and `ticks == TRUE`, the ticks will be adjusted accordingly.
+#' @param labels.space.x Space that is used for the labels and ticks for the x-axis when `labels.inside.frame == FALSE`. By default, it is determined automatically using the widths and heights of the tick labels. The unit of this parameter is text line height.
+#' @param labels.space.y Space that is used for the labels and ticks for the y-axis when `labels.inside.frame == FALSE`. By default, it is determined automatically using the widths and heights of the tick labels. The unit of this parameter is text line height.
+#' @param labels.inside.frame Show labels inside the frame? By default `FALSE`
+#' @param ticks If `labels.inside.frame = FALSE`, should ticks can be drawn between the labels and the frame? Either one value for both `x` and `y` axis, or a vector two: the first for `x` and latter for `y`.
+#' @param lines If `labels.inside.frame = FALSE`, should grid lines can be drawn?
#' @param ndiscr Number of points to discretize a parallel or meridian (only applicable for curved grid lines)
-#' @param zindex zindex of the pane in view mode. By default, it is set to the layer number plus 400. By default, the tmap layers will therefore be placed in the custom panes \code{"tmap401"}, \code{"tmap402"}, etc., except for the base tile layers, which are placed in the standard \code{"tile"}. This parameter determines both the name of the pane and the z-index, which determines the pane order from bottom to top. For instance, if \code{zindex} is set to 500, the pane will be named \code{"tmap500"}.
+#' @param zindex zindex of the pane in view mode. By default, it is set to the layer number plus 400. By default, the tmap layers will therefore be placed in the custom panes `"tmap401"`, `"tmap402"`, etc., except for the base tile layers, which are placed in the standard `"tile"`. This parameter determines both the name of the pane and the z-index, which determines the pane order from bottom to top. For instance, if `zindex` is set to 500, the pane will be named `"tmap500"`.
#' @param group Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)
#' @param group.control In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).
-#' @param ... Arguments passed on to \code{\link{tm_grid}}
+#' @param ... Arguments passed on to [tm_grid()]
#' @export
#' @example ./examples/tm_grid.R
tm_grid = function(x = NA,
diff --git a/R/tm_layers_cartogram.R b/R/tm_layers_cartogram.R
index 5232d7151..3b3b557fb 100644
--- a/R/tm_layers_cartogram.R
+++ b/R/tm_layers_cartogram.R
@@ -3,9 +3,9 @@
#' Map layer that draws a cartogram
#'
#' @param size,size.scale,size.legend,size.free Transformation variable that determines the size of the polygons.
-#' @param plot.order Specification in which order the spatial features are drawn. See \code{\link{tm_plot_order}} for details.
+#' @param plot.order Specification in which order the spatial features are drawn. See [tm_plot_order()] for details.
#' @param trans.args lists that are passed on to internal transformation function
-#' @param ... passd on to \code{\link{tm_polygons}}
+#' @param ... passd on to [tm_polygons()]
#' @export
tm_cartogram = function(size = 1,
size.scale = tm_scale(),
diff --git a/R/tm_layers_lines.R b/R/tm_layers_lines.R
index f5f74c6bc..6a170ff10 100644
--- a/R/tm_layers_lines.R
+++ b/R/tm_layers_lines.R
@@ -1,30 +1,30 @@
#' Map layer: lines
#'
-#' Map layer that draws symbols Supported visual variables are: \code{col} (the color), \code{lwd} (line width), \code{lty} (line type), and \code{col_alpha} (color alpha transparency).
+#' Map layer that draws symbols Supported visual variables are: `col` (the color), `lwd` (line width), `lty` (line type), and `col_alpha` (color alpha transparency).
#'
-#' The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link{tm_shape}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link{tm_facets}}.
+#' The visual variable arguments (e.g. `col`) can be specified with either a data variable name (of the object specified in [tm_shape()]), or with a visual value (for `col`, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with [tm_facets()].
#'
-#' The \code{.scale} arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available \code{tm_scale_} functions. The default scale that is used is specified by the tmap option \code{scales.var}.
+#' The `.scale` arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available `tm_scale_` functions. The default scale that is used is specified by the tmap option `scales.var`.
#'
-#' The \code{.legend} arguments determine the used legend, specified with \code{\link{tm_legend}}. The default legend and its settings are determined by the tmap options \code{legend.}.
+#' The `.legend` arguments determine the used legend, specified with [tm_legend()]. The default legend and its settings are determined by the tmap options `legend.`.
#'
-#' The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link{tm_facets}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link{tm_facets_grid}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link{tm_facets_wrap}} and \code{\link{tm_facets_stack}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
+#' The `.free` arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see [tm_facets()]). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid ([tm_facets_grid()]). For instance, `col.free = c(TRUE, FALSE, FALSE)` means that for the visual variable `col`, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks ([tm_facets_wrap()] and [tm_facets_stack()]) there is only one facet dimension, so the `.free` argument requires only one logical value.
#'
#' @param col,col.scale,col.legend,col.free Visual variable that determines the col color. See details.
#' @param lwd,lwd.scale,lwd.legend,lwd.free Visual variable that determines the line width. See details.
#' @param lty,lty.scale,lty.legend,lty.free Visual variable that determines the line type. See details.
#' @param col_alpha,col_alpha.scale,col_alpha.legend,col_alpha.free Visual variable that determines the border color alpha transparency. See details.
-#' @param linejoin,lineend line join and line end. See \code{\link[grid:gpar]{gpar}} for details.
-#' @param plot.order Specification in which order the spatial features are drawn. See \code{\link{tm_plot_order}} for details.
+#' @param linejoin,lineend line join and line end. See [gpar()][grid::gpar()] for details.
+#' @param plot.order Specification in which order the spatial features are drawn. See [tm_plot_order()] for details.
#' @param trans.args,mapping.args lists that are passed on to internal transformation and mapping functions respectively
-#' @param zindex Map layers are drawn on top of each other. The \code{zindex} numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.
+#' @param zindex Map layers are drawn on top of each other. The `zindex` numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.
#' @param group Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)
#' @param group.control In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).
-#' @param popup.vars names of data variables that are shown in the popups in \code{"view"} mode. Set popup.vars to \code{TRUE} to show all variables in the shape object. Set popup.vars to \code{FALSE} to disable popups. Set popup.vars to a character vector of variable names to those those variables in the popups. The default (\code{NA}) depends on whether visual variables (e.g.`col`) are used. If so, only those are shown. If not all variables in the shape object are shown.
-#' @param popup.format list of formatting options for the popup values. See the argument \code{legend.format} for options. Only applicable for numeric data variables. If one list of formatting options is provided, it is applied to all numeric variables of \code{popup.vars}. Also, a (named) list of lists can be provided. In that case, each list of formatting options is applied to the named variable.
+#' @param popup.vars names of data variables that are shown in the popups in `"view"` mode. Set popup.vars to `TRUE` to show all variables in the shape object. Set popup.vars to `FALSE` to disable popups. Set popup.vars to a character vector of variable names to those those variables in the popups. The default (`NA`) depends on whether visual variables (e.g.`col`) are used. If so, only those are shown. If not all variables in the shape object are shown.
+#' @param popup.format list of formatting options for the popup values. See the argument `legend.format` for options. Only applicable for numeric data variables. If one list of formatting options is provided, it is applied to all numeric variables of `popup.vars`. Also, a (named) list of lists can be provided. In that case, each list of formatting options is applied to the named variable.
#' @param hover name of the data variable that specifies the hover labels
#'
-#' @param id name of the data variable that specifies the indices of the spatial features. Only used for \code{"view"} mode.
+#' @param id name of the data variable that specifies the indices of the spatial features. Only used for `"view"` mode.
#' @param ... to catch deprecated arguments from version < 4.0
#' @example ./examples/tm_lines.R
#' @export
diff --git a/R/tm_layers_polygons.R b/R/tm_layers_polygons.R
index 93a98257f..e8d9a09cb 100644
--- a/R/tm_layers_polygons.R
+++ b/R/tm_layers_polygons.R
@@ -1,14 +1,14 @@
#' Map layer: polygons
#'
-#' Map layer that draws polygons. Supported visual variables are: \code{fill} (the fill color), \code{col} (the border color), \code{lwd} (line width), \code{lty} (line type), \code{fill_alpha} (fill color alpha transparency) and \code{col_alpha} (border color alpha transparency).
+#' Map layer that draws polygons. Supported visual variables are: `fill` (the fill color), `col` (the border color), `lwd` (line width), `lty` (line type), `fill_alpha` (fill color alpha transparency) and `col_alpha` (border color alpha transparency).
#'
-#' The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (e.g., a spatial vector attribute or a raster layer of the object specified in \code{\link{tm_shape}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link{tm_facets}}.
+#' The visual variable arguments (e.g. `col`) can be specified with either a data variable name (e.g., a spatial vector attribute or a raster layer of the object specified in [tm_shape()]), or with a visual value (for `col`, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with [tm_facets()].
#'
-#' The \code{.scale} arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available \code{tm_scale_} functions. The default is specified by the tmap option (\code{\link{tm_options}}) \code{scales.var}.
+#' The `.scale` arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available `tm_scale_` functions. The default is specified by the tmap option ([tm_options()]) `scales.var`.
#'
-#' The \code{.legend} arguments determine the used legend, specified with \code{\link{tm_legend}}. The default legend and its settings are determined by the tmap options (\code{\link{tm_options}}) \code{legend.} .
+#' The `.legend` arguments determine the used legend, specified with [tm_legend()]. The default legend and its settings are determined by the tmap options ([tm_options()]) `legend.` .
#'
-#' The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link{tm_facets}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link{tm_facets_grid}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link{tm_facets_wrap}} and \code{\link{tm_facets_stack}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
+#' The `.free` arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see [tm_facets()]). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid ([tm_facets_grid()]). For instance, `col.free = c(TRUE, FALSE, FALSE)` means that for the visual variable `col`, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks ([tm_facets_wrap()] and [tm_facets_stack()]) there is only one facet dimension, so the `.free` argument requires only one logical value.
#'
#' @param fill,fill.scale,fill.legend,fill.free Visual variable that determines the fill color. See details.
#' @param col,col.scale,col.legend,col.free Visual variable that determines the border color. See details.
@@ -16,17 +16,17 @@
#' @param lty,lty.scale,lty.legend,lty.free Visual variable that determines the line type. See details.
#' @param fill_alpha,fill_alpha.scale,fill_alpha.legend,fill_alpha.free Visual variable that determines the fill color alpha transparency See details.
#' @param col_alpha,col_alpha.scale,col_alpha.legend,col_alpha.free Visual variable that determines the border color alpha transparency. See details.
-#' @param linejoin,lineend Line join and line end. See \code{\link[grid:gpar]{gpar}} for details.
-#' @param plot.order Specification in which order the spatial features are drawn. See \code{\link{tm_plot_order}} for details.
+#' @param linejoin,lineend Line join and line end. See [gpar()][grid::gpar()] for details.
+#' @param plot.order Specification in which order the spatial features are drawn. See [tm_plot_order()] for details.
#' @param trans.args,mapping.args lists that are passed on to internal transformation and mapping functions respectively
-#' @param zindex Map layers are drawn on top of each other. The \code{zindex} numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.
+#' @param zindex Map layers are drawn on top of each other. The `zindex` numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.
#' @param group Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)
#' @param group.control In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).
-#' @param popup.vars names of data variables that are shown in the popups in \code{"view"} mode. Set popup.vars to \code{TRUE} to show all variables in the shape object. Set popup.vars to \code{FALSE} to disable popups. Set popup.vars to a character vector of variable names to those those variables in the popups. The default (\code{NA}) depends on whether visual variables (e.g.`col`) are used. If so, only those are shown. If not all variables in the shape object are shown.
-#' @param popup.format list of formatting options for the popup values. See the argument \code{legend.format} for options. Only applicable for numeric data variables. If one list of formatting options is provided, it is applied to all numeric variables of \code{popup.vars}. Also, a (named) list of lists can be provided. In that case, each list of formatting options is applied to the named variable.
+#' @param popup.vars names of data variables that are shown in the popups in `"view"` mode. Set popup.vars to `TRUE` to show all variables in the shape object. Set popup.vars to `FALSE` to disable popups. Set popup.vars to a character vector of variable names to those those variables in the popups. The default (`NA`) depends on whether visual variables (e.g.`col`) are used. If so, only those are shown. If not all variables in the shape object are shown.
+#' @param popup.format list of formatting options for the popup values. See the argument `legend.format` for options. Only applicable for numeric data variables. If one list of formatting options is provided, it is applied to all numeric variables of `popup.vars`. Also, a (named) list of lists can be provided. In that case, each list of formatting options is applied to the named variable.
#' @param hover name of the data variable that specifies the hover labels
#'
-#' @param id name of the data variable that specifies the indices of the spatial features. Only used for \code{"view"} mode.
+#' @param id name of the data variable that specifies the indices of the spatial features. Only used for `"view"` mode.
#' @param ... to catch deprecated arguments from version < 4.0
#' @example ./examples/tm_polygons.R
#' @name tm_polygons
diff --git a/R/tm_layers_raster.R b/R/tm_layers_raster.R
index 4fe829443..767d0d15c 100644
--- a/R/tm_layers_raster.R
+++ b/R/tm_layers_raster.R
@@ -1,19 +1,19 @@
#' Map layer: raster
#'
-#' Map layer that draws rasters. Supported visual variable is: \code{col} (the color).
+#' Map layer that draws rasters. Supported visual variable is: `col` (the color).
#'
-#' The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link{tm_shape}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link{tm_facets}}.
+#' The visual variable arguments (e.g. `col`) can be specified with either a data variable name (of the object specified in [tm_shape()]), or with a visual value (for `col`, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with [tm_facets()].
#'
-#' The \code{.scale} arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available \code{tm_scale_} functions. The default scale that is used is specified by the tmap option \code{scales.var}.
+#' The `.scale` arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available `tm_scale_` functions. The default scale that is used is specified by the tmap option `scales.var`.
#'
-#' The \code{.legend} arguments determine the used legend, specified with \code{\link{tm_legend}}. The default legend and its settings are determined by the tmap options \code{legend.}.
+#' The `.legend` arguments determine the used legend, specified with [tm_legend()]. The default legend and its settings are determined by the tmap options `legend.`.
#'
-#' The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link{tm_facets}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link{tm_facets_grid}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link{tm_facets_wrap}} and \code{\link{tm_facets_stack}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
+#' The `.free` arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see [tm_facets()]). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid ([tm_facets_grid()]). For instance, `col.free = c(TRUE, FALSE, FALSE)` means that for the visual variable `col`, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks ([tm_facets_wrap()] and [tm_facets_stack()]) there is only one facet dimension, so the `.free` argument requires only one logical value.
#'
#' @param col,col.scale,col.legend,col.free Visual variable that determines the color. See details.
#' @param col_alpha,col_alpha.scale,col_alpha.legend,col_alpha.free Visual variable that determines the alpha transparency. See details.
#' @param trans.args,mapping.args lists that are passed on to internal transformation and mapping functions respectively
-#' @param zindex Map layers are drawn on top of each other. The \code{zindex} numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.
+#' @param zindex Map layers are drawn on top of each other. The `zindex` numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.
#' @param group Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)
#' @param group.control In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).
#' @example ./examples/tm_raster.R
diff --git a/R/tm_layers_sf.R b/R/tm_layers_sf.R
index ba9bf639e..034542f79 100644
--- a/R/tm_layers_sf.R
+++ b/R/tm_layers_sf.R
@@ -1,14 +1,14 @@
#' Map layer: simple features
#'
-#' Map layer that draws simple features as they are. Supported visual variables are: \code{fill} (the fill color), \code{col} (the border color), \code{size} the point size, \code{shape} the symbol shape, \code{lwd} (line width), \code{lty} (line type), \code{fill_alpha} (fill color alpha transparency) and \code{col_alpha} (border color alpha transparency).
+#' Map layer that draws simple features as they are. Supported visual variables are: `fill` (the fill color), `col` (the border color), `size` the point size, `shape` the symbol shape, `lwd` (line width), `lty` (line type), `fill_alpha` (fill color alpha transparency) and `col_alpha` (border color alpha transparency).
#'
-#' The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link{tm_shape}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link{tm_facets}}.
+#' The visual variable arguments (e.g. `col`) can be specified with either a data variable name (of the object specified in [tm_shape()]), or with a visual value (for `col`, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with [tm_facets()].
#'
-#' The \code{.scale} arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available \code{tm_scale_} functions. The default scale that is used is specified by the tmap option \code{scales.var}.
+#' The `.scale` arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available `tm_scale_` functions. The default scale that is used is specified by the tmap option `scales.var`.
#'
-#' The \code{.legend} arguments determine the used legend, specified with \code{\link{tm_legend}}. The default legend and its settings are determined by the tmap options \code{legend.}.
+#' The `.legend` arguments determine the used legend, specified with [tm_legend()]. The default legend and its settings are determined by the tmap options `legend.`.
#'
-#' The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link{tm_facets}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link{tm_facets_grid}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link{tm_facets_wrap}} and \code{\link{tm_facets_stack}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
+#' The `.free` arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see [tm_facets()]). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid ([tm_facets_grid()]). For instance, `col.free = c(TRUE, FALSE, FALSE)` means that for the visual variable `col`, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks ([tm_facets_wrap()] and [tm_facets_stack()]) there is only one facet dimension, so the `.free` argument requires only one logical value.
#'
#' @param fill,fill.scale,fill.legend,fill.free Visual variable that determines the fill color. See details.
#' @param col,col.scale,col.legend,col.free Visual variable that determines the col color. See details.
@@ -18,13 +18,13 @@
#' @param lty,lty.scale,lty.legend,lty.free Visual variable that determines the line type. See details.
#' @param fill_alpha,fill_alpha.scale,fill_alpha.legend,fill_alpha.free Visual variable that determines the fill color alpha transparency See details.
#' @param col_alpha,col_alpha.scale,col_alpha.legend,col_alpha.free Visual variable that determines the border color alpha transparency. See details.
-#' @param linejoin,lineend line join and line end. See \code{\link[grid:gpar]{gpar}} for details.
-#' @param plot.order.list Specification in which order the spatial features are drawn. This consists of a list of three elementary geometry types: for polygons, lines and, points. For each of these types, which are drawn in that order, a \code{\link{tm_plot_order}} is required.
-#' @param trans.args.list,mapping.args.list lists that are passed on to internal transformation and mapping functions respectively. Each is a list of three items, named `polygons`, `lines`, and `points`. See \code{\link{tm_polygons}}, \code{\link{tm_lines}}, and \code{\link{tm_dots}}.
-#' @param zindex Map layers are drawn on top of each other. The \code{zindex} numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.
+#' @param linejoin,lineend line join and line end. See [gpar()][grid::gpar()] for details.
+#' @param plot.order.list Specification in which order the spatial features are drawn. This consists of a list of three elementary geometry types: for polygons, lines and, points. For each of these types, which are drawn in that order, a [tm_plot_order()] is required.
+#' @param trans.args.list,mapping.args.list lists that are passed on to internal transformation and mapping functions respectively. Each is a list of three items, named `polygons`, `lines`, and `points`. See [tm_polygons()], [tm_lines()], and [tm_dots()].
+#' @param zindex Map layers are drawn on top of each other. The `zindex` numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.
#' @param group Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)
#' @param group.control In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).
-#' @param ... passed on to \code{\link{tm_polygons}}, \code{\link{tm_lines}}, and \code{\link{tm_dots}}
+#' @param ... passed on to [tm_polygons()], [tm_lines()], and [tm_dots()]
#' @example ./examples/tm_sf.R
#' @export
#' @name tm_sf
diff --git a/R/tm_layers_symbols.R b/R/tm_layers_symbols.R
index 22687e6ba..e86f18b59 100644
--- a/R/tm_layers_symbols.R
+++ b/R/tm_layers_symbols.R
@@ -1,14 +1,14 @@
#' Map layer: symbols
#'
-#' Map layer that draws symbols Supported visual variables are: \code{fill} (the fill color), \code{col} (the border color), \code{size} the symbol size, \code{shape} the symbol shape, \code{lwd} (line width), \code{lty} (line type), \code{fill_alpha} (fill color alpha transparency) and \code{col_alpha} (border color alpha transparency).
+#' Map layer that draws symbols Supported visual variables are: `fill` (the fill color), `col` (the border color), `size` the symbol size, `shape` the symbol shape, `lwd` (line width), `lty` (line type), `fill_alpha` (fill color alpha transparency) and `col_alpha` (border color alpha transparency).
#'
-#' The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link{tm_shape}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link{tm_facets}}.
+#' The visual variable arguments (e.g. `col`) can be specified with either a data variable name (of the object specified in [tm_shape()]), or with a visual value (for `col`, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with [tm_facets()].
#'
-#' The \code{.scale} arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available \code{tm_scale_} functions. The default scale that is used is specified by the tmap option \code{scales.var}.
+#' The `.scale` arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available `tm_scale_` functions. The default scale that is used is specified by the tmap option `scales.var`.
#'
-#' The \code{.legend} arguments determine the used legend, specified with \code{\link{tm_legend}}. The default legend and its settings are determined by the tmap options \code{legend.}.
+#' The `.legend` arguments determine the used legend, specified with [tm_legend()]. The default legend and its settings are determined by the tmap options `legend.`.
#'
-#' The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link{tm_facets}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link{tm_facets_grid}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link{tm_facets_wrap}} and \code{\link{tm_facets_stack}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
+#' The `.free` arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see [tm_facets()]). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid ([tm_facets_grid()]). For instance, `col.free = c(TRUE, FALSE, FALSE)` means that for the visual variable `col`, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks ([tm_facets_wrap()] and [tm_facets_stack()]) there is only one facet dimension, so the `.free` argument requires only one logical value.
#'
#' @param fill,fill.scale,fill.legend,fill.free Visual variable that determines the fill color. See details.
#' @param col,col.scale,col.legend,col.free Visual variable that determines the col color. See details.
@@ -18,16 +18,16 @@
#' @param lty,lty.scale,lty.legend,lty.free Visual variable that determines the line type. See details.
#' @param fill_alpha,fill_alpha.scale,fill_alpha.legend,fill_alpha.free Visual variable that determines the fill color alpha transparency See details.
#' @param col_alpha,col_alpha.scale,col_alpha.legend,col_alpha.free Visual variable that determines the border color alpha transparency. See details.
-#' @param plot.order Specification in which order the spatial features are drawn. See \code{\link{tm_plot_order}} for details.
+#' @param plot.order Specification in which order the spatial features are drawn. See [tm_plot_order()] for details.
#' @param trans.args,mapping.args lists that are passed on to internal transformation and mapping functions respectively
-#' @param zindex Map layers are drawn on top of each other. The \code{zindex} numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.
+#' @param zindex Map layers are drawn on top of each other. The `zindex` numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.
#' @param group Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)
#' @param group.control In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).
-#' @param popup.vars names of data variables that are shown in the popups in \code{"view"} mode. Set popup.vars to \code{TRUE} to show all variables in the shape object. Set popup.vars to \code{FALSE} to disable popups. Set popup.vars to a character vector of variable names to those those variables in the popups. The default (\code{NA}) depends on whether visual variables (e.g.`col`) are used. If so, only those are shown. If not all variables in the shape object are shown.
-#' @param popup.format list of formatting options for the popup values. See the argument \code{legend.format} for options. Only applicable for numeric data variables. If one list of formatting options is provided, it is applied to all numeric variables of \code{popup.vars}. Also, a (named) list of lists can be provided. In that case, each list of formatting options is applied to the named variable.
+#' @param popup.vars names of data variables that are shown in the popups in `"view"` mode. Set popup.vars to `TRUE` to show all variables in the shape object. Set popup.vars to `FALSE` to disable popups. Set popup.vars to a character vector of variable names to those those variables in the popups. The default (`NA`) depends on whether visual variables (e.g.`col`) are used. If so, only those are shown. If not all variables in the shape object are shown.
+#' @param popup.format list of formatting options for the popup values. See the argument `legend.format` for options. Only applicable for numeric data variables. If one list of formatting options is provided, it is applied to all numeric variables of `popup.vars`. Also, a (named) list of lists can be provided. In that case, each list of formatting options is applied to the named variable.
#' @param hover name of the data variable that specifies the hover labels
#'
-#' @param id name of the data variable that specifies the indices of the spatial features. Only used for \code{"view"} mode.
+#' @param id name of the data variable that specifies the indices of the spatial features. Only used for `"view"` mode.
#' @param ... to catch deprecated arguments from version < 4.0
#' @example ./examples/tm_symbols.R
#' @export
@@ -544,4 +544,4 @@ tm_bubbles = function(size = tm_const(),
tm = do.call(tm_symbols, args)
tm[[1]]$layer = c("bubbles", "symbols")
tm
-}
\ No newline at end of file
+}
diff --git a/R/tm_layers_text.R b/R/tm_layers_text.R
index f9777e630..8c3381a08 100644
--- a/R/tm_layers_text.R
+++ b/R/tm_layers_text.R
@@ -1,25 +1,25 @@
#' Map layer: text
#'
-#' Map layer that draws symbols Supported visual variables are: \code{text} (the text itself) \code{col} (color), \code{size} (font size), and \code{fontface} (font face).
+#' Map layer that draws symbols Supported visual variables are: `text` (the text itself) `col` (color), `size` (font size), and `fontface` (font face).
#'
-#' The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link{tm_shape}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link{tm_facets}}.
+#' The visual variable arguments (e.g. `col`) can be specified with either a data variable name (of the object specified in [tm_shape()]), or with a visual value (for `col`, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with [tm_facets()].
#'
-#' The \code{.scale} arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available \code{tm_scale_} functions. The default scale that is used is specified by the tmap option \code{scales.var}.
+#' The `.scale` arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available `tm_scale_` functions. The default scale that is used is specified by the tmap option `scales.var`.
#'
-#' The \code{.legend} arguments determine the used legend, specified with \code{\link{tm_legend}}. The default legend and its settings are determined by the tmap options \code{legend.}.
+#' The `.legend` arguments determine the used legend, specified with [tm_legend()]. The default legend and its settings are determined by the tmap options `legend.`.
#'
-#' The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link{tm_facets}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link{tm_facets_grid}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link{tm_facets_wrap}} and \code{\link{tm_facets_stack}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
+#' The `.free` arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see [tm_facets()]). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid ([tm_facets_grid()]). For instance, `col.free = c(TRUE, FALSE, FALSE)` means that for the visual variable `col`, each row of facets will has its own scale, and therefore its own legend. For facet wraps and stacks ([tm_facets_wrap()] and [tm_facets_stack()]) there is only one facet dimension, so the `.free` argument requires only one logical value.
#'
#' @param text,text.scale,text.legend,text.free Visual variable that determines the text. See details.
#' @param size,size.scale,size.legend,size.free Visual variable that determines the font size. See details.
#' @param col,col.scale,col.legend,col.free Visual variable that determines the col color. See details.
-#' @param col_alpha,col_alpha.scale,col_alpha.legend,col_alpha.free Visual variable that determines the border color alpha transparency. See details.
-#' @param fontface,fontface.scale,fontface.legend,fontface.free Visual variable that determines the font face. See details.
-#' @param fontfamily The font family. See \code{\link[grid:gpar]{gpar}} for details.
+#' @param col_alpha,col_alpha.scale,col_alpha.legend,col_alpha.free Visual variable that determines the border color alpha transparency. See Details.
+#' @param fontface,fontface.scale,fontface.legend,fontface.free Visual variable that determines the font face. See Details.
+#' @param fontfamily The font family. See [gpar()][grid::gpar()] for details.
#' @param shadow Shadow behind the text. Logical or color.
-#' @param plot.order Specification in which order the spatial features are drawn. See \code{\link{tm_plot_order}} for details.
+#' @param plot.order Specification in which order the spatial features are drawn. See [tm_plot_order()] for details.
#' @param trans.args,mapping.args lists that are passed on to internal transformation and mapping functions respectively
-#' @param zindex Map layers are drawn on top of each other. The \code{zindex} numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.
+#' @param zindex Map layers are drawn on top of each other. The `zindex` numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.
#' @param group Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)
#' @param group.control In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).
#' @param ... to catch deprecated arguments from version < 4.0
diff --git a/R/tm_layout.R b/R/tm_layout.R
index c0fef02ea..8d0445676 100644
--- a/R/tm_layout.R
+++ b/R/tm_layout.R
@@ -8,7 +8,7 @@
#'
#' Set of tmap options that are directly related to the layout.
#'
-#' @param modes,crs,facet.max,facet.flip,raster.max.cells,show.messages,show.warnings,output.format,output.size,output.dpi,output.dpi.animation,value.const,value.na,value.null,value.blank,values.var,values.range,value.neutral,scales.var,scale.misc.args,label.format,label.na,scale,asp,bg.color,outer.bg.color,frame,frame.lwd,frame.r,frame.double.line,outer.margins,inner.margins,inner.margins.extra,meta.margins,meta.auto.margins,between.margin,component.offset,component.stack.margin,grid.mark.height,xylab.height,coords.height,xlab.show,xlab.text,xlab.size,xlab.color,xlab.rotation,xlab.space,xlab.fontface,xlab.fontfamily,xlab.side,ylab.show,ylab.text,ylab.size,ylab.color,ylab.rotation,ylab.space,ylab.fontface,ylab.fontfamily,ylab.side,panel.type,panel.wrap.pos,panel.xtab.pos,unit,color.sepia.intensity,color.saturation,color.vision.deficiency.sim,text.fontface,text.fontfamily,legend.show,legend.design,legend.orientation,legend.position,legend.width,legend.height,legend.stack,legend.group.frame,legend.resize.as.group,legend.reverse,legend.na.show,legend.title.color,legend.title.size,legend.title.fontface,legend.title.fontfamily,legend.xlab.color,legend.xlab.size,legend.xlab.fontface,legend.xlab.fontfamily,legend.ylab.color,legend.ylab.size,legend.ylab.fontface,legend.ylab.fontfamily,legend.text.color,legend.text.size,legend.text.fontface,legend.text.fontfamily,legend.frame,legend.frame.lwd,legend.frame.r,legend.bg.color,legend.bg.alpha,legend.settings.standard.portrait,legend.settings.standard.landscape,title.show,title.size,title.color,title.fontface,title.fontfamily,title.bg.color,title.bg.alpha,title.padding,title.frame,title.frame.lwd,title.frame.r,title.stack,title.position,title.group.frame,title.resize.as.group,credits.show,credits.size,credits.color,credits.fontface,credits.fontfamily,credits.bg.color,credits.bg.alpha,credits.padding,credits.frame,credits.frame.lwd,credits.frame.r,credits.stack,credits.position,credits.width,credits.heigth,credits.group.frame,credits.resize.as.group,compass.north,compass.type,compass.text.size,compass.size,compass.show.labels,compass.cardinal.directions,compass.text.color,compass.color.dark,compass.color.light,compass.lwd,compass.bg.color,compass.bg.alpha,compass.margins,compass.show,compass.stack,compass.position,compass.frame,compass.frame.lwd,compass.frame.r,compass.group.frame,compass.resize.as.group,scalebar.show,scalebar.breaks,scalebar.width,scalebar.text.size,scalebar.text.color,scalebar.color.dark,scalebar.color.light,scalebar.lwd,scalebar.position,scalebar.bg.color,scalebar.bg.alpha,scalebar.size,scalebar.margins,scalebar.stack,scalebar.frame,scalebar.frame.lwd,scalebar.frame.r,scalebar.group.frame,scalebar.resize.as.group,grid.show,grid.labels.pos,grid.x,grid.y,grid.n.x,grid.n.y,grid.crs,grid.col,grid.lwd,grid.alpha,grid.labels.show,grid.labels.size,grid.labels.col,grid.labels.rot,grid.labels.format,grid.labels.cardinal,grid.labels.margin.x,grid.labels.margin.y,grid.labels.space.x,grid.labels.space.y,grid.labels.inside.frame,grid.ticks,grid.lines,grid.ndiscr,mouse_coordinates.stack,mouse_coordinates.position,mouse_coordinates.show,panel.show,panel.labels,panel.label.size,panel.label.color,panel.label.fontface,panel.label.fontfamily,panel.label.bg.color,panel.label.height,panel.label.rot,qtm.scalebar,qtm.minimap,qtm.mouse.coordinates,earth.boundary,earth.boundary.color,earth.boundary.lwd,earth.datum,space.color,attr.color,max.categories,legend.hist.bg.color,legend.hist.bg.alpha,legend.hist.size,legend.hist.height,legend.hist.width,attr.outside,attr.outside.position,attr.outside.size,attr.position,attr.just,basemap.server,basemap.alpha,basemap.zoom,overlays,overlays.alpha,alpha,colorNA,symbol.size.fixed,dot.size.fixed,text.size.variable,bbox,check.and.fix,set.bounds,set.view,set.zoom.limits,name,basemap.show see\code{\link{tmap_options}}
+#' @param modes,crs,facet.max,facet.flip,raster.max.cells,show.messages,show.warnings,output.format,output.size,output.dpi,output.dpi.animation,value.const,value.na,value.null,value.blank,values.var,values.range,value.neutral,scales.var,scale.misc.args,label.format,label.na,scale,asp,bg.color,outer.bg.color,frame,frame.lwd,frame.r,frame.double.line,outer.margins,inner.margins,inner.margins.extra,meta.margins,meta.auto.margins,between.margin,component.offset,component.stack.margin,grid.mark.height,xylab.height,coords.height,xlab.show,xlab.text,xlab.size,xlab.color,xlab.rotation,xlab.space,xlab.fontface,xlab.fontfamily,xlab.side,ylab.show,ylab.text,ylab.size,ylab.color,ylab.rotation,ylab.space,ylab.fontface,ylab.fontfamily,ylab.side,panel.type,panel.wrap.pos,panel.xtab.pos,unit,color.sepia.intensity,color.saturation,color.vision.deficiency.sim,text.fontface,text.fontfamily,legend.show,legend.design,legend.orientation,legend.position,legend.width,legend.height,legend.stack,legend.group.frame,legend.resize.as.group,legend.reverse,legend.na.show,legend.title.color,legend.title.size,legend.title.fontface,legend.title.fontfamily,legend.xlab.color,legend.xlab.size,legend.xlab.fontface,legend.xlab.fontfamily,legend.ylab.color,legend.ylab.size,legend.ylab.fontface,legend.ylab.fontfamily,legend.text.color,legend.text.size,legend.text.fontface,legend.text.fontfamily,legend.frame,legend.frame.lwd,legend.frame.r,legend.bg.color,legend.bg.alpha,legend.settings.standard.portrait,legend.settings.standard.landscape,title.show,title.size,title.color,title.fontface,title.fontfamily,title.bg.color,title.bg.alpha,title.padding,title.frame,title.frame.lwd,title.frame.r,title.stack,title.position,title.group.frame,title.resize.as.group,credits.show,credits.size,credits.color,credits.fontface,credits.fontfamily,credits.bg.color,credits.bg.alpha,credits.padding,credits.frame,credits.frame.lwd,credits.frame.r,credits.stack,credits.position,credits.width,credits.heigth,credits.group.frame,credits.resize.as.group,compass.north,compass.type,compass.text.size,compass.size,compass.show.labels,compass.cardinal.directions,compass.text.color,compass.color.dark,compass.color.light,compass.lwd,compass.bg.color,compass.bg.alpha,compass.margins,compass.show,compass.stack,compass.position,compass.frame,compass.frame.lwd,compass.frame.r,compass.group.frame,compass.resize.as.group,scalebar.show,scalebar.breaks,scalebar.width,scalebar.text.size,scalebar.text.color,scalebar.color.dark,scalebar.color.light,scalebar.lwd,scalebar.position,scalebar.bg.color,scalebar.bg.alpha,scalebar.size,scalebar.margins,scalebar.stack,scalebar.frame,scalebar.frame.lwd,scalebar.frame.r,scalebar.group.frame,scalebar.resize.as.group,grid.show,grid.labels.pos,grid.x,grid.y,grid.n.x,grid.n.y,grid.crs,grid.col,grid.lwd,grid.alpha,grid.labels.show,grid.labels.size,grid.labels.col,grid.labels.rot,grid.labels.format,grid.labels.cardinal,grid.labels.margin.x,grid.labels.margin.y,grid.labels.space.x,grid.labels.space.y,grid.labels.inside.frame,grid.ticks,grid.lines,grid.ndiscr,mouse_coordinates.stack,mouse_coordinates.position,mouse_coordinates.show,panel.show,panel.labels,panel.label.size,panel.label.color,panel.label.fontface,panel.label.fontfamily,panel.label.bg.color,panel.label.height,panel.label.rot,qtm.scalebar,qtm.minimap,qtm.mouse.coordinates,earth.boundary,earth.boundary.color,earth.boundary.lwd,earth.datum,space.color,attr.color,max.categories,legend.hist.bg.color,legend.hist.bg.alpha,legend.hist.size,legend.hist.height,legend.hist.width,attr.outside,attr.outside.position,attr.outside.size,attr.position,attr.just,basemap.server,basemap.alpha,basemap.zoom,overlays,overlays.alpha,alpha,colorNA,symbol.size.fixed,dot.size.fixed,text.size.variable,bbox,check.and.fix,set.bounds,set.view,set.zoom.limits,name,basemap.show see[tmap_options()]
#' @param title,main.title deprecated
#' @param ... used to catch other deprecated arguments
#' @rdname tm_layout
@@ -58,10 +58,10 @@ tm_layout = function(
#' @param control.position position of the control attribute
#' @param control.bases base layers
#' @param control.overlays overlay layers
-#' @param set.bounds logical that determines whether maximum bounds are set, or a bounding box. Not applicable in plot mode. In view mode, this is passed on to \code{\link[leaflet:setMaxBounds]{setMaxBounds}}
-#' @param set.view numeric vector that determines the view. Either a vector of three: lng, lat, and zoom, or a single value: zoom. See \code{\link[leaflet:setView]{setView}}. Only applicable if \code{bbox} is not specified
-#' @param set.zoom.limits numeric vector of two that set the minimum and maximum zoom levels (see \code{\link[leaflet:tileOptions]{tileOptions}}).
-#' @param leaflet.options options passed on to \code{\link[leaflet:leafletOptions]{leafletOptions}}
+#' @param set.bounds logical that determines whether maximum bounds are set, or a bounding box. Not applicable in plot mode. In view mode, this is passed on to [setMaxBounds()][leaflet::setMaxBounds()]
+#' @param set.view numeric vector that determines the view. Either a vector of three: lng, lat, and zoom, or a single value: zoom. See [setView()][leaflet::setView()]. Only applicable if `bbox` is not specified
+#' @param set.zoom.limits numeric vector of two that set the minimum and maximum zoom levels (see [tileOptions()][leaflet::tileOptions()]).
+#' @param leaflet.options options passed on to [leafletOptions()][leaflet::leafletOptions()]
#' @export
tm_view = function(use.WebGL,
control.position,
@@ -79,7 +79,7 @@ tm_view = function(use.WebGL,
#'
#' Plot mode options. This option is specific to the plot mode.
#'
-#' @param use.gradient Use gradient fill using \code{\link[grid:linearGradient]{linearGradient}}
+#' @param use.gradient Use gradient fill using [linearGradient()][grid::linearGradient()]
#' @export
tm_plot = function(use.gradient) {
args = lapply(as.list(match.call()[-1]), eval, envir = parent.frame())
diff --git a/R/tm_plot_order.R b/R/tm_plot_order.R
index c7c4ba411..a8c9abbec 100644
--- a/R/tm_plot_order.R
+++ b/R/tm_plot_order.R
@@ -2,9 +2,9 @@
#'
#' Determine plotting order of features.
#'
-#' @param aes Visual variable for which the values determine the plotting order. Example: bubble map where the \code{"size"} aesthetic is used. A data variable (say population) is mapped via a continuous scale (\code{\link{tm_scale_continuous}}) to bubble sizes. The bubbles are plotted in order of size. How is determined by the other arguments. Use \code{"DATA"} to keep the same order as in the data. Another special value are \code{"AREA"} and \code{"LENGTH"} which are preserved for polygons and lines respectively: rather than a data variable the polygon area / line lengths determines the plotting order.
-#' @param reverse Logical that determines whether the visual values are plotted in reversed order. The visual values (specified with tmap option \code{"values.var"}) are by default reversed, so plotted starting from the last value. In the bubble map example, this means that large bubbles are plotted first, hence at the bottom.
-#' @param na.order Where should features be plotted that have an \code{NA} value for (at least) one other aesthetic variable? In the (order) \code{"mix"}, at the \code{"bottom"}, or on \code{"top"}? In the bubble map example: if fill color is missing for some bubble, where should those bubbles be plotted?
+#' @param aes Visual variable for which the values determine the plotting order. Example: bubble map where the `"size"` aesthetic is used. A data variable (say population) is mapped via a continuous scale ([tm_scale_continuous()]) to bubble sizes. The bubbles are plotted in order of size. How is determined by the other arguments. Use `"DATA"` to keep the same order as in the data. Another special value are `"AREA"` and `"LENGTH"` which are preserved for polygons and lines respectively: rather than a data variable the polygon area / line lengths determines the plotting order.
+#' @param reverse Logical that determines whether the visual values are plotted in reversed order. The visual values (specified with tmap option `"values.var"`) are by default reversed, so plotted starting from the last value. In the bubble map example, this means that large bubbles are plotted first, hence at the bottom.
+#' @param na.order Where should features be plotted that have an `NA` value for (at least) one other aesthetic variable? In the (order) `"mix"`, at the `"bottom"`, or on `"top"`? In the bubble map example: if fill color is missing for some bubble, where should those bubbles be plotted?
#' @param null.order Where should non-selected (aka null) features be plotted?
#' @param null.below.na Should null features be plotted below NA features?
#' @export
diff --git a/R/tm_pos.R b/R/tm_pos.R
index ea2868e6c..c2fd57a82 100644
--- a/R/tm_pos.R
+++ b/R/tm_pos.R
@@ -1,6 +1,6 @@
#' Set the position of map components
#'
-#' Set the position of map components, such as legends, title, compass, scale bar, etc. `tm_pos` is the function to position these components: `tm_pos_out` places the components outside the map area and `tm_pos_in` inside the map area. Each \code{position} argument of a map layer or component should be specified with one of these functions. The functions `tm_pos_auto_out` and `tm_pos_auto_in` are used to set the components automatically, and are recommended to use globally, via \code{\link{tmap_options}}. See details how the positioning works.
+#' Set the position of map components, such as legends, title, compass, scale bar, etc. `tm_pos()` is the function to position these components: `tm_pos_out()` places the components outside the map area and `tm_pos_in()` inside the map area. Each `position` argument of a map layer or component should be specified with one of these functions. The functions `tm_pos_auto_out()` and `tm_pos_auto_in()` are used to set the components automatically, and are recommended to use globally, via [tmap_options()]. See Details how the positioning works.
#'
#' @param cell.h,cell.v The plotting area is overlaid with a 3x3 grid, of which the middle grid cell is the map area. Components can be drawn into any cell. `cell.h` specifies the horizontal position (column) can take values `"left"`, `"center"`, and `"right"`, and `cell.v` specifies the vertical position (row) and can take values `"top"`, `"center"`, and `"bottom"`. See details for a graphical explanation.
#' @param pos.h,pos.v The position of the component within the cell. The main options for `pos.h` are `"left"`, `"center"`, and `"right"`, and for `cell.v` these are `"top"`, `"center"`, and `"bottom"`. These options can also be provided in upper case; in that case there is no offset (see the tmap option `component.offset`). Also numbers between 0 and 1 can be provided, which determine the position of the component inside the cell (with (0,0) being left bottom). The arguments `just.h` and `just.v` determine the justification point.
@@ -12,39 +12,38 @@
#' |---------------:|:---------------|:------------------|:------------------|:------|
#' | | +------------------- | +-------------------------------- | +------------------- | +
#' | | \| | \| |\| |\| |
-#' | "top" | \| | \| |\| |\| |
+#' | `"top"` | \| | \| |\| |\| |
#' | | \| | \| |\| |\| |
#' | | +------------------- | +-------------------------------- | +------------------- | +
#' | | \| | \| |\| |\| |
#' | | \| | \| |\| |\| |
-#' | cell.v "center"| \| | \| Map(s) |\| |\| |
+#' | `cell.v` "center"| \| | \| Map(s) |\| |\| |
#' | | \| | \| |\| |\| |
#' | | \| | \| |\| |\| |
#' | | +------------------- | +-------------------------------- | +------------------- | +
#' | | \| | \| |\| |\| |
-#' | "bottom" | \| | \| |\| |\| |
+#' | `"bottom"` | \| | \| |\| |\| |
#' | | \| | \| |\| |\| |
#' | | +------------------- | +-------------------------------- | +------------------- | +
#' | | `"left"` | `"center"` | `"right"` | |
#' | | | `cell.h` | | |
#'
-#' \code{tm_pos_in} sets the position of the component(s) inside the maps area, which is equivalent to the center-center cell (in case there are facets, these are all drawn in this center-center cell).
+#' `tm_pos_in()` sets the position of the component(s) inside the maps area, which is equivalent to the center-center cell (in case there are facets, these are all drawn in this center-center cell).
#'
-#' \code{tm_pos_out} sets the position of the component(s) outside the map.
+#' `tm_pos_out()` sets the position of the component(s) outside the map.
#'
-#' The amount of space that the top and bottom rows, and left and right columns occupy is determined by the \code{\link{tm_layout}} arguments \code{meta.margins} and \code{meta.auto.margins}. The former sets the relative space of the bottom, left, top, and right side. In case these are set to \code{NA}, the space is set automatically based on 1) the maximum relative space specified by \code{meta.auto.margins} and 2) the presence and size of components in each cell. For instance, if there is one landscape oriented legend in the center-bottom cell, then the relative space of the bottom row is set to the height of that legend (given that it is smaller than the corresponding value of `meta.auto.margins`), while the other four sides are set to 0.
+#' The amount of space that the top and bottom rows, and left and right columns occupy is determined by the [tm_layout()] arguments `meta.margins` and `meta.auto.margins`. The former sets the relative space of the bottom, left, top, and right side. In case these are set to `NA`, the space is set automatically based on 1) the maximum relative space specified by `meta.auto.margins` and 2) the presence and size of components in each cell. For instance, if there is one landscape oriented legend in the center-bottom cell, then the relative space of the bottom row is set to the height of that legend (given that it is smaller than the corresponding value of `meta.auto.margins`), while the other four sides are set to 0.
#'
-#' \code{tm_pos_auto_out} is more complex: the `cell.h` and `cell.v` arguments of should be set to one of the four corners. It does not mean that the components are drawn in a corner. The corner represents the sides of the map that the components are drawn. By default, legends are drawn either at the bottom or on the right-side of the map by default (see `tmap_options("legend.position")`). Only when there are row- and column-wise legends and a general legend (using \code{\link{tm_facets_grid}}), the general legend is drawn in the corner, but in practice this case will be rare.
+#' `tm_pos_auto_out()` is more complex: the `cell.h` and `cell.v` arguments of should be set to one of the four corners. It does not mean that the components are drawn in a corner. The corner represents the sides of the map that the components are drawn. By default, legends are drawn either at the bottom or on the right-side of the map by default (see `tmap_options("legend.position")`). Only when there are row- and column-wise legends and a general legend (using [tm_facets_grid()]), the general legend is drawn in the corner, but in practice this case will be rare.
#'
#' The arguments `pos.h` and `pos.v` determine where the components are drawn within the cell. Again, with `"left"`, `"center"`, and `"right"` for `pos.h` and `"top"`, `"center"`, and `"bottom"` for `pos.v`. The values can also be specified in upper-case, which influences the offset with the cell borders, which is determined by tmap option `component.offset`. By default, there is a small offset when components are drawn inside and no offset when they are drawn outside or with upper-case.
#'
-#' \code{tm_pos_auto_in} automatically determines `pos.h` and `pos.v` given the available space inside the map. This is similar to the default positioning in tmap3.
+#' `tm_pos_auto_in()` automatically determines `pos.h` and `pos.v` given the available space inside the map. This is similar to the default positioning in tmap3.
#'
#' In case multiple components are draw in the same cell and the same position inside that cell, they are stacked (determined which the `stack` argument in the legend or component function). The `align.h` and `align.v` arguments determine how these components will be justified with each other.
#'
-#' Note that legends and components may be different for a facet row or column. This is the case when \code{\link{tm_facets_grid}} or \code{\link{tm_facets_stack}} are applied and when scales are set to free (with the \code{.free} argument of the map layer functions). In case a legends or components are draw row- or column wise, and the position of the legends (or components) is right next to the maps, these legends (or components) will be aligned with the maps.
+#' Note that legends and components may be different for a facet row or column. This is the case when [tm_facets_grid()] or [tm_facets_stack()] are applied and when scales are set to free (with the `.free` argument of the map layer functions). In case a legends or components are draw row- or column wise, and the position of the legends (or components) is right next to the maps, these legends (or components) will be aligned with the maps.
#'
-#' @md
#' @export
#' @name tm_pos
#' @rdname tm_pos
diff --git a/R/tm_scale_.R b/R/tm_scale_.R
index cb1f5d87e..60111ecfd 100644
--- a/R/tm_scale_.R
+++ b/R/tm_scale_.R
@@ -18,9 +18,9 @@ tm_shape_vars = function() {
#' Scales: automatic scale
#'
-#' Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link{tm_polygons}}). The function \code{tm_scale} is an scale that is set automatically given by the data type (factor, numeric, and integer) and the visual variable. The tmap option \code{scales.var} contains information which scale is applied when.
+#' Scales in tmap are configured by the family of functions with prefix `tm_scale`. Such function should be used for the input of the `.scale` arguments in the layer functions (e.g. `fill.scale` in [tm_polygons()]). The function `tm_scale()` is a scale that is set automatically given by the data type (factor, numeric, and integer) and the visual variable. The tmap option `scales.var` contains information which scale is applied when.
#'
-#' @param ... arguments passed on to the applied scale function \code{tm_scale_}
+#' @param ... arguments passed on to the applied scale function `tm_scale_*()`
#' @export
tm_scale = function(...) {
structure(c(list(FUN = "tmapScaleAuto"), list(...)), class = c("tm_scale_auto", "tm_scale", "list"))
@@ -52,22 +52,22 @@ tm_scale_ordinal = function(n.max = 30,
#' Scales: categorical and ordinal scale
#'
-#' Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link{tm_polygons}}). The functions \code{tm_scale_categorical} and \code{tm_scale_ordinal} are used for categorical data. The only difference between these functions is that the former assumes unordered categories whereas the latter assumes ordered categories. For colors (the visual variable \code{fill} or \code{col}), different default color palettes are used (see the tmap option \code{values.var}).
+#' Scales in tmap are configured by the family of functions with prefix `tm_scale`. Such function should be used for the input of the `.scale` arguments in the layer functions (e.g. `fill.scale` in [tm_polygons()]). The functions `tm_scale_categorical()` and `tm_scale_ordinal()` are used for categorical data. The only difference between these functions is that the former assumes unordered categories whereas the latter assumes ordered categories. For colors (the visual variable `fill` or `col`), different default color palettes are used (see the tmap option `values.var`).
#'
-#' @param n.max Maximum number of categories (factor levels). In case there are more, they are grouped into \code{n.max} groups.
-#' @param values (generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{tm_polygons}) this is a palette name from the `cols4all` package (see \code{\link[cols4all:c4a]{c4a}}) or vector of colors, for size (e.g. \code{size} for \code{tm_symbols}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{\link{tm_symbols}}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.
+#' @param n.max Maximum number of categories (factor levels). In case there are more, they are grouped into `n.max` groups.
+#' @param values (generic scale argument) The visual values. For colors (e.g. `fill` or `col` for `tm_polygons()`) this is a palette name from the `cols4all` package (see [cols4all::c4a()]) or vector of colors, for size (e.g. `size` for `tm_symbols()`) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. `shape` for [tm_symbols()]) these are a set of symbols, etc. The tmap option `values.var` contains the default values per visual variable and in some cases also per data type.
#' @param values.repeat (generic scale argument) Should the values be repeated in case there are more categories?
-#' @param values.range (generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \code{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \code{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.
-#' @param values.scale (generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link{tm_symbols}} and \code{lwd} of \code{\link{tm_lines}}.
-#' @param value.na (generic scale argument) Value used for missing values. See tmap option \code{"value.na"} for defaults per visual variable.
-#' @param value.null (generic scale argument) Value used for NULL values. See tmap option \code{"value.null"} for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).
-#' @param value.neutral (generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link{tm_symbols}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.
+#' @param values.range (generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as `c(0, 1)`. For instance, when a grey scale is used for color (from black to white), `c(0,1)` means that all colors are used, `0.25, 0.75` means that only colors from dark grey to light grey are used (more precisely `"grey25"` to `"grey75"`), and `0, 0.5` means that only colors are used from black to middle grey (`"grey50"`). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option `values.range`.
+#' @param values.scale (generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as `size` of [tm_symbols()] and `lwd` of [tm_lines()].
+#' @param value.na (generic scale argument) Value used for missing values. See tmap option `"value.na"` for defaults per visual variable.
+#' @param value.null (generic scale argument) Value used for NULL values. See tmap option `"value.null"` for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).
+#' @param value.neutral (generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both `fill` and `size` are used for [tm_symbols()] (using filled circles), the size legend items are filled with the `value.neutral` color from the `fill.scale` scale, and fill legend items are bubbles of size `value.neutral` from the `size.scale` scale.
#' @param levels Levels to show. Other values are treated as missing.
#' @param levels.drop Should unused levels be dropped (and therefore are not assigned to a visual value and shown in the legend)?
#' @param labels (generic scale argument) Labels
#' @param label.na (generic scale argument) Label for missing values
#' @param label.null (generic scale argument) Label for null (out-of-scope) values
-#' @param label.format (generic scale argument) Label formatting (similar to legend.format in tmap3)
+#' @param label.format (generic scale argument) Label formatting (similar to `legend.format` in tmap3)
#' @export
#' @name tm_scale_categorical
#' @rdname tm_scale_categorical
@@ -90,22 +90,22 @@ tm_scale_categorical = function(n.max = 30,
#' Scales: interval scale
#'
-#' Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link{tm_polygons}}). The function \code{tm_scale_interval} is used for numerical data.
+#' Scales in tmap are configured by the family of functions with prefix `tm_scale`. Such function should be used for the input of the `.scale` arguments in the layer functions (e.g. `fill.scale` in [tm_polygons()]). The function `tm_scale_interval` is used for numerical data.
#'
-#' @param n Number of intervals. For some styles (see argument \code{style} below) it is the preferred number rather than the exact number.
-#' @param style Method to create intervals. Options are \code{"cat"}, \code{"fixed"}, \code{"sd"}, \code{"equal"}, \code{"pretty"}, \code{"quantile"}, \code{"kmeans"}, \code{"hclust"}, \code{"bclust"}, \code{"fisher"}, \code{"jenks"}, \code{"dpih"}, \code{"headtails"}, and \code{"log10_pretty"}. See the details in \code{\link[classInt:classIntervals]{classIntervals}} (extra arguments can be passed on via \code{style.args}).
-#' @param style.args List of extra arguments passed on to \code{\link[classInt:classIntervals]{classIntervals}}.
-#' @param breaks Interval breaks (only used and required when \code{style=="fixed"})
-#' @param interval.closure value that determines whether where the intervals are closed: \code{"left"} or \code{"right"}. If \code{as.count = TRUE}, \code{inverval.closure} is always set to \code{"left"}.
-#' @param midpoint The data value that is interpreted as the midpoint. By default it is set to 0 if negative and positive values are present. Useful when values are diverging colors. In that case, the two sides of the color palette are assigned to negative respectively positive values. If all values are positive or all values are negative, then the midpoint is set to \code{NA}, which means that the value that corresponds to the middle color class (see \code{style}) is mapped to the middle color. If it is specified for sequential color palettes (e.g. \code{"Blues"}), then this color palette will be treated as a diverging color palette.
-#' @param as.count Should the data variable be processed as a count variable? For instance, if \code{style = "pretty"}, \code{n = 2}, and the value range of the variable is 0 to 10, then the column classes for \code{as.count = TRUE} are 0; 1 to 5; 6 to 10 (note that 0 is regarded as an own category) whereas for \code{as.count = FALSE} they are 0 to 5; 5 to 10. Only applicable if \code{style} is \code{"pretty"}, \code{"fixed"}, or \code{"log10_pretty"}. By default, \code{TRUE} if \code{style} is one of these, and the variable is an integer.
-#' @param values (generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{\link{tm_polygons}}) this is a palette name from the `cols4all` package (see \code{\link[cols4all:c4a]{c4a}}) or vector of colors, for size (e.g. \code{size} for \code{tm_symbols}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{tm_symbols}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.
+#' @param n Number of intervals. For some styles (see argument `style` below) it is the preferred number rather than the exact number.
+#' @param style Method to create intervals. Options are `"cat"`, `"fixed"`, `"sd"`, `"equal"`, `"pretty"`, `"quantile"`, `"kmeans"`, `"hclust"`, `"bclust"`, `"fisher"`, `"jenks"`, `"dpih"`, `"headtails"`, and `"log10_pretty"`. See the details in [classInt::classIntervals()] (extra arguments can be passed on via `style.args`).
+#' @param style.args List of extra arguments passed on to [classInt::classIntervals()].
+#' @param breaks Interval breaks (only used and required when `style=="fixed"`)
+#' @param interval.closure value that determines whether where the intervals are closed: `"left"` or `"right"`. If `as.count = TRUE`, `inverval.closure` is always set to `"left"`.
+#' @param midpoint The data value that is interpreted as the midpoint. By default it is set to 0 if negative and positive values are present. Useful when values are diverging colors. In that case, the two sides of the color palette are assigned to negative respectively positive values. If all values are positive or all values are negative, then the midpoint is set to `NA`, which means that the value that corresponds to the middle color class (see `style`) is mapped to the middle color. If it is specified for sequential color palettes (e.g. `"Blues"`), then this color palette will be treated as a diverging color palette.
+#' @param as.count Should the data variable be processed as a count variable? For instance, if `style = "pretty"`, `n = 2`, and the value range of the variable is 0 to 10, then the column classes for `as.count = TRUE` are 0; 1 to 5; 6 to 10 (note that 0 is regarded as an own category) whereas for `as.count = FALSE` they are 0 to 5; 5 to 10. Only applicable if `style` is `"pretty"`, `"fixed"`, or `"log10_pretty"`. By default, `TRUE` if `style` is one of these, and the variable is an integer.
+#' @param values (generic scale argument) The visual values. For colors (e.g. `fill` or `col` for [tm_polygons()]) this is a palette name from the `cols4all` package (see [cols4all::c4a()]) or vector of colors, for size (e.g. `size` for `tm_symbols`) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. `shape` for `tm_symbols`) these are a set of symbols, etc. The tmap option `values.var` contains the default values per visual variable and in some cases also per data type.
#' @param values.repeat (generic scale argument) Should the values be repeated in case there are more categories?
-#' @param values.range (generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \code{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \code{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.
-#' @param values.scale (generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link{tm_symbols}} and \code{lwd} of \code{\link{tm_lines}}.
-#' @param value.na (generic scale argument) Value used for missing values. See tmap option \code{"value.na"} for defaults per visual variable.
-#' @param value.null (generic scale argument) Value used for NULL values. See tmap option \code{"value.null"} for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).
-#' @param value.neutral (generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link{tm_symbols}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.
+#' @param values.range (generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as `c(0, 1)`. For instance, when a grey scale is used for color (from black to white), `c(0,1)` means that all colors are used, `0.25, 0.75` means that only colors from dark grey to light grey are used (more precisely `"grey25"` to `"grey75"`), and `0, 0.5` means that only colors are used from black to middle grey (`"grey50"`). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option `values.range`.
+#' @param values.scale (generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as `size` of [tm_symbols()] and `lwd` of [tm_lines()].
+#' @param value.na (generic scale argument) Value used for missing values. See tmap option `"value.na"` for defaults per visual variable.
+#' @param value.null (generic scale argument) Value used for NULL values. See tmap option `"value.null"` for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).
+#' @param value.neutral (generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both `fill` and `size` are used for [tm_symbols()] (using filled circles), the size legend items are filled with the `value.neutral` color from the `fill.scale` scale, and fill legend items are bubbles of size `value.neutral` from the `size.scale` scale.
#' @param labels (generic scale argument) Labels
#' @param label.na (generic scale argument) Label for missing values
#' @param label.null (generic scale argument) Label for null (out-of-scope) values
@@ -134,21 +134,21 @@ tm_scale_intervals = function(n = 5,
#' Scales: discrete scale
#'
-#' Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link{tm_polygons}}). The function \code{tm_scale_discrete} is used for discrete numerical data, such as integers.
+#' Scales in tmap are configured by the family of functions with prefix `tm_scale`. Such function should be used for the input of the `.scale` arguments in the layer functions (e.g. `fill.scale` in [tm_polygons()]). The function `tm_scale_discrete()` is used for discrete numerical data, such as integers.
#'
#' @param ticks Discrete values. If not specified, it is determined automatically: unique values are put on a discrete scale.
-#' @param midpoint The data value that is interpreted as the midpoint. By default it is set to 0 if negative and positive values are present. Useful when values are diverging colors. In that case, the two sides of the color palette are assigned to negative respectively positive values. If all values are positive or all values are negative, then the midpoint is set to \code{NA}, which means that the value that corresponds to the middle color class (see \code{style}) is mapped to the middle color. If it is specified for sequential color palettes (e.g. \code{"Blues"}), then this color palette will be treated as a diverging color palette.
-#' @param values (generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{\link{tm_polygons}}) this is a palette name from the `cols4all` package (see \code{\link[cols4all:c4a]{c4a}}) or vector of colors, for size (e.g. \code{size} for \code{tm_symbols}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{\link{tm_symbols}}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.
+#' @param midpoint The data value that is interpreted as the midpoint. By default it is set to 0 if negative and positive values are present. Useful when values are diverging colors. In that case, the two sides of the color palette are assigned to negative respectively positive values. If all values are positive or all values are negative, then the midpoint is set to `NA`, which means that the value that corresponds to the middle color class (see `style`) is mapped to the middle color. If it is specified for sequential color palettes (e.g. `"Blues"`), then this color palette will be treated as a diverging color palette.
+#' @param values (generic scale argument) The visual values. For colors (e.g. `fill` or `col` for [tm_polygons()]) this is a palette name from the `cols4all` package (see [cols4all::c4a()]) or vector of colors, for size (e.g. `size` for `tm_symbols`) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. `shape` for [tm_symbols()]) these are a set of symbols, etc. The tmap option `values.var` contains the default values per visual variable and in some cases also per data type.
#' @param values.repeat (generic scale argument) Should the values be repeated in case there are more categories?
-#' @param values.range (generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \code{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \code{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.
-#' @param values.scale (generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link{tm_symbols}} and \code{lwd} of \code{\link{tm_lines}}.
-#' @param value.na (generic scale argument) Value used for missing values. See tmap option \code{"value.na"} for defaults per visual variable.
-#' @param value.null (generic scale argument) Value used for NULL values. See tmap option \code{"value.null"} for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).
-#' @param value.neutral (generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link{tm_symbols}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.
+#' @param values.range (generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as `c(0, 1)`. For instance, when a grey scale is used for color (from black to white), `c(0,1)` means that all colors are used, `0.25, 0.75` means that only colors from dark grey to light grey are used (more precisely `"grey25"` to `"grey75"`), and `0, 0.5` means that only colors are used from black to middle grey (`"grey50"`). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option `values.range`.
+#' @param values.scale (generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as `size` of [tm_symbols()] and `lwd` of [tm_lines()].
+#' @param value.na (generic scale argument) Value used for missing values. See tmap option `"value.na"` for defaults per visual variable.
+#' @param value.null (generic scale argument) Value used for NULL values. See tmap option `"value.null"` for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).
+#' @param value.neutral (generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both `fill` and `size` are used for [tm_symbols()] (using filled circles), the size legend items are filled with the `value.neutral` color from the `fill.scale` scale, and fill legend items are bubbles of size `value.neutral` from the `size.scale` scale.
#' @param labels (generic scale argument) Labels
#' @param label.na (generic scale argument) Label for missing values
#' @param label.null (generic scale argument) Label for null (out-of-scope) values
-#' @param label.format (generic scale argument) Label formatting (similar to legend.format in tmap3)
+#' @param label.format (generic scale argument) Label formatting (similar to `legend.format` in tmap3)
#' @export
tm_scale_discrete = function(ticks = NA,
#step = NA,
@@ -169,25 +169,25 @@ tm_scale_discrete = function(ticks = NA,
#' Scales: continuous scale
#'
-#' Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link{tm_polygons}}). The function \code{tm_scale_continuous} is used for continuous data. The functions \code{tm_scale_continuous_} use transformation functions x.
+#' Scales in tmap are configured by the family of functions with prefix `tm_scale`. Such function should be used for the input of the `.scale` arguments in the layer functions (e.g. `fill.scale` in [tm_polygons()]). The function `tm_scale_continuous` is used for continuous data. The functions `tm_scale_continuous_` use transformation functions x.
#'
-#' @param n Preferred number of tick labels. Only used if \code{ticks} is not specified
+#' @param n Preferred number of tick labels. Only used if `ticks` is not specified
#' @param limits Limits of the data values that are mapped to the continuous scale
#' @param outliers.trunc Should outliers be truncated? An outlier is a data value that is below or above the respectively lower and upper limit. A logical vector of two values is expected. The first and second value determines whether values lower than the lower limit respectively higher than the upper limit are truncated to the lower respectively upper limit. If `FALSE` (default), they are considered as missing values.
-#' @param ticks Tick values. If not specified, it is determined automatically with \code{n}
+#' @param ticks Tick values. If not specified, it is determined automatically with `n`
#' @param trans Transformation function. One of `"identity"` (default), `"log"`, and `"log1p"`. Note: the base of the log scale is irrelevant, since the log transformed values are normalized before mapping to visual values.
-#' @param midpoint The data value that is interpreted as the midpoint. By default it is set to 0 if negative and positive values are present. Useful when values are diverging colors. In that case, the two sides of the color palette are assigned to negative respectively positive values. If all values are positive or all values are negative, then the midpoint is set to \code{NA}, which means that the value that corresponds to the middle color class (see \code{style}) is mapped to the middle color. If it is specified for sequential color palettes (e.g. \code{"Blues"}), then this color palette will be treated as a diverging color palette.
-#' @param values (generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{\link{tm_polygons}}) this is a palette name from the `cols4all` package (see \code{\link[cols4all:c4a]{c4a}}) or vector of colors, for size (e.g. \code{size} for \code{\link{tm_symbols}}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{\link{tm_symbols}}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.
+#' @param midpoint The data value that is interpreted as the midpoint. By default it is set to 0 if negative and positive values are present. Useful when values are diverging colors. In that case, the two sides of the color palette are assigned to negative respectively positive values. If all values are positive or all values are negative, then the midpoint is set to `NA`, which means that the value that corresponds to the middle color class (see `style`) is mapped to the middle color. If it is specified for sequential color palettes (e.g. `"Blues"`), then this color palette will be treated as a diverging color palette.
+#' @param values (generic scale argument) The visual values. For colors (e.g. `fill` or `col` for [tm_polygons()]) this is a palette name from the `cols4all` package (see [cols4all::c4a()]) or vector of colors, for size (e.g. `size` for [tm_symbols()]) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. `shape` for [tm_symbols()]) these are a set of symbols, etc. The tmap option `values.var` contains the default values per visual variable and in some cases also per data type.
#' @param values.repeat (generic scale argument) Should the values be repeated in case there are more categories?
-#' @param values.range (generic scale argument) Range of the values, especially useful for color palettes. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \code{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \code{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.
-#' @param values.scale (generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link{tm_symbols}} and \code{lwd} of \code{\link{tm_lines}}.
-#' @param value.na (generic scale argument) Value used for missing values. See tmap option \code{"value.na"} for defaults per visual variable.
-#' @param value.null (generic scale argument) Value used for NULL values. See tmap option \code{"value.null"} for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).
-#' @param value.neutral (generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link{tm_symbols}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.
+#' @param values.range (generic scale argument) Range of the values, especially useful for color palettes. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as `c(0, 1)`. For instance, when a grey scale is used for color (from black to white), `c(0,1)` means that all colors are used, `0.25, 0.75` means that only colors from dark grey to light grey are used (more precisely `"grey25"` to `"grey75"`), and `0, 0.5` means that only colors are used from black to middle grey (`"grey50"`). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option `values.range`.
+#' @param values.scale (generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as `size` of [tm_symbols()] and `lwd` of [tm_lines()].
+#' @param value.na (generic scale argument) Value used for missing values. See tmap option `"value.na"` for defaults per visual variable.
+#' @param value.null (generic scale argument) Value used for NULL values. See tmap option `"value.null"` for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).
+#' @param value.neutral (generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both `fill` and `size` are used for [tm_symbols()] (using filled circles), the size legend items are filled with the `value.neutral` color from the `fill.scale` scale, and fill legend items are bubbles of size `value.neutral` from the `size.scale` scale.
#' @param labels (generic scale argument) Labels
#' @param label.na (generic scale argument) Label for missing values
#' @param label.null (generic scale argument) Label for null (out-of-scope) values
-#' @param label.format (generic scale argument) Label formatting (similar to legend.format in tmap3)
+#' @param label.format (generic scale argument) Label formatting (similar to `legend.format` in tmap3)
#' @export
#' @rdname tm_scale_continuous
#' @name tm_scale_continuous
diff --git a/R/tm_scale_bivariate.R b/R/tm_scale_bivariate.R
index 295bc7ac8..4d91e74a3 100644
--- a/R/tm_scale_bivariate.R
+++ b/R/tm_scale_bivariate.R
@@ -1,15 +1,15 @@
#' Scales: bivariate scale
#'
-#' Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link{tm_polygons}}). The function \code{tm_scale_bivariat} is usedf or bivariate.scales
+#' Scales in tmap are configured by the family of functions with prefix `tm_scale`. Such function should be used for the input of the `.scale` arguments in the layer functions (e.g. `fill.scale` in [tm_polygons()]). The function `tm_scale_bivariate()` is used or `bivariate.scales`.
#'
-#' @param scale1,scale2 two `tm_scale` objects. Currently, all `tm_scale_` functions are supported except `tm_scale_continous`.
-#' @param values (generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{tm_polygons}) this is a palette name from the `cols4all` package (see \code{\link[cols4all:c4a]{c4a}}) or vector of colors, for size (e.g. \code{size} for \code{tm_symbols}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{\link{tm_symbols}}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.
+#' @param scale1,scale2 two `tm_scale` objects. Currently, all `tm_scale_` functions are supported except `tm_scale_continous()`.
+#' @param values (generic scale argument) The visual values. For colors (e.g. `fill` or `col` for `tm_polygons()`) this is a palette name from the `cols4all` package (see [cols4all::c4a()]) or vector of colors, for size (e.g. `size` for `tm_symbols()`) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. `shape` for [tm_symbols()]) these are a set of symbols, etc. The tmap option `values.var` contains the default values per visual variable and in some cases also per data type.
#' @param values.repeat (generic scale argument) Should the values be repeated in case there are more categories?
-#' @param values.range (generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \code{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \code{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.
-#' @param values.scale (generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link{tm_symbols}} and \code{lwd} of \code{\link{tm_lines}}.
-#' @param value.na (generic scale argument) Value used for missing values. See tmap option \code{"value.na"} for defaults per visual variable.
-#' @param value.null (generic scale argument) Value used for NULL values. See tmap option \code{"value.null"} for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).
-#' @param value.neutral (generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link{tm_symbols}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.
+#' @param values.range (generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as `c(0, 1)`. For instance, when a grey scale is used for color (from black to white), `c(0,1)` means that all colors are used, `0.25, 0.75` means that only colors from dark grey to light grey are used (more precisely `"grey25"` to `"grey75"`), and `0, 0.5` means that only colors are used from black to middle grey (`"grey50"`). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option `values.range`.
+#' @param values.scale (generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as `size` of [tm_symbols()] and `lwd` of [tm_lines()].
+#' @param value.na (generic scale argument) Value used for missing values. See tmap option `"value.na"` for defaults per visual variable.
+#' @param value.null (generic scale argument) Value used for NULL values. See tmap option `"value.null"` for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).
+#' @param value.neutral (generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both `fill` and `size` are used for [tm_symbols()] (using filled circles), the size legend items are filled with the `value.neutral` color from the `fill.scale` scale, and fill legend items are bubbles of size `value.neutral` from the `size.scale` scale.
#' @param labels (generic scale argument) Labels
#' @param label.na (generic scale argument) Label for missing values
#' @param label.null (generic scale argument) Label for null (out-of-scope) values
diff --git a/R/tm_shape.R b/R/tm_shape.R
index 203d388c0..9b0b06ed7 100644
--- a/R/tm_shape.R
+++ b/R/tm_shape.R
@@ -1,12 +1,12 @@
#' Shape (spatial object) specification
#'
-#' Specify a shape, which is a spatial object from one of these spatial object class packages: \code{sf}, \code{stars}, \code{terra}.
+#' Specify a shape, which is a spatial object from one of these spatial object class packages: [`sf`][`sf::sf`], [`stars`][stars::st_as_stars()], `terra`.
#'
#' @param shp Spatial object
#' @param name Name of the shape
-#' @param is.main Is \code{shp} the main shape, which determines the crs and bounding box of the map?
-#' @param crs CRS to which \code{shp} is reprojected (only used if \code{is.main = TRUE})
-#' @param bbox Bounding box of he map (only used if \code{is.main = TRUE})
+#' @param is.main Is `shp` the main shape, which determines the crs and bounding box of the map?
+#' @param crs CRS to which `shp` is reprojected (only used if `is.main = TRUE`)
+#' @param bbox Bounding box of he map (only used if `is.main = TRUE`)
#' @param unit Unit of the coordinates
#' @param filter Filter features
#' @param ... to catch deprecated arguments from version < 4.0
diff --git a/R/tmap_animation.R b/R/tmap_animation.R
index 1a7980ef7..02271b6c7 100644
--- a/R/tmap_animation.R
+++ b/R/tmap_animation.R
@@ -2,18 +2,18 @@
#'
#' Create a gif animation or video from a tmap plot.
#'
-#' @param tm tmap or a list of tmap objects. If \code{tm} is a tmap object, facets should be created, where nrow and ncol in \code{\link{tm_facets}} have to be set to 1 in order to create one map per frame.
-#' @param filename filename. If omitted (default), the animation will be shown in the viewer or browser. If specified, it should be a gif file or a video file (i.e. mp4). The package \code{gifski} is required to create a gif animation. The package \code{av} (which uses the \code{FFmpeg} library) is required for video formats. The mp4 format is recommended but many other video formats are supported, such as wmv, avi, and mkv.
-#' @param width,height width and height of the animation file (in pixels). Required when \code{tm} is a list, and recommended to specify in advance when \code{tm} is a \code{tmap} object. If not specified in the latter case, it will be determined by the aspect ratio of the map.
-#' @param dpi dots per inch. By default 100, but this can be set with the option \code{output.dpi.animation} in \code{\link{tmap_options}}.
-#' @param delay delay time between images (in 1/100th of a second). See also \code{fps}
-#' @param fps frames per second, calculated as \code{100 / delay}. If \code{fps} is specified, the \code{delay} will be set to \code{100/fps}.
+#' @param tm tmap or a list of tmap objects. If `tm` is a tmap object, facets should be created, where nrow and ncol in [tm_facets()] have to be set to 1 in order to create one map per frame.
+#' @param filename filename. If omitted (default), the animation will be shown in the viewer or browser. If specified, it should be a gif file or a video file (i.e. mp4). The package `gifski` is required to create a gif animation. The package `av` (which uses the `FFmpeg` library) is required for video formats. The mp4 format is recommended but many other video formats are supported, such as wmv, avi, and mkv.
+#' @param width,height width and height of the animation file (in pixels). Required when `tm` is a list, and recommended to specify in advance when `tm` is a `tmap` object. If not specified in the latter case, it will be determined by the aspect ratio of the map.
+#' @param dpi dots per inch. By default 100, but this can be set with the option `output.dpi.animation` in [tmap_options()].
+#' @param delay delay time between images (in 1/100th of a second). See also `fps`
+#' @param fps frames per second, calculated as `100 / delay`. If `fps` is specified, the `delay` will be set to `100/fps`.
#' @param loop logical that determined whether the animation is looped, or an integer value that determines how many times the animation is looped.
-#' @param outer.margins (passed on to \code{\link{tmap_save}}) overrides the outer.margins argument of \code{\link{tm_layout}} (unless set to \code{NA})
-#' @param asp (passed on to \code{\link{tmap_save}}) if specified, it overrides the asp argument of \code{\link{tm_layout}}. Tip: set to \code{0} if map frame should be placed on the edges of the image.
-#' @param scale (passed on to \code{\link{tmap_save}}) overrides the scale argument of \code{\link{tm_layout}} (unless set to \code{NA})
+#' @param outer.margins (passed on to [tmap_save()]) overrides the outer.margins argument of [tm_layout()] (unless set to `NA`)
+#' @param asp (passed on to [tmap_save()]) if specified, it overrides the asp argument of [tm_layout()]. Tip: set to `0` if map frame should be placed on the edges of the image.
+#' @param scale (passed on to [tmap_save()]) overrides the scale argument of [tm_layout()] (unless set to `NA`)
#' @param restart.delay not used anymore
-#' @param ... arguments passed on to \code{\link[av:av_encode_video]{av_encode_video}}
+#' @param ... arguments passed on to [av::av_encode_video()]
#' @note Not only tmap plots are supported, but any series of R plots.
#' @concept animation
#' @example ./examples/tmap_animation.R
diff --git a/R/tmap_arrange.R b/R/tmap_arrange.R
index b798339f1..232c29e3f 100644
--- a/R/tmap_arrange.R
+++ b/R/tmap_arrange.R
@@ -1,20 +1,20 @@
#' Arrange small multiples in grid layout
#'
-#' Arrange small multiples in a grid layout. Normally, small multiples are created by specifying multiple variables for one aesthetic or by specifying the by argument (see \code{\link{tm_facets}}). This function can be used to arrange custom small multiples in a grid layout.
+#' Arrange small multiples in a grid layout. Normally, small multiples are created by specifying multiple variables for one aesthetic or by specifying the by argument (see [tm_facets()]). This function can be used to arrange custom small multiples in a grid layout.
#'
-#' The global option \code{tmap.limits} controls the limit of the number of facets that are plotted. By default, \code{tmap_options(tmap.limits=c(facets.view=4, facets.plot=64))}. The maximum number of interactive facets is set to four since otherwise it may become very slow.
+#' The global option `tmap.limits` controls the limit of the number of facets that are plotted. By default, `tmap_options(tmap.limits = c(facets.view=4, facets.plot=64))`. The maximum number of interactive facets is set to four since otherwise it may become very slow.
#'
-#' @param ... \code{\link{tmap}} objects or one list of \code{\link{tmap}} objects. The number of multiples that can be plot is limited (see details).
+#' @param ... [`tmap`] objects or one list of [`tmap`] objects. The number of multiples that can be plot is limited (see details).
#' @param ncol number of columns
#' @param nrow number of rows
-#' @param widths vector of column widths. It should add up to 1 and the length should be equal to \code{ncol}
-#' @param heights vector of row heights. It should add up to 1 and the length should be equal to \code{nrow}
-#' @param sync logical. Should the navigation in view mode (zooming and panning) be synchronized? By default \code{FALSE}.
-#' @param asp aspect ratio. The aspect ratio of each map. Normally, this is controlled by the \code{asp} argument from \code{\link{tm_layout}} (also a tmap option). This argument will overwrite it, unless set to \code{NULL}. The default value for \code{asp} is 0, which means that the aspect ratio is adjusted to the size of the device divided by the number of columns and rows. When \code{asp} is set to \code{NA}, which is also the default value for \code{\link{tm_layout}}, the aspect ratio will be adjusted to the used shapes.
-#' @param outer.margins outer.margins, numeric vector four or a single value. If defines the outer margins for each multiple. If will overwrite the \code{outer.margins} argument from \code{\link{tm_layout}}, unless set to \code{NULL}.
-#' @param x a \code{tmap_arrange} object (returned from \code{tmap_arrange})
-#' @param knit should \code{\link[knitr:knit_print]{knit_print}} be enabled, or the normal \code{\link[base:print]{print}} function?
-#' @param options options passed on to knitprint
+#' @param widths vector of column widths. It should add up to 1 and the length should be equal to `ncol`
+#' @param heights vector of row heights. It should add up to 1 and the length should be equal to `nrow`
+#' @param sync logical. Should the navigation in view mode (zooming and panning) be synchronized? By default `FALSE`.
+#' @param asp aspect ratio. The aspect ratio of each map. Normally, this is controlled by the `asp` argument from [tm_layout()] (also a tmap option). This argument will overwrite it, unless set to `NULL`. The default value for `asp` is 0, which means that the aspect ratio is adjusted to the size of the device divided by the number of columns and rows. When `asp` is set to `NA`, which is also the default value for [tm_layout()], the aspect ratio will be adjusted to the used shapes.
+#' @param outer.margins outer.margins, numeric vector four or a single value. If defines the outer margins for each multiple. If will overwrite the `outer.margins` argument from [tm_layout()], unless set to `NULL`.
+#' @param x a `tmap_arrange` object (returned from `tmap_arrange()`)
+#' @param knit should [knitr::knit_print()] be enabled, or the normal [base::print()] function?
+#' @param options options passed on to [knitr::knit_print()]
#' @example ./examples/tmap_arrange.R
#' @export
tmap_arrange <- function(..., ncol=NA, nrow=NA, widths=NA, heights = NA, sync=FALSE, asp=0, outer.margins=.02) {
diff --git a/R/tmap_format.R b/R/tmap_format.R
index 2c48822af..cf5dc05aa 100644
--- a/R/tmap_format.R
+++ b/R/tmap_format.R
@@ -1,12 +1,12 @@
#' Get or add format options
#'
-#' Format options are tmap options that are shape dependent. With \code{tmap_format()} the predefined formats can be retrieved. The values for a specific format can be retrieved with \code{tmap_format(format)}, where format is the name of the format. The function \code{tmap_format_add} is used to add a format.
+#' 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.
#'
-#' @param format Name of the format. Run \code{tmap_format()} to see the choices.
-#' @return The function \code{tmap_format()} returns the names of the available formats. When \code{format} is defined, it returns the option list corresponding the that format.
-#' @seealso \code{\link{tm_layout}} for predefined styles, \code{tmap_style_catalogue} (not migrated to v4 yet) to create a style catalogue of all available styles, and \code{\link{tmap_options}} for tmap options.
+#' @param format Name of the format. Run `tmap_format()` to see the choices.
+#' @return The function `tmap_format()` returns the names of the available formats. When `format` is defined, it returns the option list corresponding the that format.
+#' @seealso [tm_layout()] for predefined styles, `tmap_style_catalogue` (not migrated to v4 yet) to create a style catalogue of all available styles, and [tmap_options()] for tmap options.
#' @example ./examples/tmap_format.R
-#' @seealso \code{\link{tmap_options}} for tmap options
+#' @seealso [tmap_options()] for tmap options
#' @rdname tmap_format
#' @export
tmap_format = function(format) {
@@ -26,7 +26,7 @@ tmap_format = function(format) {
#' @rdname tmap_format
#' @name tmap_format_add
-#' @param ... Options from \code{\link{tm_layout}} or \code{\link{tm_view}}. Can also be a list of those options.
+#' @param ... Options from [tm_layout()] or [tm_view()]. Can also be a list of those options.
#' @param name Name of the new format.
#' @export
tmap_format_add = function(..., name) {
diff --git a/R/tmap_icons.R b/R/tmap_icons.R
index 8d2358c9b..0a00ac7e3 100644
--- a/R/tmap_icons.R
+++ b/R/tmap_icons.R
@@ -1,17 +1,17 @@
#' Specify icons
#'
-#' Specifies icons from a png images, which can be used as markers in thematic maps. The function \code{marker_icon} is the specification of the default marker.
+#' Specifies icons from a png images, which can be used as markers in thematic maps. The function `marker_icon()` is the specification of the default marker.
#'
#' @param file character value/vector containing the file path(s) or url(s).
-#' @param width width of the icon. If \code{keep.asp}, this is interpreted as the maximum width.
-#' @param height height of the icon. If \code{keep.asp}, this is interpreted as the maximum height.
-#' @param keep.asp keep the aspect ratio of the png image. If \code{TRUE} and the aspect ratio differs from \code{width/height} either \code{width} or \code{height} is adjusted accordingly.
-#' @param just justification of the icons relative to the point coordinates. The first value specifies horizontal and the second value vertical justification. Possible values are: \code{"left"} , \code{"right"}, \code{"center"}, \code{"bottom"}, and \code{"top"}. Numeric values of 0 specify left alignment and 1 right alignment. The default value of \code{just} is \code{c("center", "center")}.
-#' @param as.local if the \code{file} is a url, should it be saved to local temporary file?
-#' @param ... arguments passed on to \code{\link[leaflet:icons]{icons}}. When \code{iconWidth}, \code{iconHeight}, \code{iconAnchorX} and \code{iconAnchorY} are specified, they override \code{width} and \code{height}, and \code{just}.
-#' @return icon data (see \code{\link[leaflet:icons]{icons}})
+#' @param width width of the icon. If `keep.asp`, this is interpreted as the maximum width.
+#' @param height height of the icon. If `keep.asp`, this is interpreted as the maximum height.
+#' @param keep.asp keep the aspect ratio of the png image. If `TRUE` and the aspect ratio differs from `width/height` either `width` or `height` is adjusted accordingly.
+#' @param just justification of the icons relative to the point coordinates. The first value specifies horizontal and the second value vertical justification. Possible values are: `"left"` , `"right"`, `"center"`, `"bottom"`, and `"top"`. Numeric values of 0 specify left alignment and 1 right alignment. The default value of `just` is `c("center", "center")`.
+#' @param as.local if the `file` is a url, should it be saved to local temporary file?
+#' @param ... arguments passed on to [leaflet::icons()]. When `iconWidth`, `iconHeight`, `iconAnchorX` and `iconAnchorY` are specified, they override `width` and `height`, and `just`.
+#' @return icon data (see [leaflet::icons()])
#' @export
-#' @seealso \code{\link{tm_symbols}}
+#' @seealso [tm_symbols()]
#' @name tmap_icons
#' @rdname tmap_icons
tmap_icons <- function(file, width=48, height=48, keep.asp=TRUE, just=c("center", "center"), as.local=TRUE, ...) {
diff --git a/R/tmap_leaflet.R b/R/tmap_leaflet.R
index 6e5ae8381..ae12b84a8 100644
--- a/R/tmap_leaflet.R
+++ b/R/tmap_leaflet.R
@@ -1,11 +1,14 @@
#' Export tmap to the format of the used graphics mode
#'
-#' Export tmap to the format of the used graphics mode. `tmap_grid` returns a \code{\link[grid:grob]{grob}} object (\code{"plot" mode}) and `tmap_leaflet` a \code{\link[leaflet:leaflet]{leaflet}} object (\code{"view"} mode).
+#' * `tmap_grid()` returns a [`grob`][grid::grob()] object (`"plot" mode`)
+#' * `tmap_leaflet()` a [`leaflet`][leaflet::leaflet()] object (`"view"` mode).
#'
-#' @param x description
+#' @param x a tmap object.
#' @param show show the map?
-#' @param ... arguments passed on the \code{\link{print.tmap}}
-#' @return `tmap_grid` returns a \code{\link[grid:grob]{grob}} object (\code{"plot"} mode) and `tmap_leaflet` a \code{\link[leaflet:leaflet]{leaflet}} object (\code{"view"} mode). In case small multiples are shown, a list is returned.
+#' @inheritDotParams print.tmap
+#' @return
+#' * `tmap_grid()` returns a [`grob`][grid::grob()] object (`"plot"` mode)
+#' * `tmap_leaflet()` a [`leaflet`][leaflet::leaflet()] object (`"view"` mode). In case small multiples are shown, a list is returned.
#' @export
#' @examples
#' map = tm_shape(World) + tm_polygons()
@@ -36,4 +39,4 @@ tmap_grid = function(x,
})
options(tmap.mode = "plot")
print.tmap(x, show=show, ...)
-}
\ No newline at end of file
+}
diff --git a/R/tmap_mode.R b/R/tmap_mode.R
index d7659c534..308cf9a65 100644
--- a/R/tmap_mode.R
+++ b/R/tmap_mode.R
@@ -1,22 +1,22 @@
#' Set tmap mode to static plotting or interactive viewing
#'
-#' Set tmap mode to static plotting or interactive viewing. The global option \code{tmap.mode} determines the whether thematic maps are plot in the graphics device, or shown as an interactive leaflet map (see also \code{\link{tmap_options}}. The function \code{tmap_mode} is a wrapper to set this global option. The convenient function \code{ttm}, which stands for toggle thematic map, is a toggle switch between the two modes. The function \code{ttmp} stands for toggle thematic map and print last map: it does the same as \code{ttm} followed by \code{tmap_last}; in order words, it shows the last map in the other mode. It is recommended to use \code{tmap_mode} in scripts and \code{ttm}/\code{ttmp} in the console.
+#' Set tmap mode to static plotting or interactive viewing. The global option `tmap.mode` determines the whether thematic maps are plot in the graphics device, or shown as an interactive leaflet map (see also [tmap_options()]. The function `tmap_mode` is a wrapper to set this global option. The convenient function `ttm`, which stands for toggle thematic map, is a toggle switch between the two modes. The function `ttmp` stands for toggle thematic map and print last map: it does the same as `ttm` followed by [tmap_last()]; in order words, it shows the last map in the other mode. It is recommended to use `tmap_mode()` in scripts and `ttm`/`ttmp` in the console.
#'
#' @param mode One of:
#' \describe{
-#' \item{\code{"plot"}}{Thematic maps are shown in the graphics device. This is the default mode, and supports all tmap's features, such as small multiples (see \code{\link{tm_facets}}) and extensive layout settings (see \code{\link{tm_layout}}). It is recommended for saving static maps (see \code{\link{tmap_save}}).}
-#' \item{\code{"view"}}{Thematic maps are viewed interactively in the web browser or RStudio's Viewer pane. Maps are fully interactive with tiles from OpenStreetMap or other map providers (see \code{\link{tm_tiles}}). See also \code{\link{tm_view}} for options related to the \code{"view"} mode. This mode generates a \code{\link[leaflet:leaflet]{leaflet}} widget, which can also be directly obtained with \code{\link{tmap_leaflet}}. With RMarkdown, it is possible to publish it to an HTML page.
-#' There are a couple of constraints in comparison to \code{"plot"}:
+#' \item{`"plot"`}{Thematic maps are shown in the graphics device. This is the default mode, and supports all tmap's features, such as small multiples (see [tm_facets()]) and extensive layout settings (see [tm_layout()]). It is recommended for saving static maps (see [tmap_save()]).}
+#' \item{`"view"`}{Thematic maps are viewed interactively in the web browser or RStudio's Viewer pane. Maps are fully interactive with tiles from OpenStreetMap or other map providers (see [tm_tiles()]). See also [tm_view()] for options related to the `"view"` mode. This mode generates a [leaflet::leaflet()] widget, which can also be directly obtained with [tmap_leaflet()]. With R Markdown, it is possible to publish it to an HTML page.
+#' There are a couple of constraints in comparison to `"plot"`:
#' \itemize{
-#' \item The map is always projected according to the Web Mercator projection. Although this projection is the de facto standard for interactive web-based mapping, it lacks the equal-area property, which is important for many thematic maps, especially choropleths (see examples from \code{\link{tm_shape}}).
+#' \item The map is always projected according to the Web Mercator projection. Although this projection is the de facto standard for interactive web-based mapping, it lacks the equal-area property, which is important for many thematic maps, especially choropleths (see examples from [tm_shape()]).
#' \item Small multiples are not supported
#' \item The legend cannot be made for aesthetics regarding size, which are symbol size and line width.
#' \item Text labels are not supported (yet)
-#' \item The layout options set with \code{\link{tm_layout}}) regarding map format are not used. However, the styling options still apply.}
+#' \item The layout options set with [tm_layout()]) regarding map format are not used. However, the styling options still apply.}
#' }}
#' @return The mode before changing
#' @example ./examples/tmap_mode.R
-#' @seealso \href{../doc/tmap-getstarted.html}{\code{vignette("tmap-getstarted")}}, \code{\link{tmap_last}} to show the last map, \code{\link{tm_view}} for viewing options, and \code{\link{tmap_leaflet}} for obtaining a leaflet widget, and \code{\link{tmap_options}} for tmap options.
+#' @seealso `vignette("tmap_sneek_peek")`, [tmap_last()] to show the last map, [tm_view()] for viewing options, and [tmap_leaflet()] for obtaining a leaflet widget, and [tmap_options()] for tmap options.
#' @references Tennekes, M., 2018, {tmap}: Thematic Maps in {R}, Journal of Statistical Software, 84(6), 1-39, \doi{10.18637/jss.v084.i06}
#' @export
tmap_mode = function(mode=NULL) {
@@ -54,7 +54,7 @@ get_modes = function() {
#'
#' When the so-called "design mode" is enabled, inner and outer margins, legend position, and aspect ratio are shown explicitly in plot mode. Also, information about aspect ratios is printed in the console. This function sets the global option `tmap.design.mode`. It can be used as toggle function without arguments.
#'
-#' @seealso \code{\link{tmap_options}}
+#' @seealso [tmap_options()]
#' @param design.mode Logical value that determines the design mode. If omitted then the design mode is toggled.
#' @export
tmap_design_mode = function(design.mode) {
diff --git a/R/tmap_options.R b/R/tmap_options.R
index bdb617469..c5e8938ae 100644
--- a/R/tmap_options.R
+++ b/R/tmap_options.R
@@ -710,34 +710,33 @@ complete_options = function(x, o) {
#'
#' @param ... See details
#' @details
-#' | option | description |
-#' | ------ | ----------- |
-#' | modes | Mode specific options. It is a named list where names correspond to the available modes. Each item is a list of options. |
-#' | crs | Map crs (see \code{\link{tm_shape}}). \code{NA} means the crs is specified in \code{\link{tm_shape}}. The crs that is used by the transformation functions is defined in \code{\link{tm_shape}}.|
+#' | option | description |
+#' | ------ | ----------- |
+#' | modes | Mode specific options. It is a named list where names correspond to the available modes. Each item is a list of options. |
+#' | crs | Map crs (see [tm_shape()]). `NA` means the crs is specified in [tm_shape()]. The crs that is used by the transformation functions is defined in [tm_shape()].|
#' | facet.max | Maximum number of facets |
-#' | facet.flip | Should facets be flipped (in case of facet wrap)? This can also be set via \code{\link{tm_facets_flip}} |
-#' | raster.max.cells | Maximum number of raster grid cells |
-#' | show.messages | Show messages? |
-#' | show.warnings | Show warnings? |
-#' | output.format | Output format |
-#' | output.size | Output size |
+#' | facet.flip | Should facets be flipped (in case of facet wrap)? This can also be set via [tm_facets_flip()] |
+#' | raster.max.cells | Maximum number of raster grid cells |
+#' | show.messages | Show messages? |
+#' | show.warnings | Show warnings? |
+#' | output.format | Output format |
+#' | output.size | Output size |
#' | output.dpi | Output dpi |
#' | output.dpi.animation | Output dpi for animations |
-#' | value.const | Default visual value constants e.g. the default fill color for \code{tm_shape(World) + tm_polygons()}. A list is required with per visual variable a value. |
+#' | value.const | Default visual value constants e.g. the default fill color for `tm_shape(World) + tm_polygons()`. A list is required with per visual variable a value. |
#' | value.na | Default visual values that are used to visualize NA data values. A list is required with per visual variable a value.|
#' | value.null | Default visual values that are used to visualize null (out-of-scope) data values. A list is required with per visual variable a value.|
-#' | value.blank | Default visual values that correspond to blank. For color these are \code{"#00000000"} meaning transparent. A list is required with per visual variable a value. |
+#' | value.blank | Default visual values that correspond to blank. For color these are `"#00000000"` meaning transparent. A list is required with per visual variable a value. |
#' | values.var | Default values when a data variable to mapped to a visual variable, e.g. a color palette. A list is required with per visual variable a value. |
-#' | values.range | Default range for values. See \code{values.range} of \code{\link{tm_scale_categorical}}. A list is required with per visual variable a value.
-#' | value.neutral | Default values for when a data variable to mapped to a visual variable, e.g. a color palette. A list is required with per visual variable a value. | |
+#' | values.range | Default range for values. See `values.range` of [tm_scale_categorical()]. A list is required with per visual variable a value.
+#' | value.neutral | Default values for when a data variable to mapped to a visual variable, e.g. a color palette. A list is required with per visual variable a value. | |
#' | scales.var | Default scales. |
-#' | label.format | Format for the labels (was legend.format in tmap v3) |
+#' | label.format | Format for the labels (was `legend.format` in tmap v3) |
#' | label.na | Default label for missing values |
-#' See \code{\link{tm_layout}} for layout specific options
+#' See [tm_layout()] for layout specific options
#' @name tmap_options
#' @rdname tmap_options
#' @export
-#' @md
tmap_options = function(...) {
o = get("tmapOptions", envir = .TMAP)
nms = names(o)
@@ -812,7 +811,7 @@ tmap_options = function(...) {
}
#' @name tmap_options_mode
-#' @param mode mode, e.g. \code{"plot"} or \code{"view"}
+#' @param mode mode, e.g. `"plot"` or `"view"`
#' @param default.options return the default options or the current options?
#' @rdname tmap_options
#' @export
@@ -1099,7 +1098,7 @@ get_vector_id = function(x, id) {
#' Internal tmap function to add a default value for the layer functions
#'
#' @param option, one of: `"value.const"`, `"value.na"`, `"value.blank"`, `"values.var"`, `'values.range'`, `"value.neutral"`, `"scales.var"`
-#' @param id name of the visual variable with layer, in the format `"x.y"`, where x is the visual variable and y is the layer. It is also possible to set x only; then it applies to all layer functions.
+#' @param id name of the visual variable with layer, in the format `"x.y"`, where `x` is the visual variable and `y` is the layer. It is also possible to set `x` only; then it applies to all layer functions.
#' @param value value
#' @keywords internal
#' @export
@@ -1141,7 +1140,7 @@ tmap_options_reset <- function() {
}
#' @export
-#' @param style style, see `tmap_style()` for available styles
+#' @param style style, see [tmap_style()] for available styles
#' @rdname tmap_options
tmap_options_save <- function(style) {
show.messages <- get("tmapOptions", envir = .TMAP)$show.messages
diff --git a/R/tmap_save.R b/R/tmap_save.R
index 44d1bef83..bb5ba3691 100644
--- a/R/tmap_save.R
+++ b/R/tmap_save.R
@@ -3,21 +3,21 @@
#' Save tmap to a file. This can be either a static plot (e.g. png) or an interactive map (html).
#'
#' @param tm tmap object
-#' @param filename filename including extension, and optionally the path. The extensions pdf, eps, svg, wmf (Windows only), png, jpg, bmp, tiff, and html are supported. If the extension is missing, the file will be saved as a static plot in \code{"plot"} mode and as an interactive map (html) in \code{"view"} mode (see details). The default format for static plots is png, but this can be changed using the option \code{"output.format"} in \code{\link{tmap_options}}. If \code{NA} (the default), the file is saved as "tmap01" in the default format, and the number incremented if the file already exists.
-#' @param device graphic device to use. Either a device function (e.g., \code{\link[grDevices:png]{png}} or \code{\link[grDevices:cairo_pdf]{cairo_pdf}}) or a text indicating selected graphic device: "pdf", "eps", "svg", "wmf" (Windows only), "png", "jpg", "bmp", "tiff". If NULL, the graphic device is guessed based on the \code{filename} argument.
-#' @param height,width The width and height of the plot (not applicable for html files). Units are set with the argument \code{units}. If one of them is not specified, this is calculated using the formula asp = width / height, where asp is the estimated aspect ratio of the map. If both are missing, they are set such that width * height is equal to the option \code{"output.size"} in \code{\link{tmap_options}}. This is by default 49, meaning that is the map is a square (so aspect ratio of 1) both width and height are set to 7.
-#' @param units units for width and height (\code{"in"}, \code{"cm"}, or \code{"mm"}). By default, pixels (\code{"px"}) are used if either width or height is set to a value greater than 50. Else, the units are inches (\code{"in"})
-#' @param dpi dots per inch. Only applicable for raster graphics. By default it is set to 300, but this can be changed using the option \code{"output.dpi"} in \code{\link{tmap_options}}.
-#' @param outer.margins overrides the outer.margins argument of \code{\link{tm_layout}} (unless set to \code{NA})
-#' @param asp if specified, it overrides the asp argument of \code{\link{tm_layout}}. Tip: set to \code{0} if map frame should be placed on the edges of the image.
-#' @param scale overrides the scale argument of \code{\link{tm_layout}} (unless set to \code{NA})
-#' @param insets_tm tmap object of an inset map, or a list of tmap objects of multiple inset maps. The number of tmap objects should be equal to the number of viewports specified with \code{insets_vp}.
-#' @param insets_vp \code{\link[grid:viewport]{viewport}} of an inset map, or a list of \code{\link[grid:viewport]{viewport}}s of multiple inset maps. The number of viewports should be equal to the number of tmap objects specified with \code{insets_tm}.
-#' @param add.titles add titles to leaflet object
-#' @param in.iframe should an interactive map be saved as an iframe? If so, two HTML files will be saved; one small parent HTML file with the iframe container, and one large child HTML file with the actual widget. See \code{\link[widgetframe:saveWidgetframe]{saveWidgetframe}} for details. By default \code{FALSE} which means that one large HTML file is saved (see \code{\link[htmlwidgets:saveWidget]{saveWidget}}).
-#' @param selfcontained when an interactive map is saved, should the resources (e.g. Javascript libraries) be contained in the HTML file? If \code{FALSE}, they are placed in an adjacent directory (see also \code{\link[htmlwidgets:saveWidget]{saveWidget}}). Note that the HTML file will often still be large when \code{selfcontained = FALSE}, since the map data (polygons and popups), which are also contained in the HTML file, usually take more space then the map resources.
-#' @param verbose Deprecated. It is now controlled by the tmap option \code{show.messages} (see \code{\link{tmap_options}})
-#' @param ... arguments passed on to device functions or to \code{\link[htmlwidgets:saveWidget]{saveWidget}} or \code{\link[widgetframe:saveWidgetframe]{saveWidgetframe}}
+#' @param filename filename including extension, and optionally the path. The extensions pdf, eps, svg, wmf (Windows only), png, jpg, bmp, tiff, and html are supported. If the extension is missing, the file will be saved as a static plot in `"plot"` mode and as an interactive map (html) in `"view"` mode (see details). The default format for static plots is png, but this can be changed using the option `"output.format"` in [tmap_options()]. If `NA` (the default), the file is saved as "tmap01" in the default format, and the number incremented if the file already exists.
+#' @param device graphic device to use. Either a device function (e.g., [`png`][grDevices::png()] or [`cairo_pdf`][grDevices::cairo_pdf()]) or a text indicating selected graphic device: "pdf", "eps", "svg", "wmf" (Windows only), "png", "jpg", "bmp", "tiff". If NULL, the graphic device is guessed based on the `filename` argument.
+#' @param height,width The width and height of the plot (not applicable for html files). Units are set with the argument `units`. If one of them is not specified, this is calculated using the formula asp = width / height, where asp is the estimated aspect ratio of the map. If both are missing, they are set such that `width * height` is equal to the option `"output.size"` in [tmap_options()]. This is by default 49, meaning that is the map is a square (so aspect ratio of 1) both width and height are set to 7.
+#' @param units units for width and height (`"in"`, `"cm"`, or `"mm"`). By default, pixels (`"px"`) are used if either width or height is set to a value greater than 50. Else, the units are inches (`"in"`)
+#' @param dpi dots per inch. Only applicable for raster graphics. By default it is set to 300, but this can be changed using the option `"output.dpi"` in [tmap_options()].
+#' @param outer.margins overrides the outer.margins argument of [tm_layout()] (unless set to `NA`)
+#' @param asp if specified, it overrides the asp argument of [tm_layout()]. Tip: set to `0` if map frame should be placed on the edges of the image.
+#' @param scale overrides the scale argument of [tm_layout()] (unless set to `NA`)
+#' @param insets_tm tmap object of an inset map, or a list of tmap objects of multiple inset maps. The number of tmap objects should be equal to the number of viewports specified with `insets_vp`.
+#' @param insets_vp [`viewport`][grid::viewport()] of an inset map, or a list of [`viewport`][grid::viewport()]s of multiple inset maps. The number of viewports should be equal to the number of tmap objects specified with `insets_tm`.
+#' @param add.titles add titles to leaflet object.
+#' @param in.iframe should an interactive map be saved as an iframe? If so, two HTML files will be saved; one small parent HTML file with the iframe container, and one large child HTML file with the actual widget. See [widgetframe::saveWidgetframe()] for details. By default `FALSE` which means that one large HTML file is saved (see [saveWidget()][htmlwidgets::saveWidget()]).
+#' @param selfcontained when an interactive map is saved, should the resources (e.g. Javascript libraries) be contained in the HTML file? If `FALSE`, they are placed in an adjacent directory (see also [htmlwidgets::saveWidget()]). Note that the HTML file will often still be large when `selfcontained = FALSE`, since the map data (polygons and popups), which are also contained in the HTML file, usually take more space then the map resources.
+#' @param verbose Deprecated. It is now controlled by the tmap option `show.messages` (see [tmap_options()])
+#' @param ... arguments passed on to device functions or to [`saveWidget()`][htmlwidgets::saveWidget()] or [`saveWidgetFrame()`][widgetframe::saveWidgetframe()]
#' @importFrom htmlwidgets saveWidget
#' @import tmaptools
#' @example ./examples/tmap_save.R
diff --git a/R/tmap_style.R b/R/tmap_style.R
index 4d06b4024..aa9d43710 100644
--- a/R/tmap_style.R
+++ b/R/tmap_style.R
@@ -1,16 +1,16 @@
#' Set or get the default tmap style
#'
-#' Set or get the default tmap style. Without arguments, the current style is returned. Also the available styles are displayed. When a style is set, the corresponding tmap options (see \code{\link{tmap_options}}) will be set accordingly. The default style (i.e. when loading the package) is \code{"white"}.
+#' Set or get the default tmap style. Without arguments, the current style is returned. Also the available styles are displayed. When a style is set, the corresponding tmap options (see [tmap_options()]) will be set accordingly. The default style (i.e. when loading the package) is `"white"`.
#'
-#' Note that \code{\link{tm_style}} is used within a plot call (so it only affects that plot), whereas \code{tmap_style} sets the style globally.
+#' Note that [tm_style()] is used within a plot call (so it only affects that plot), whereas `tmap_style()` sets the style globally.
#'
-#' After loading a style, the options that defined this style (i.e. the difference with the default \code{"white"} style) can be obtained by \code{\link{tmap_options_diff}}.
+#' After loading a style, the options that defined this style (i.e. the difference with the default `"white"` style) can be obtained by [tmap_options_diff()].
#'
-#' The documentation of \code{\link{tmap_options}} (details and the examples) shows how a new style is created.
+#' The documentation of [tmap_options()] (details and the examples) shows how a new style is created.
#'
-#' @param style Name of the style. When omitted, \code{tmap_style} returns the current style and also shows all available styles. When the style is specified, \code{tmap_style} sets the style accordingly. Note that in that case, all tmap options (see \code{\link{tmap_options}}) will be reset according to the style definition. See \code{\link{tm_layout}} for predefined styles, and \code{tmap_style_catalogue} (not migrated to v4 yet) for creating a catalogue.
+#' @param style Name of the style. When omitted, `tmap_style()` returns the current style and also shows all available styles. When the style is specified, `tmap_style()` sets the style accordingly. Note that in that case, all tmap options (see [tmap_options()]) will be reset according to the style definition. See [tm_layout()] for predefined styles, and `tmap_style_catalogue` (not migrated to v4 yet) for creating a catalogue.
#' @return The style before changing
-#' @seealso \code{\link{tmap_options}} for tmap options, and \code{tmap_style_catalogue} (not migrated to v4 yet) to create a style catalogue of all available styles.
+#' @seealso [tmap_options()] for tmap options, and `tmap_style_catalogue` (not migrated to v4 yet) to create a style catalogue of all available styles.
#' @example ./examples/tmap_style.R
#' @export
#' @rdname tmap_style
diff --git a/README.md b/README.md
index a97f36a70..a5f7f2fb7 100644
--- a/README.md
+++ b/README.md
@@ -68,13 +68,10 @@ install_github("r-tmap/tmap")
pak::pak("r-tmap/tmap")
# Or from r-universe
-options(repos = c(
- tmap = 'https://r-tmao.r-universe.dev',
- CRAN = 'https://cloud.r-project.org'))
-install.packages('tmap')
+install.packages('tmap', repos = c('https://r-tmap.r-universe.dev', 'https://cloud.r-project.org'))
```
-See [NEWS](https://github.com/mtennekes/tmap/blob/master/NEWS) for the latest features and improvements and the [issue list](https://github.com/mtennekes/tmap/issues) for discussions of enhancements and bugs.
+See [NEWS](https://github.com/r-tmap/tmap/blob/master/NEWS.md) for the latest features and improvements and the [issue list](https://github.com/r-tmap/tmap/issues) for discussions of enhancements and bugs.
Do you want to help with the development of the package?
Please let us know!
@@ -96,7 +93,7 @@ This paper has been written for `tmap` 1.11-2. See the [reproducible code](https
Vignettes
-----
-[tmap: get started!](https://cran.r-project.org/package=tmap/vignettes/tmap-getstarted.html)
+[tmap v3: get started!](https://cran.r-project.org/package=tmap/vignettes/tmap-getstarted.html)
[tmap: what is changed in recent versions?](https://cran.r-project.org/package=tmap/vignettes/tmap-changes.html)
@@ -104,7 +101,7 @@ Vignettes
Tutorials
-----
-[tmap in RMarkdown](https://github.com/mtennekes/tmap/blob/master/demo/tutorials/rmarkdown_tmap.Rmd)
+[tmap in RMarkdown](https://github.com/r-tmap/tmap/blob/master/demo/tutorials/rmarkdown_tmap.Rmd)
Presentations
@@ -156,8 +153,8 @@ Please tag your questions with *tmap*.
[10]: https://mtennekes.github.io/downloads/presentations/tmap_user2015.pdf
[11]: https://cran.r-project.org/web/packages/tmap/vignettes/tmap-modes.html
[12]: http://cwrld.us/Rmaps10
- [13]: https://github.com/mtennekes/tmap/blob/master/demo/US_choropleth.R
- [14]: https://github.com/mtennekes/tmap/blob/master/demo/crimes_in_Greater_London.R
+ [13]: https://github.com/r-tmap/tmap/blob/master/demo/US_choropleth.R
+ [14]: https://github.com/r-tmap/tmap/blob/master/demo/crimes_in_Greater_London.R
[15]: https://github.com/Robinlovelace/Creating-maps-in-R/blob/master/vignettes/vspd-base-shiny.Rmd
[16]: https://stackoverflow.com/questions/tagged/tmap
[17]: http://www.computerworld.com/article/2921176/business-intelligence/great-r-packages-for-data-import-wrangling-visualization.html
diff --git a/demo/tutorials/legend_and_attributes_placement.R b/demo/tutorials/legend_and_attributes_placement.R
index 33e908a48..fb7a79b28 100644
--- a/demo/tutorials/legend_and_attributes_placement.R
+++ b/demo/tutorials/legend_and_attributes_placement.R
@@ -38,7 +38,7 @@ map + tm_layout(legend.position=c("center", "center"),
# the normal position argument legend.position (together with legend.just) controls the position of the legend within the extra viewport
# print this map in normal mode:
-last_map() + tm_layout(design.mode=FALSE)
+tmap_last() + tm_layout(design.mode=FALSE)
# map attributes are controlled in a similar way
diff --git a/man/Shapes.Rd b/man/Shapes.Rd
index 8f25c3cf8..6b394423f 100644
--- a/man/Shapes.Rd
+++ b/man/Shapes.Rd
@@ -14,24 +14,27 @@
\url{https://www.cbs.nl/} for \code{NLD_prov} and \code{NLD_muni}.
}
\usage{
-data(World)
+World
-data(NLD_prov)
+NLD_prov
-data(NLD_muni)
+NLD_muni
}
\description{
Maps of the world and the Netherlands (province and municipality level), class \code{\link[sf:sf]{sf}}
}
\details{
-The default projections for these maps are Eckhart IV (World) and Rijksdriehoekstelsel (Netherlands). See below. The projection can be changed temporarily for plotting purposes by using the projection argument of \code{\link{tm_shape}}.
+The default projections for these maps are Eckhart IV (World) and Rijksdriehoekstelsel (Netherlands). See below. The projection can be changed temporarily for plotting purposes by using the projection argument of \code{\link[=tm_shape]{tm_shape()}}.
\code{World} World map. The default projection for this world map is Eckhart IV since area sizes are preserved, which is a very important property for choropleths.
-\code{NLD_prov} and \code{NLD_muni}, maps of the Netherlands at province and municipality level of 2013. The used projection is the Rijksdriehoekstelsel projection. \strong{Important:} publication of these maps is only allowed when cited to Statistics Netherlands (CBS) and Kadaster Nederland as source.
+\code{NLD_prov} and \code{NLD_muni}, maps of the Netherlands at province and municipality level of 2013. The used projection is the Rijksdriehoekstelsel projection.
+
+\strong{Important:} publication of these maps is only allowed when citing Statistics Netherlands (CBS) and Kadaster Nederland as source.
}
\references{
Statistics Netherlands (2014), The Hague/Heerlen, Netherlands, \url{https://www.cbs.nl/}.
Kadaster, the Netherlands' Cadastre, Land Registry, and Mapping Agency (2014), Apeldoorn, Netherlands, \url{https://www.kadaster.nl/}.
}
+\keyword{datasets}
diff --git a/man/land.Rd b/man/land.Rd
index 7a7d1f51f..1d5f24d86 100644
--- a/man/land.Rd
+++ b/man/land.Rd
@@ -4,13 +4,16 @@
\name{land}
\alias{land}
\title{Spatial data of global land cover}
+\format{
+An object of class \code{stars} with 1080 rows and 540 columns.
+}
\usage{
-data(land)
+land
}
\description{
-Spatial data of global land cover, percent tree cover, and elevation of class \code{\link[stars:st_as_stars]{stars}}.
+Spatial data of global land cover, percent tree cover, and elevation of class \code{\link[stars:st_as_stars]{stars}}.
Two attributes in this object relates to global land cover.
-The cover layer classifies the status of land cover of the whole globe into 20 categories, while
+The cover layer classifies the status of land cover of the whole globe into 20 categories, while
the cover_cls layer uses 8 simplified categories.
Percent Tree Cover (trees) represents the density of trees on the ground, and the last attribute represents elevation.
}
@@ -20,3 +23,4 @@ Percent Tree Cover (trees) represents the density of trees on the ground, and th
\references{
Production of Global Land Cover Data - GLCNMO2008, Tateishi, R., Thanh Hoan, N., Kobayashi, T., Alsaaideh, B., Tana, G., Xuan Phong, D. (2014), Journal of Geography and Geology, 6 (3).
}
+\keyword{datasets}
diff --git a/man/metro.Rd b/man/metro.Rd
index d20e86e25..a33d9dd2f 100644
--- a/man/metro.Rd
+++ b/man/metro.Rd
@@ -4,15 +4,19 @@
\name{metro}
\alias{metro}
\title{Spatial data of metropolitan areas}
+\format{
+An object of class \code{sf} (inherits from \code{data.frame}) with 436 rows and 13 columns.
+}
\source{
\url{https://population.un.org/wup/}
}
\usage{
-data(metro)
+metro
}
\description{
-Spatial data of metropolitan areas, of class \code{\link[sf:sf]{sf}}. The data includes a population times series from 1950 to (forecasted) 2030. All metro areas with over 1 million inhabitants in 2010 are included.
+\code{metro} includes a population time series from 1950 to (forecasted) 2030. All metro areas with over 1 million inhabitants in 2010 are included.
}
\references{
United Nations, Department of Economic and Social Affairs, Population Division (2014). World Urbanization Prospects: The 2014 Revision, CD-ROM Edition.
}
+\keyword{datasets}
diff --git a/man/qtm.Rd b/man/qtm.Rd
index 48b5a35f5..464d9212c 100644
--- a/man/qtm.Rd
+++ b/man/qtm.Rd
@@ -39,7 +39,7 @@ qtm(
\item{fill, col, size, shape, lwd, lty, fill_alpha, col_alpha}{Visual variables.}
-\item{by}{data variable name by which the data is split, or a vector of two variable names to split the data by two variables (where the first is used for the rows and the second for the columns). See also \code{\link{tm_facets}}}
+\item{by}{data variable name by which the data is split, or a vector of two variable names to split the data by two variables (where the first is used for the rows and the second for the columns). See also \code{\link[=tm_facets]{tm_facets()}}}
\item{scale}{numeric value that serves as the global scale parameter. All font sizes, symbol sizes, border widths, and line widths are controlled by this value. The parameters \code{symbols.size}, \code{text.size}, and \code{lines.lwd} can be scaled seperately with respectively \code{symbols.scale}, \code{text.scale}, and \code{lines.scale}. See also \code{...}.}
@@ -47,11 +47,11 @@ qtm(
\item{crs}{Either a \code{\link[sf:st_crs]{crs}} object or a character value (\code{PROJ.4} character string). By default, the projection is used that is defined in the \code{shp} object itself.}
-\item{bbox}{bounding box. Arugment passed on to \code{\link{tm_shape}}}
+\item{bbox}{bounding box. Arugment passed on to \code{\link[=tm_shape]{tm_shape()}}}
-\item{basemaps}{name(s) of the provider or an URL of a tiled basemap. It is a shortcut to \code{\link{tm_basemap}}. Set to \code{NULL} to disable basemaps. By default, it is set to the tmap option \code{basemaps}.}
+\item{basemaps}{name(s) of the provider or an URL of a tiled basemap. It is a shortcut to \code{\link[=tm_basemap]{tm_basemap()}}. Set to \code{NULL} to disable basemaps. By default, it is set to the tmap option \code{basemaps}.}
-\item{overlays}{name(s) of the provider or an URL of a tiled overlay map. It is a shortcut to \code{\link{tm_tiles}}.}
+\item{overlays}{name(s) of the provider or an URL of a tiled overlay map. It is a shortcut to \code{\link[=tm_tiles]{tm_tiles()}}.}
\item{zindex}{zindex}
@@ -59,22 +59,22 @@ qtm(
\item{group.control}{group.control}
-\item{style}{Layout options (see \code{\link{tm_layout}}) that define the style. See \code{\link{tmap_style}} for details.}
+\item{style}{Layout options (see \code{\link[=tm_layout]{tm_layout()}}) that define the style. See \code{\link[=tmap_style]{tmap_style()}} for details.}
-\item{format}{Layout options (see \code{\link{tm_layout}}) that define the format. See \code{\link{tmap_format}} for details.}
+\item{format}{Layout options (see \code{\link[=tm_layout]{tm_layout()}}) that define the format. See \code{\link[=tmap_format]{tmap_format()}} for details.}
-\item{...}{arguments passed on to the \code{tm_*} functions. The prefix of these arguments should be with the layer function name without \code{"tm_"} and a period. For instance, the palette for polygon fill color is called \code{fill.palette}. The following prefixes are supported: \code{shape.}, \code{fill.}, \code{borders.}, \code{polygons.}, \code{symbols.}, \code{dots.}, \code{lines.}, \code{raster.}, \code{text.}, \code{layout.}, \code{grid.}, \code{facets.}, and \code{view.}. Arguments that have a unique name, i.e. that does not exist in any other layer function, e.g. \code{convert2density}, can also be called without prefix.}
+\item{...}{arguments passed on to the \verb{tm_*} functions. The prefix of these arguments should be with the layer function name without \code{"tm_"} and a period. For instance, the palette for polygon fill color is called \code{fill.palette}. The following prefixes are supported: \code{shape.}, \code{fill.}, \code{borders.}, \code{polygons.}, \code{symbols.}, \code{dots.}, \code{lines.}, \code{raster.}, \code{text.}, \code{layout.}, \code{grid.}, \code{facets.}, and \code{view.}. Arguments that have a unique name, i.e. that does not exist in any other layer function, e.g. \code{convert2density}, can also be called without prefix.}
}
\value{
-\code{\link{tmap-element}}
+\code{\link[=tmap-element]{tmap-element()}}
}
\description{
-Draw a thematic map quickly. This function is a convenient wrapper of the main plotting method of stacking \code{\link{tmap-element}}s. Without arguments or with a search term, this functions draws an interactive map.
+Draw a thematic map quickly. This function is a convenient wrapper of the main plotting method of stacking \code{\link[=tmap-element]{tmap-element()}}s. Without arguments or with a search term, this functions draws an interactive map.
}
\details{
-The first argument is a shape object (normally specified by \code{\link{tm_shape}}). The next arguments, from \code{fill} to \code{raster}, are the aesthetics from the main layers. The remaining arguments are related to the map layout. Any argument from any main layer function, such as \code{\link{tm_polygons}}, can be specified (see \code{...}). It is also possible to stack \code{\link{tmap-element}}s on a \code{qtm} plot. See examples.
+The first argument is a shape object (normally specified by \code{\link[=tm_shape]{tm_shape()}}). The next arguments, from \code{fill} to \code{raster}, are the aesthetics from the main layers. The remaining arguments are related to the map layout. Any argument from any main layer function, such as \code{\link[=tm_polygons]{tm_polygons()}}, can be specified (see \code{...}). It is also possible to stack \code{\link[=tmap-element]{tmap-element()}}s on a \code{qtm} plot. See examples.
-By default, a scale bar is shown. This option can be set with \code{\link{tmap_options}} (argument \code{qtm.scalebar}). A minimap is shown by default when \code{qtm} is called without arguments of with a search term. This option can be set with \code{\link{tmap_options}} (argument \code{qtm.minimap}).
+By default, a scale bar is shown. This option can be set with \code{\link[=tmap_options]{tmap_options()}} (argument \code{qtm.scalebar}). A minimap is shown by default when \code{qtm} is called without arguments of with a search term. This option can be set with \code{\link[=tmap_options]{tmap_options()}} (argument \code{qtm.minimap}).
}
\examples{
data(World, rivers, metro)
@@ -127,5 +127,5 @@ qtm("Amsterdam")
Tennekes, M., 2018, {tmap}: Thematic Maps in {R}, Journal of Statistical Software, 84(6), 1-39, \doi{10.18637/jss.v084.i06}
}
\seealso{
-\href{../doc/tmap-getstarted.html}{\code{vignette("tmap-getstarted")}}
+\code{vignette("tmap_sneek_peek")}
}
diff --git a/man/rivers.Rd b/man/rivers.Rd
index 72c3f2fc9..58382d574 100644
--- a/man/rivers.Rd
+++ b/man/rivers.Rd
@@ -4,12 +4,16 @@
\name{rivers}
\alias{rivers}
\title{Spatial data of rivers}
+\format{
+An object of class \code{sf} (inherits from \code{data.frame}) with 1616 rows and 5 columns.
+}
\source{
\url{https://www.naturalearthdata.com}
}
\usage{
-data(rivers)
+rivers
}
\description{
-Spatial data of rivers, of class \code{\link[sf:sf]{sf}}
+Spatial data of rivers
}
+\keyword{datasets}
diff --git a/man/tm_add_legend.Rd b/man/tm_add_legend.Rd
index 42fd4068d..27b0fd6a3 100644
--- a/man/tm_add_legend.Rd
+++ b/man/tm_add_legend.Rd
@@ -18,11 +18,11 @@ tm_add_legend(
)
}
\arguments{
-\item{...}{visual variables and arguments passed on to `tm_legend`. By default, the argument `type` is set to `"Symbols"`, which means that the supported visual variables are: `"fill"`, `"col"`, `"shape"`, `"size"`, `"fill_alpha"`, `"col_alpha"`, `"lty"`, `"lwd"`, `"linejoin"`, and `"lineend"`.}
+\item{...}{visual variables and arguments passed on to \code{tm_legend}. By default, the argument \code{type} is set to \code{"Symbols"}, which means that the supported visual variables are: \code{"fill"}, \code{"col"}, \code{"shape"}, \code{"size"}, \code{"fill_alpha"}, \code{"col_alpha"}, \code{"lty"}, \code{"lwd"}, \code{"linejoin"}, and \code{"lineend"}.}
\item{labels}{labels}
-\item{type}{the layer type from which the visual variables (see ...) are taken. Options: `"Symbols"` (default), `"Lines"`, `"Polygons"`, and `"Text"`.}
+\item{type}{the layer type from which the visual variables (see ...) are taken. Options: \code{"Symbols"} (default), \code{"Lines"}, \code{"Polygons"}, and \code{"Text"}.}
\item{title}{text of the title}
@@ -30,9 +30,9 @@ tm_add_legend(
\item{orientation}{legend orientation}
-\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)}
+\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see \code{group.control})}
-\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).}
+\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: \code{"radio"} for radio buttons (meaning only one group can be shown), \code{"check"} for check boxes (so multiple groups can be shown), and \code{"none"} for no control (the group cannot be (de)selected).}
\item{resize.as.group}{resize.as.group}
diff --git a/man/tm_basemap.Rd b/man/tm_basemap.Rd
index c0ddd96aa..0fbea8bac 100644
--- a/man/tm_basemap.Rd
+++ b/man/tm_basemap.Rd
@@ -24,7 +24,7 @@ tm_tiles(
)
}
\arguments{
-\item{server}{Name of the provider or an URL. The list of available providers can be obtained with \code{providers} (tip: in RStudio, type \code{providers$} to see the options). See \url{https://leaflet-extras.github.io/leaflet-providers/preview/} for a preview of those. When a URL is provided, it should be in template format, e.g. \code{"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}. Use \code{NULL} in \code{tm_basemap} to disable basemaps.}
+\item{server}{Name of the provider or an URL. The list of available providers can be obtained with \code{providers} (tip: in RStudio, type \verb{providers$} to see the options). See \url{https://leaflet-extras.github.io/leaflet-providers/preview/} for a preview of those. When a URL is provided, it should be in template format, e.g. \code{"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}. Use \code{NULL} in \code{tm_basemap()} to disable basemaps.}
\item{alpha}{Transparency level}
@@ -32,12 +32,12 @@ tm_tiles(
\item{zindex}{zindex of the pane in view mode. By default, it is set to the layer number plus 400. By default, the tmap layers will therefore be placed in the custom panes \code{"tmap401"}, \code{"tmap402"}, etc., except for the base tile layers, which are placed in the standard \code{"tile"}. This parameter determines both the name of the pane and the z-index, which determines the pane order from bottom to top. For instance, if \code{zindex} is set to 500, the pane will be named \code{"tmap500"}.}
-\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)}
+\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see \code{group.control})}
-\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).}
+\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: \code{"radio"} for radio buttons (meaning only one group can be shown), \code{"check"} for check boxes (so multiple groups can be shown), and \code{"none"} for no control (the group cannot be (de)selected).}
}
\description{
-Map layer that draws tiles from a tile server. The function \code{tm_basemap} draws the tile layer as basemap, i.e. as bottom layer. In contrast, \code{tm_tiles} draws the tile layer as overlay layer, where the stacking order corresponds with the order in which this layer is called, just like other map layers.
+Map layer that draws tiles from a tile server. \code{tm_basemap()} draws the tile layer as basemap, i.e. as bottom layer. In contrast, \code{tm_tiles()} draws the tile layer as overlay layer, where the stacking order corresponds with the order in which this layer is called, just like other map layers.
}
\examples{
tm_basemap() +
diff --git a/man/tm_cartogram.Rd b/man/tm_cartogram.Rd
index 4855d06ed..01f60985a 100644
--- a/man/tm_cartogram.Rd
+++ b/man/tm_cartogram.Rd
@@ -17,11 +17,11 @@ tm_cartogram(
\arguments{
\item{size, size.scale, size.legend, size.free}{Transformation variable that determines the size of the polygons.}
-\item{plot.order}{Specification in which order the spatial features are drawn. See \code{\link{tm_plot_order}} for details.}
+\item{plot.order}{Specification in which order the spatial features are drawn. See \code{\link[=tm_plot_order]{tm_plot_order()}} for details.}
\item{trans.args}{lists that are passed on to internal transformation function}
-\item{...}{passd on to \code{\link{tm_polygons}}}
+\item{...}{passd on to \code{\link[=tm_polygons]{tm_polygons()}}}
}
\description{
Map layer that draws a cartogram
diff --git a/man/tm_facets.Rd b/man/tm_facets.Rd
index 4517ac218..382ec1b13 100644
--- a/man/tm_facets.Rd
+++ b/man/tm_facets.Rd
@@ -77,7 +77,7 @@ tm_facets_flip()
\item{sync}{Logical. Should the navigation in view mode (zooming and panning) be synchronized? By default \code{TRUE} if the facets have the same bounding box. This is generally the case when rasters are plotted, or when free.coords is \code{FALSE}.}
-\item{showNA}{If the \code{by} argument is specified, should missing values of the \code{by}-variable be shown in a facet? If two \code{by}-variables are specified, should missing values be shown in an additional row and column? If \code{NA}, missing values only are shown if they exist. Similar to the \code{useNA} argument of \code{\link[base:table]{table}}, where \code{TRUE}, \code{FALSE}, and \code{NA} correspond to \code{"always"}, \code{"no"}, and \code{"ifany"} respectively.}
+\item{showNA}{If the \code{by} argument is specified, should missing values of the \code{by}-variable be shown in a facet? If two \code{by}-variables are specified, should missing values be shown in an additional row and column? If \code{NA}, missing values only are shown if they exist. Similar to the \code{useNA} argument of \link[base:table]{table()}, where \code{TRUE}, \code{FALSE}, and \code{NA} correspond to \code{"always"}, \code{"no"}, and \code{"ifany"} respectively.}
\item{textNA}{Text used for facets of missing values.}
@@ -85,10 +85,10 @@ tm_facets_flip()
\item{type}{\code{"grid"}, \code{"wrap"} or \code{"stack"}}
-\item{along}{deceprated Please use \code{tm_facets_page}}
+\item{along}{deceprated Please use \code{tm_facets_page()}}
-\item{...}{paseed on to `tm_facets`}
+\item{...}{paseed on to \code{tm_facets()}}
}
\description{
-Specify facets. \code{tm_facets} is the core function, but recommended is to use \code{tm_facets_wrap}, \code{tm_facets_stack} or \code{tm_facets_grid}. The former two specify facets for one grouping variable (so one faceting dimension). The difference is that wrap may place facets in multiple rows and columns whereas \code{tm_facets_stack} stacks the facets either horizontally or vertically. \code{tm_facets_grid} supports up to three faceting dimensions.
+Specify facets. \code{tm_facets()} is the core function, but recommended is to use \code{tm_facets_wrap()}, \code{tm_facets_stack()} or \code{tm_facets_grid()}. The former two specify facets for one grouping variable (so one faceting dimension). The difference is that wrap may place facets in multiple rows and columns whereas \code{tm_facets_stack()} stacks the facets either horizontally or vertically. \code{tm_facets_grid()} supports up to three faceting dimensions.
}
diff --git a/man/tm_grid.Rd b/man/tm_grid.Rd
index 345cacd28..af06148f4 100644
--- a/man/tm_grid.Rd
+++ b/man/tm_grid.Rd
@@ -51,9 +51,9 @@ tm_grid(
\item{y}{Y coordinates for horizontal grid lines. If \code{NA}, it is specified with a pretty scale and \code{n.y}.}
-\item{n.x}{Preferred number of grid lines for the x axis. For the labels, a \code{\link{pretty}} sequence is used, so the number of actual labels may be different than \code{n.x}.}
+\item{n.x}{Preferred number of grid lines for the x axis. For the labels, a \code{\link[=pretty]{pretty()}} sequence is used, so the number of actual labels may be different than \code{n.x}.}
-\item{n.y}{Preferred number of grid lines for the y axis. For the labels, a \code{\link{pretty}} sequence is used, so the number of actual labels may be different than \code{n.y}.}
+\item{n.y}{Preferred number of grid lines for the y axis. For the labels, a \code{\link[=pretty]{pretty()}} sequence is used, so the number of actual labels may be different than \code{n.y}.}
\item{crs}{Projection character. If specified, the grid lines are projected accordingly. Many world maps are projected, but still have latitude longitude (EPSG 4326) grid lines.}
@@ -63,12 +63,12 @@ tm_grid(
\item{scientific}{Should the labels be formatted scientifically? If so, square brackets are used, and the \code{format} of the numbers is \code{"g"}. Otherwise, \code{format="f"}, and \code{text.separator}, \code{text.less.than}, and \code{text.or.more} are used. Also, the numbers are automatically rounded to millions or billions if applicable.}
\item{format}{By default, \code{"f"}, i.e. the standard notation \code{xxx.xxx}, is used. If \code{scientific=TRUE} then \code{"g"}, which means that numbers are formatted scientifically, i.e. \code{n.dddE+nn} if needed to save space.}
\item{digits}{Number of digits after the decimal point if \code{format="f"}, and the number of significant digits otherwise.}
-\item{...}{Other arguments passed on to \code{\link[base:formatC]{formatC}}}
+\item{...}{Other arguments passed on to \code{\link[=formatC]{formatC()}}}
}}
\item{labels.cardinal}{Add the four cardinal directions (N, E, S, W) to the labels, instead of using negative coordinates for west and south (so it assumes that the coordinates are positive in the north-east direction).}
-\item{...}{Arguments passed on to \code{\link{tm_grid}}}
+\item{...}{Arguments passed on to \code{\link[=tm_grid]{tm_grid()}}}
\item{col}{Color of the grid lines.}
@@ -104,12 +104,12 @@ tm_grid(
\item{zindex}{zindex of the pane in view mode. By default, it is set to the layer number plus 400. By default, the tmap layers will therefore be placed in the custom panes \code{"tmap401"}, \code{"tmap402"}, etc., except for the base tile layers, which are placed in the standard \code{"tile"}. This parameter determines both the name of the pane and the z-index, which determines the pane order from bottom to top. For instance, if \code{zindex} is set to 500, the pane will be named \code{"tmap500"}.}
-\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)}
+\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see \code{group.control})}
-\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).}
+\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: \code{"radio"} for radio buttons (meaning only one group can be shown), \code{"check"} for check boxes (so multiple groups can be shown), and \code{"none"} for no control (the group cannot be (de)selected).}
}
\description{
-Creates a \code{\link{tmap-element}} that draws coordinate grid lines. It serves as a layer that can be drawn anywhere between other layers. By default, \code{tm_grid} draws horizontal and vertical lines acording to the coordinate system of the (master) shape object. Latitude and longitude graticules are drawn with \code{tm_graticules}.
+Creates a \code{\link{tmap-element}} that draws coordinate grid lines. It serves as a layer that can be drawn anywhere between other layers. By default, \code{tm_grid()} draws horizontal and vertical lines acording to the coordinate system of the (master) shape object. Latitude and longitude graticules are drawn with \code{tm_graticules()}.
}
\examples{
current.mode <- tmap_mode("plot")
diff --git a/man/tm_layout.Rd b/man/tm_layout.Rd
index 343d79e37..5ef343c37 100644
--- a/man/tm_layout.Rd
+++ b/man/tm_layout.Rd
@@ -264,7 +264,7 @@ tm_style(style, ...)
tm_format(format, ...)
}
\arguments{
-\item{modes, crs, facet.max, facet.flip, raster.max.cells, show.messages, show.warnings, output.format, output.size, output.dpi, output.dpi.animation, value.const, value.na, value.null, value.blank, values.var, values.range, value.neutral, scales.var, scale.misc.args, label.format, label.na, scale, asp, bg.color, outer.bg.color, frame, frame.lwd, frame.r, frame.double.line, outer.margins, inner.margins, inner.margins.extra, meta.margins, meta.auto.margins, between.margin, component.offset, component.stack.margin, grid.mark.height, xylab.height, coords.height, xlab.show, xlab.text, xlab.size, xlab.color, xlab.rotation, xlab.space, xlab.fontface, xlab.fontfamily, xlab.side, ylab.show, ylab.text, ylab.size, ylab.color, ylab.rotation, ylab.space, ylab.fontface, ylab.fontfamily, ylab.side, panel.type, panel.wrap.pos, panel.xtab.pos, unit, color.sepia.intensity, color.saturation, color.vision.deficiency.sim, text.fontface, text.fontfamily, legend.show, legend.design, legend.orientation, legend.position, legend.width, legend.height, legend.stack, legend.group.frame, legend.resize.as.group, legend.reverse, legend.na.show, legend.title.color, legend.title.size, legend.title.fontface, legend.title.fontfamily, legend.xlab.color, legend.xlab.size, legend.xlab.fontface, legend.xlab.fontfamily, legend.ylab.color, legend.ylab.size, legend.ylab.fontface, legend.ylab.fontfamily, legend.text.color, legend.text.size, legend.text.fontface, legend.text.fontfamily, legend.frame, legend.frame.lwd, legend.frame.r, legend.bg.color, legend.bg.alpha, legend.settings.standard.portrait, legend.settings.standard.landscape, title.show, title.size, title.color, title.fontface, title.fontfamily, title.bg.color, title.bg.alpha, title.padding, title.frame, title.frame.lwd, title.frame.r, title.stack, title.position, title.group.frame, title.resize.as.group, credits.show, credits.size, credits.color, credits.fontface, credits.fontfamily, credits.bg.color, credits.bg.alpha, credits.padding, credits.frame, credits.frame.lwd, credits.frame.r, credits.stack, credits.position, credits.width, credits.heigth, credits.group.frame, credits.resize.as.group, compass.north, compass.type, compass.text.size, compass.size, compass.show.labels, compass.cardinal.directions, compass.text.color, compass.color.dark, compass.color.light, compass.lwd, compass.bg.color, compass.bg.alpha, compass.margins, compass.show, compass.stack, compass.position, compass.frame, compass.frame.lwd, compass.frame.r, compass.group.frame, compass.resize.as.group, scalebar.show, scalebar.breaks, scalebar.width, scalebar.text.size, scalebar.text.color, scalebar.color.dark, scalebar.color.light, scalebar.lwd, scalebar.position, scalebar.bg.color, scalebar.bg.alpha, scalebar.size, scalebar.margins, scalebar.stack, scalebar.frame, scalebar.frame.lwd, scalebar.frame.r, scalebar.group.frame, scalebar.resize.as.group, grid.show, grid.labels.pos, grid.x, grid.y, grid.n.x, grid.n.y, grid.crs, grid.col, grid.lwd, grid.alpha, grid.labels.show, grid.labels.size, grid.labels.col, grid.labels.rot, grid.labels.format, grid.labels.cardinal, grid.labels.margin.x, grid.labels.margin.y, grid.labels.space.x, grid.labels.space.y, grid.labels.inside.frame, grid.ticks, grid.lines, grid.ndiscr, mouse_coordinates.stack, mouse_coordinates.position, mouse_coordinates.show, panel.show, panel.labels, panel.label.size, panel.label.color, panel.label.fontface, panel.label.fontfamily, panel.label.bg.color, panel.label.height, panel.label.rot, qtm.scalebar, qtm.minimap, qtm.mouse.coordinates, earth.boundary, earth.boundary.color, earth.boundary.lwd, earth.datum, space.color, attr.color, max.categories, legend.hist.bg.color, legend.hist.bg.alpha, legend.hist.size, legend.hist.height, legend.hist.width, attr.outside, attr.outside.position, attr.outside.size, attr.position, attr.just, basemap.server, basemap.alpha, basemap.zoom, overlays, overlays.alpha, alpha, colorNA, symbol.size.fixed, dot.size.fixed, text.size.variable, bbox, check.and.fix, set.bounds, set.view, set.zoom.limits, name, basemap.show}{see\code{\link{tmap_options}}}
+\item{modes, crs, facet.max, facet.flip, raster.max.cells, show.messages, show.warnings, output.format, output.size, output.dpi, output.dpi.animation, value.const, value.na, value.null, value.blank, values.var, values.range, value.neutral, scales.var, scale.misc.args, label.format, label.na, scale, asp, bg.color, outer.bg.color, frame, frame.lwd, frame.r, frame.double.line, outer.margins, inner.margins, inner.margins.extra, meta.margins, meta.auto.margins, between.margin, component.offset, component.stack.margin, grid.mark.height, xylab.height, coords.height, xlab.show, xlab.text, xlab.size, xlab.color, xlab.rotation, xlab.space, xlab.fontface, xlab.fontfamily, xlab.side, ylab.show, ylab.text, ylab.size, ylab.color, ylab.rotation, ylab.space, ylab.fontface, ylab.fontfamily, ylab.side, panel.type, panel.wrap.pos, panel.xtab.pos, unit, color.sepia.intensity, color.saturation, color.vision.deficiency.sim, text.fontface, text.fontfamily, legend.show, legend.design, legend.orientation, legend.position, legend.width, legend.height, legend.stack, legend.group.frame, legend.resize.as.group, legend.reverse, legend.na.show, legend.title.color, legend.title.size, legend.title.fontface, legend.title.fontfamily, legend.xlab.color, legend.xlab.size, legend.xlab.fontface, legend.xlab.fontfamily, legend.ylab.color, legend.ylab.size, legend.ylab.fontface, legend.ylab.fontfamily, legend.text.color, legend.text.size, legend.text.fontface, legend.text.fontfamily, legend.frame, legend.frame.lwd, legend.frame.r, legend.bg.color, legend.bg.alpha, legend.settings.standard.portrait, legend.settings.standard.landscape, title.show, title.size, title.color, title.fontface, title.fontfamily, title.bg.color, title.bg.alpha, title.padding, title.frame, title.frame.lwd, title.frame.r, title.stack, title.position, title.group.frame, title.resize.as.group, credits.show, credits.size, credits.color, credits.fontface, credits.fontfamily, credits.bg.color, credits.bg.alpha, credits.padding, credits.frame, credits.frame.lwd, credits.frame.r, credits.stack, credits.position, credits.width, credits.heigth, credits.group.frame, credits.resize.as.group, compass.north, compass.type, compass.text.size, compass.size, compass.show.labels, compass.cardinal.directions, compass.text.color, compass.color.dark, compass.color.light, compass.lwd, compass.bg.color, compass.bg.alpha, compass.margins, compass.show, compass.stack, compass.position, compass.frame, compass.frame.lwd, compass.frame.r, compass.group.frame, compass.resize.as.group, scalebar.show, scalebar.breaks, scalebar.width, scalebar.text.size, scalebar.text.color, scalebar.color.dark, scalebar.color.light, scalebar.lwd, scalebar.position, scalebar.bg.color, scalebar.bg.alpha, scalebar.size, scalebar.margins, scalebar.stack, scalebar.frame, scalebar.frame.lwd, scalebar.frame.r, scalebar.group.frame, scalebar.resize.as.group, grid.show, grid.labels.pos, grid.x, grid.y, grid.n.x, grid.n.y, grid.crs, grid.col, grid.lwd, grid.alpha, grid.labels.show, grid.labels.size, grid.labels.col, grid.labels.rot, grid.labels.format, grid.labels.cardinal, grid.labels.margin.x, grid.labels.margin.y, grid.labels.space.x, grid.labels.space.y, grid.labels.inside.frame, grid.ticks, grid.lines, grid.ndiscr, mouse_coordinates.stack, mouse_coordinates.position, mouse_coordinates.show, panel.show, panel.labels, panel.label.size, panel.label.color, panel.label.fontface, panel.label.fontfamily, panel.label.bg.color, panel.label.height, panel.label.rot, qtm.scalebar, qtm.minimap, qtm.mouse.coordinates, earth.boundary, earth.boundary.color, earth.boundary.lwd, earth.datum, space.color, attr.color, max.categories, legend.hist.bg.color, legend.hist.bg.alpha, legend.hist.size, legend.hist.height, legend.hist.width, attr.outside, attr.outside.position, attr.outside.size, attr.position, attr.just, basemap.server, basemap.alpha, basemap.zoom, overlays, overlays.alpha, alpha, colorNA, symbol.size.fixed, dot.size.fixed, text.size.variable, bbox, check.and.fix, set.bounds, set.view, set.zoom.limits, name, basemap.show}{see\code{\link[=tmap_options]{tmap_options()}}}
\item{title, main.title}{deprecated}
diff --git a/man/tm_legend.Rd b/man/tm_legend.Rd
index 073659c46..c43674f20 100644
--- a/man/tm_legend.Rd
+++ b/man/tm_legend.Rd
@@ -143,7 +143,7 @@ tm_legend_combine(variable)
\item{...}{passed on (?)}
-\item{variable}{visual (or transformation) variable to combine the legend with: e.g. `"fill"` or `"size"`}
+\item{variable}{visual (or transformation) variable to combine the legend with: e.g. \code{"fill"} or \code{"size"}}
}
\value{
OUTPUT_DESCRIPTION
diff --git a/man/tm_lines.Rd b/man/tm_lines.Rd
index 45a79337c..b65601ca1 100644
--- a/man/tm_lines.Rd
+++ b/man/tm_lines.Rd
@@ -45,19 +45,19 @@ tm_lines(
\item{col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.free}{Visual variable that determines the border color alpha transparency. See details.}
-\item{linejoin, lineend}{line join and line end. See \code{\link[grid:gpar]{gpar}} for details.}
+\item{linejoin, lineend}{line join and line end. See \link[grid:gpar]{gpar()} for details.}
-\item{plot.order}{Specification in which order the spatial features are drawn. See \code{\link{tm_plot_order}} for details.}
+\item{plot.order}{Specification in which order the spatial features are drawn. See \code{\link[=tm_plot_order]{tm_plot_order()}} for details.}
\item{trans.args, mapping.args}{lists that are passed on to internal transformation and mapping functions respectively}
\item{zindex}{Map layers are drawn on top of each other. The \code{zindex} numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.}
-\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)}
+\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see \code{group.control})}
-\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).}
+\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: \code{"radio"} for radio buttons (meaning only one group can be shown), \code{"check"} for check boxes (so multiple groups can be shown), and \code{"none"} for no control (the group cannot be (de)selected).}
-\item{popup.vars}{names of data variables that are shown in the popups in \code{"view"} mode. Set popup.vars to \code{TRUE} to show all variables in the shape object. Set popup.vars to \code{FALSE} to disable popups. Set popup.vars to a character vector of variable names to those those variables in the popups. The default (\code{NA}) depends on whether visual variables (e.g.`col`) are used. If so, only those are shown. If not all variables in the shape object are shown.}
+\item{popup.vars}{names of data variables that are shown in the popups in \code{"view"} mode. Set popup.vars to \code{TRUE} to show all variables in the shape object. Set popup.vars to \code{FALSE} to disable popups. Set popup.vars to a character vector of variable names to those those variables in the popups. The default (\code{NA}) depends on whether visual variables (e.g.\code{col}) are used. If so, only those are shown. If not all variables in the shape object are shown.}
\item{popup.format}{list of formatting options for the popup values. See the argument \code{legend.format} for options. Only applicable for numeric data variables. If one list of formatting options is provided, it is applied to all numeric variables of \code{popup.vars}. Also, a (named) list of lists can be provided. In that case, each list of formatting options is applied to the named variable.}
@@ -71,13 +71,13 @@ tm_lines(
Map layer that draws symbols Supported visual variables are: \code{col} (the color), \code{lwd} (line width), \code{lty} (line type), and \code{col_alpha} (color alpha transparency).
}
\details{
-The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link{tm_shape}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link{tm_facets}}.
+The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link[=tm_shape]{tm_shape()}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link[=tm_facets]{tm_facets()}}.
The \code{.scale} arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available \code{tm_scale_} functions. The default scale that is used is specified by the tmap option \code{scales.var}.
-The \code{.legend} arguments determine the used legend, specified with \code{\link{tm_legend}}. The default legend and its settings are determined by the tmap options \code{legend.}.
+The \code{.legend} arguments determine the used legend, specified with \code{\link[=tm_legend]{tm_legend()}}. The default legend and its settings are determined by the tmap options \code{legend.}.
-The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link{tm_facets}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link{tm_facets_grid}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link{tm_facets_wrap}} and \code{\link{tm_facets_stack}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
+The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link[=tm_facets]{tm_facets()}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link[=tm_facets_grid]{tm_facets_grid()}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link[=tm_facets_wrap]{tm_facets_wrap()}} and \code{\link[=tm_facets_stack]{tm_facets_stack()}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
}
\examples{
data(rivers)
diff --git a/man/tm_plot.Rd b/man/tm_plot.Rd
index fe27a8abb..300ec3483 100644
--- a/man/tm_plot.Rd
+++ b/man/tm_plot.Rd
@@ -7,7 +7,7 @@
tm_plot(use.gradient)
}
\arguments{
-\item{use.gradient}{Use gradient fill using \code{\link[grid:linearGradient]{linearGradient}}}
+\item{use.gradient}{Use gradient fill using \link[grid:patterns]{linearGradient()}}
}
\description{
Plot mode options. This option is specific to the plot mode.
diff --git a/man/tm_plot_order.Rd b/man/tm_plot_order.Rd
index a66f3c5f2..c43ad8315 100644
--- a/man/tm_plot_order.Rd
+++ b/man/tm_plot_order.Rd
@@ -13,7 +13,7 @@ tm_plot_order(
)
}
\arguments{
-\item{aes}{Visual variable for which the values determine the plotting order. Example: bubble map where the \code{"size"} aesthetic is used. A data variable (say population) is mapped via a continuous scale (\code{\link{tm_scale_continuous}}) to bubble sizes. The bubbles are plotted in order of size. How is determined by the other arguments. Use \code{"DATA"} to keep the same order as in the data. Another special value are \code{"AREA"} and \code{"LENGTH"} which are preserved for polygons and lines respectively: rather than a data variable the polygon area / line lengths determines the plotting order.}
+\item{aes}{Visual variable for which the values determine the plotting order. Example: bubble map where the \code{"size"} aesthetic is used. A data variable (say population) is mapped via a continuous scale (\code{\link[=tm_scale_continuous]{tm_scale_continuous()}}) to bubble sizes. The bubbles are plotted in order of size. How is determined by the other arguments. Use \code{"DATA"} to keep the same order as in the data. Another special value are \code{"AREA"} and \code{"LENGTH"} which are preserved for polygons and lines respectively: rather than a data variable the polygon area / line lengths determines the plotting order.}
\item{reverse}{Logical that determines whether the visual values are plotted in reversed order. The visual values (specified with tmap option \code{"values.var"}) are by default reversed, so plotted starting from the last value. In the bubble map example, this means that large bubbles are plotted first, hence at the bottom.}
diff --git a/man/tm_polygons.Rd b/man/tm_polygons.Rd
index 2835b8595..400dbe303 100644
--- a/man/tm_polygons.Rd
+++ b/man/tm_polygons.Rd
@@ -63,19 +63,19 @@ tm_borders(col = tm_const(), ...)
\item{col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.free}{Visual variable that determines the border color alpha transparency. See details.}
-\item{linejoin, lineend}{Line join and line end. See \code{\link[grid:gpar]{gpar}} for details.}
+\item{linejoin, lineend}{Line join and line end. See \link[grid:gpar]{gpar()} for details.}
-\item{plot.order}{Specification in which order the spatial features are drawn. See \code{\link{tm_plot_order}} for details.}
+\item{plot.order}{Specification in which order the spatial features are drawn. See \code{\link[=tm_plot_order]{tm_plot_order()}} for details.}
\item{trans.args, mapping.args}{lists that are passed on to internal transformation and mapping functions respectively}
\item{zindex}{Map layers are drawn on top of each other. The \code{zindex} numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.}
-\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)}
+\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see \code{group.control})}
-\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).}
+\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: \code{"radio"} for radio buttons (meaning only one group can be shown), \code{"check"} for check boxes (so multiple groups can be shown), and \code{"none"} for no control (the group cannot be (de)selected).}
-\item{popup.vars}{names of data variables that are shown in the popups in \code{"view"} mode. Set popup.vars to \code{TRUE} to show all variables in the shape object. Set popup.vars to \code{FALSE} to disable popups. Set popup.vars to a character vector of variable names to those those variables in the popups. The default (\code{NA}) depends on whether visual variables (e.g.`col`) are used. If so, only those are shown. If not all variables in the shape object are shown.}
+\item{popup.vars}{names of data variables that are shown in the popups in \code{"view"} mode. Set popup.vars to \code{TRUE} to show all variables in the shape object. Set popup.vars to \code{FALSE} to disable popups. Set popup.vars to a character vector of variable names to those those variables in the popups. The default (\code{NA}) depends on whether visual variables (e.g.\code{col}) are used. If so, only those are shown. If not all variables in the shape object are shown.}
\item{popup.format}{list of formatting options for the popup values. See the argument \code{legend.format} for options. Only applicable for numeric data variables. If one list of formatting options is provided, it is applied to all numeric variables of \code{popup.vars}. Also, a (named) list of lists can be provided. In that case, each list of formatting options is applied to the named variable.}
@@ -89,13 +89,13 @@ tm_borders(col = tm_const(), ...)
Map layer that draws polygons. Supported visual variables are: \code{fill} (the fill color), \code{col} (the border color), \code{lwd} (line width), \code{lty} (line type), \code{fill_alpha} (fill color alpha transparency) and \code{col_alpha} (border color alpha transparency).
}
\details{
-The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (e.g., a spatial vector attribute or a raster layer of the object specified in \code{\link{tm_shape}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link{tm_facets}}.
+The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (e.g., a spatial vector attribute or a raster layer of the object specified in \code{\link[=tm_shape]{tm_shape()}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link[=tm_facets]{tm_facets()}}.
-The \code{.scale} arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available \code{tm_scale_} functions. The default is specified by the tmap option (\code{\link{tm_options}}) \code{scales.var}.
+The \code{.scale} arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available \code{tm_scale_} functions. The default is specified by the tmap option (\code{\link[=tm_options]{tm_options()}}) \code{scales.var}.
-The \code{.legend} arguments determine the used legend, specified with \code{\link{tm_legend}}. The default legend and its settings are determined by the tmap options (\code{\link{tm_options}}) \code{legend.} .
+The \code{.legend} arguments determine the used legend, specified with \code{\link[=tm_legend]{tm_legend()}}. The default legend and its settings are determined by the tmap options (\code{\link[=tm_options]{tm_options()}}) \code{legend.} .
-The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link{tm_facets}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link{tm_facets_grid}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link{tm_facets_wrap}} and \code{\link{tm_facets_stack}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
+The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link[=tm_facets]{tm_facets()}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link[=tm_facets_grid]{tm_facets_grid()}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link[=tm_facets_wrap]{tm_facets_wrap()}} and \code{\link[=tm_facets_stack]{tm_facets_stack()}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
}
\examples{
# load Africa country data
diff --git a/man/tm_pos.Rd b/man/tm_pos.Rd
index cf0b42782..4f250a256 100644
--- a/man/tm_pos.Rd
+++ b/man/tm_pos.Rd
@@ -28,24 +28,24 @@ tm_pos_auto_in(align.h, align.v, just.h, just.v)
\item{just.h, just.v}{The justification of the components. Only used in case \code{pos.h} and \code{pos.v} are numbers.}
}
\description{
-Set the position of map components, such as legends, title, compass, scale bar, etc. \code{tm_pos} is the function to position these components: \code{tm_pos_out} places the components outside the map area and \code{tm_pos_in} inside the map area. Each \code{position} argument of a map layer or component should be specified with one of these functions. The functions \code{tm_pos_auto_out} and \code{tm_pos_auto_in} are used to set the components automatically, and are recommended to use globally, via \code{\link{tmap_options}}. See details how the positioning works.
+Set the position of map components, such as legends, title, compass, scale bar, etc. \code{tm_pos()} is the function to position these components: \code{tm_pos_out()} places the components outside the map area and \code{tm_pos_in()} inside the map area. Each \code{position} argument of a map layer or component should be specified with one of these functions. The functions \code{tm_pos_auto_out()} and \code{tm_pos_auto_in()} are used to set the components automatically, and are recommended to use globally, via \code{\link[=tmap_options]{tmap_options()}}. See Details how the positioning works.
}
\details{
\tabular{rllll}{
\tab \tab \tab \tab \cr
\tab +------------------- \tab +-------------------------------- \tab +------------------- \tab + \cr
\tab | \tab | \tab | \tab | \cr
- "top" \tab | \tab | \tab | \tab | \cr
+ \code{"top"} \tab | \tab | \tab | \tab | \cr
\tab | \tab | \tab | \tab | \cr
\tab +------------------- \tab +-------------------------------- \tab +------------------- \tab + \cr
\tab | \tab | \tab | \tab | \cr
\tab | \tab | \tab | \tab | \cr
- cell.v  "center" \tab | \tab |   Map(s) \tab | \tab | \cr
+ \code{cell.v}  "center" \tab | \tab |   Map(s) \tab | \tab | \cr
\tab | \tab | \tab | \tab | \cr
\tab | \tab | \tab | \tab | \cr
\tab +------------------- \tab +-------------------------------- \tab +------------------- \tab + \cr
\tab | \tab | \tab | \tab | \cr
- "bottom" \tab | \tab | \tab | \tab | \cr
+ \code{"bottom"} \tab | \tab | \tab | \tab | \cr
\tab | \tab | \tab | \tab | \cr
\tab +------------------- \tab +-------------------------------- \tab +------------------- \tab + \cr
\tab   \code{"left"} \tab   \code{"center"} \tab    \code{"right"} \tab \cr
@@ -53,19 +53,19 @@ Set the position of map components, such as legends, title, compass, scale bar,
}
-\code{tm_pos_in} sets the position of the component(s) inside the maps area, which is equivalent to the center-center cell (in case there are facets, these are all drawn in this center-center cell).
+\code{tm_pos_in()} sets the position of the component(s) inside the maps area, which is equivalent to the center-center cell (in case there are facets, these are all drawn in this center-center cell).
-\code{tm_pos_out} sets the position of the component(s) outside the map.
+\code{tm_pos_out()} sets the position of the component(s) outside the map.
-The amount of space that the top and bottom rows, and left and right columns occupy is determined by the \code{\link{tm_layout}} arguments \code{meta.margins} and \code{meta.auto.margins}. The former sets the relative space of the bottom, left, top, and right side. In case these are set to \code{NA}, the space is set automatically based on 1) the maximum relative space specified by \code{meta.auto.margins} and 2) the presence and size of components in each cell. For instance, if there is one landscape oriented legend in the center-bottom cell, then the relative space of the bottom row is set to the height of that legend (given that it is smaller than the corresponding value of \code{meta.auto.margins}), while the other four sides are set to 0.
+The amount of space that the top and bottom rows, and left and right columns occupy is determined by the \code{\link[=tm_layout]{tm_layout()}} arguments \code{meta.margins} and \code{meta.auto.margins}. The former sets the relative space of the bottom, left, top, and right side. In case these are set to \code{NA}, the space is set automatically based on 1) the maximum relative space specified by \code{meta.auto.margins} and 2) the presence and size of components in each cell. For instance, if there is one landscape oriented legend in the center-bottom cell, then the relative space of the bottom row is set to the height of that legend (given that it is smaller than the corresponding value of \code{meta.auto.margins}), while the other four sides are set to 0.
-\code{tm_pos_auto_out} is more complex: the \code{cell.h} and \code{cell.v} arguments of should be set to one of the four corners. It does not mean that the components are drawn in a corner. The corner represents the sides of the map that the components are drawn. By default, legends are drawn either at the bottom or on the right-side of the map by default (see \code{tmap_options("legend.position")}). Only when there are row- and column-wise legends and a general legend (using \code{\link{tm_facets_grid}}), the general legend is drawn in the corner, but in practice this case will be rare.
+\code{tm_pos_auto_out()} is more complex: the \code{cell.h} and \code{cell.v} arguments of should be set to one of the four corners. It does not mean that the components are drawn in a corner. The corner represents the sides of the map that the components are drawn. By default, legends are drawn either at the bottom or on the right-side of the map by default (see \code{tmap_options("legend.position")}). Only when there are row- and column-wise legends and a general legend (using \code{\link[=tm_facets_grid]{tm_facets_grid()}}), the general legend is drawn in the corner, but in practice this case will be rare.
The arguments \code{pos.h} and \code{pos.v} determine where the components are drawn within the cell. Again, with \code{"left"}, \code{"center"}, and \code{"right"} for \code{pos.h} and \code{"top"}, \code{"center"}, and \code{"bottom"} for \code{pos.v}. The values can also be specified in upper-case, which influences the offset with the cell borders, which is determined by tmap option \code{component.offset}. By default, there is a small offset when components are drawn inside and no offset when they are drawn outside or with upper-case.
-\code{tm_pos_auto_in} automatically determines \code{pos.h} and \code{pos.v} given the available space inside the map. This is similar to the default positioning in tmap3.
+\code{tm_pos_auto_in()} automatically determines \code{pos.h} and \code{pos.v} given the available space inside the map. This is similar to the default positioning in tmap3.
In case multiple components are draw in the same cell and the same position inside that cell, they are stacked (determined which the \code{stack} argument in the legend or component function). The \code{align.h} and \code{align.v} arguments determine how these components will be justified with each other.
-Note that legends and components may be different for a facet row or column. This is the case when \code{\link{tm_facets_grid}} or \code{\link{tm_facets_stack}} are applied and when scales are set to free (with the \code{.free} argument of the map layer functions). In case a legends or components are draw row- or column wise, and the position of the legends (or components) is right next to the maps, these legends (or components) will be aligned with the maps.
+Note that legends and components may be different for a facet row or column. This is the case when \code{\link[=tm_facets_grid]{tm_facets_grid()}} or \code{\link[=tm_facets_stack]{tm_facets_stack()}} are applied and when scales are set to free (with the \code{.free} argument of the map layer functions). In case a legends or components are draw row- or column wise, and the position of the legends (or components) is right next to the maps, these legends (or components) will be aligned with the maps.
}
diff --git a/man/tm_raster.Rd b/man/tm_raster.Rd
index cdc3bb21e..adf39fb35 100644
--- a/man/tm_raster.Rd
+++ b/man/tm_raster.Rd
@@ -29,21 +29,21 @@ tm_raster(
\item{zindex}{Map layers are drawn on top of each other. The \code{zindex} numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.}
-\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)}
+\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see \code{group.control})}
-\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).}
+\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: \code{"radio"} for radio buttons (meaning only one group can be shown), \code{"check"} for check boxes (so multiple groups can be shown), and \code{"none"} for no control (the group cannot be (de)selected).}
}
\description{
Map layer that draws rasters. Supported visual variable is: \code{col} (the color).
}
\details{
-The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link{tm_shape}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link{tm_facets}}.
+The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link[=tm_shape]{tm_shape()}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link[=tm_facets]{tm_facets()}}.
The \code{.scale} arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available \code{tm_scale_} functions. The default scale that is used is specified by the tmap option \code{scales.var}.
-The \code{.legend} arguments determine the used legend, specified with \code{\link{tm_legend}}. The default legend and its settings are determined by the tmap options \code{legend.}.
+The \code{.legend} arguments determine the used legend, specified with \code{\link[=tm_legend]{tm_legend()}}. The default legend and its settings are determined by the tmap options \code{legend.}.
-The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link{tm_facets}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link{tm_facets_grid}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link{tm_facets_wrap}} and \code{\link{tm_facets_stack}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
+The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link[=tm_facets]{tm_facets()}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link[=tm_facets_grid]{tm_facets_grid()}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link[=tm_facets_wrap]{tm_facets_wrap()}} and \code{\link[=tm_facets_stack]{tm_facets_stack()}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
}
\examples{
# load land data
diff --git a/man/tm_scale.Rd b/man/tm_scale.Rd
index 75cca8c6e..96b8baa68 100644
--- a/man/tm_scale.Rd
+++ b/man/tm_scale.Rd
@@ -7,8 +7,8 @@
tm_scale(...)
}
\arguments{
-\item{...}{arguments passed on to the applied scale function \code{tm_scale_}}
+\item{...}{arguments passed on to the applied scale function \verb{tm_scale_*()}}
}
\description{
-Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link{tm_polygons}}). The function \code{tm_scale} is an scale that is set automatically given by the data type (factor, numeric, and integer) and the visual variable. The tmap option \code{scales.var} contains information which scale is applied when.
+Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link[=tm_polygons]{tm_polygons()}}). The function \code{tm_scale()} is a scale that is set automatically given by the data type (factor, numeric, and integer) and the visual variable. The tmap option \code{scales.var} contains information which scale is applied when.
}
diff --git a/man/tm_scale_bar.Rd b/man/tm_scale_bar.Rd
index 9484700ee..63ea51748 100644
--- a/man/tm_scale_bar.Rd
+++ b/man/tm_scale_bar.Rd
@@ -30,5 +30,5 @@ tm_scale_bar(...)
}}
}
\description{
-This function was renamed to [tm_scalebar()] in tmap v4.0
+This function was renamed to \code{\link[=tm_scalebar]{tm_scalebar()}} in tmap v4.0
}
diff --git a/man/tm_scale_bivariate.Rd b/man/tm_scale_bivariate.Rd
index 8397d6d2f..18a982f70 100644
--- a/man/tm_scale_bivariate.Rd
+++ b/man/tm_scale_bivariate.Rd
@@ -20,21 +20,21 @@ tm_scale_bivariate(
)
}
\arguments{
-\item{scale1, scale2}{two `tm_scale` objects. Currently, all `tm_scale_` functions are supported except `tm_scale_continous`.}
+\item{scale1, scale2}{two \code{tm_scale} objects. Currently, all \code{tm_scale_} functions are supported except \code{tm_scale_continous()}.}
-\item{values}{(generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{tm_polygons}) this is a palette name from the `cols4all` package (see \code{\link[cols4all:c4a]{c4a}}) or vector of colors, for size (e.g. \code{size} for \code{tm_symbols}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{\link{tm_symbols}}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.}
+\item{values}{(generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{tm_polygons()}) this is a palette name from the \code{cols4all} package (see \code{\link[cols4all:c4a]{cols4all::c4a()}}) or vector of colors, for size (e.g. \code{size} for \code{tm_symbols()}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{\link[=tm_symbols]{tm_symbols()}}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.}
\item{values.repeat}{(generic scale argument) Should the values be repeated in case there are more categories?}
-\item{values.range}{(generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \code{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \code{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.}
+\item{values.range}{(generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \verb{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \verb{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.}
-\item{values.scale}{(generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link{tm_symbols}} and \code{lwd} of \code{\link{tm_lines}}.}
+\item{values.scale}{(generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link[=tm_symbols]{tm_symbols()}} and \code{lwd} of \code{\link[=tm_lines]{tm_lines()}}.}
\item{value.na}{(generic scale argument) Value used for missing values. See tmap option \code{"value.na"} for defaults per visual variable.}
\item{value.null}{(generic scale argument) Value used for NULL values. See tmap option \code{"value.null"} for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).}
-\item{value.neutral}{(generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link{tm_symbols}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.}
+\item{value.neutral}{(generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link[=tm_symbols]{tm_symbols()}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.}
\item{labels}{(generic scale argument) Labels}
@@ -43,5 +43,5 @@ tm_scale_bivariate(
\item{label.null}{(generic scale argument) Label for null (out-of-scope) values}
}
\description{
-Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link{tm_polygons}}). The function \code{tm_scale_bivariat} is usedf or bivariate.scales
+Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link[=tm_polygons]{tm_polygons()}}). The function \code{tm_scale_bivariate()} is used or \code{bivariate.scales}.
}
diff --git a/man/tm_scale_categorical.Rd b/man/tm_scale_categorical.Rd
index 719752df2..4ab734aea 100644
--- a/man/tm_scale_categorical.Rd
+++ b/man/tm_scale_categorical.Rd
@@ -42,19 +42,19 @@ tm_scale_categorical(
\arguments{
\item{n.max}{Maximum number of categories (factor levels). In case there are more, they are grouped into \code{n.max} groups.}
-\item{values}{(generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{tm_polygons}) this is a palette name from the `cols4all` package (see \code{\link[cols4all:c4a]{c4a}}) or vector of colors, for size (e.g. \code{size} for \code{tm_symbols}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{\link{tm_symbols}}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.}
+\item{values}{(generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{tm_polygons()}) this is a palette name from the \code{cols4all} package (see \code{\link[cols4all:c4a]{cols4all::c4a()}}) or vector of colors, for size (e.g. \code{size} for \code{tm_symbols()}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{\link[=tm_symbols]{tm_symbols()}}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.}
\item{values.repeat}{(generic scale argument) Should the values be repeated in case there are more categories?}
-\item{values.range}{(generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \code{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \code{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.}
+\item{values.range}{(generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \verb{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \verb{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.}
-\item{values.scale}{(generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link{tm_symbols}} and \code{lwd} of \code{\link{tm_lines}}.}
+\item{values.scale}{(generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link[=tm_symbols]{tm_symbols()}} and \code{lwd} of \code{\link[=tm_lines]{tm_lines()}}.}
\item{value.na}{(generic scale argument) Value used for missing values. See tmap option \code{"value.na"} for defaults per visual variable.}
\item{value.null}{(generic scale argument) Value used for NULL values. See tmap option \code{"value.null"} for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).}
-\item{value.neutral}{(generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link{tm_symbols}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.}
+\item{value.neutral}{(generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link[=tm_symbols]{tm_symbols()}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.}
\item{levels}{Levels to show. Other values are treated as missing.}
@@ -66,8 +66,8 @@ tm_scale_categorical(
\item{label.null}{(generic scale argument) Label for null (out-of-scope) values}
-\item{label.format}{(generic scale argument) Label formatting (similar to legend.format in tmap3)}
+\item{label.format}{(generic scale argument) Label formatting (similar to \code{legend.format} in tmap3)}
}
\description{
-Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link{tm_polygons}}). The functions \code{tm_scale_categorical} and \code{tm_scale_ordinal} are used for categorical data. The only difference between these functions is that the former assumes unordered categories whereas the latter assumes ordered categories. For colors (the visual variable \code{fill} or \code{col}), different default color palettes are used (see the tmap option \code{values.var}).
+Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link[=tm_polygons]{tm_polygons()}}). The functions \code{tm_scale_categorical()} and \code{tm_scale_ordinal()} are used for categorical data. The only difference between these functions is that the former assumes unordered categories whereas the latter assumes ordered categories. For colors (the visual variable \code{fill} or \code{col}), different default color palettes are used (see the tmap option \code{values.var}).
}
diff --git a/man/tm_scale_continuous.Rd b/man/tm_scale_continuous.Rd
index 0ca535639..cd9f71d2d 100644
--- a/man/tm_scale_continuous.Rd
+++ b/man/tm_scale_continuous.Rd
@@ -35,27 +35,27 @@ tm_scale_continuous_log1p(...)
\item{limits}{Limits of the data values that are mapped to the continuous scale}
-\item{outliers.trunc}{Should outliers be truncated? An outlier is a data value that is below or above the respectively lower and upper limit. A logical vector of two values is expected. The first and second value determines whether values lower than the lower limit respectively higher than the upper limit are truncated to the lower respectively upper limit. If `FALSE` (default), they are considered as missing values.}
+\item{outliers.trunc}{Should outliers be truncated? An outlier is a data value that is below or above the respectively lower and upper limit. A logical vector of two values is expected. The first and second value determines whether values lower than the lower limit respectively higher than the upper limit are truncated to the lower respectively upper limit. If \code{FALSE} (default), they are considered as missing values.}
\item{ticks}{Tick values. If not specified, it is determined automatically with \code{n}}
-\item{trans}{Transformation function. One of `"identity"` (default), `"log"`, and `"log1p"`. Note: the base of the log scale is irrelevant, since the log transformed values are normalized before mapping to visual values.}
+\item{trans}{Transformation function. One of \code{"identity"} (default), \code{"log"}, and \code{"log1p"}. Note: the base of the log scale is irrelevant, since the log transformed values are normalized before mapping to visual values.}
\item{midpoint}{The data value that is interpreted as the midpoint. By default it is set to 0 if negative and positive values are present. Useful when values are diverging colors. In that case, the two sides of the color palette are assigned to negative respectively positive values. If all values are positive or all values are negative, then the midpoint is set to \code{NA}, which means that the value that corresponds to the middle color class (see \code{style}) is mapped to the middle color. If it is specified for sequential color palettes (e.g. \code{"Blues"}), then this color palette will be treated as a diverging color palette.}
-\item{values}{(generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{\link{tm_polygons}}) this is a palette name from the `cols4all` package (see \code{\link[cols4all:c4a]{c4a}}) or vector of colors, for size (e.g. \code{size} for \code{\link{tm_symbols}}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{\link{tm_symbols}}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.}
+\item{values}{(generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{\link[=tm_polygons]{tm_polygons()}}) this is a palette name from the \code{cols4all} package (see \code{\link[cols4all:c4a]{cols4all::c4a()}}) or vector of colors, for size (e.g. \code{size} for \code{\link[=tm_symbols]{tm_symbols()}}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{\link[=tm_symbols]{tm_symbols()}}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.}
\item{values.repeat}{(generic scale argument) Should the values be repeated in case there are more categories?}
-\item{values.range}{(generic scale argument) Range of the values, especially useful for color palettes. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \code{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \code{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.}
+\item{values.range}{(generic scale argument) Range of the values, especially useful for color palettes. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \verb{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \verb{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.}
-\item{values.scale}{(generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link{tm_symbols}} and \code{lwd} of \code{\link{tm_lines}}.}
+\item{values.scale}{(generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link[=tm_symbols]{tm_symbols()}} and \code{lwd} of \code{\link[=tm_lines]{tm_lines()}}.}
\item{value.na}{(generic scale argument) Value used for missing values. See tmap option \code{"value.na"} for defaults per visual variable.}
\item{value.null}{(generic scale argument) Value used for NULL values. See tmap option \code{"value.null"} for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).}
-\item{value.neutral}{(generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link{tm_symbols}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.}
+\item{value.neutral}{(generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link[=tm_symbols]{tm_symbols()}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.}
\item{labels}{(generic scale argument) Labels}
@@ -63,10 +63,10 @@ tm_scale_continuous_log1p(...)
\item{label.null}{(generic scale argument) Label for null (out-of-scope) values}
-\item{label.format}{(generic scale argument) Label formatting (similar to legend.format in tmap3)}
+\item{label.format}{(generic scale argument) Label formatting (similar to \code{legend.format} in tmap3)}
-\item{...}{passed on to `tm_scale_continuous`}
+\item{...}{passed on to \code{tm_scale_continuous}}
}
\description{
-Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link{tm_polygons}}). The function \code{tm_scale_continuous} is used for continuous data. The functions \code{tm_scale_continuous_} use transformation functions x.
+Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link[=tm_polygons]{tm_polygons()}}). The function \code{tm_scale_continuous} is used for continuous data. The functions \verb{tm_scale_continuous_} use transformation functions x.
}
diff --git a/man/tm_scale_discrete.Rd b/man/tm_scale_discrete.Rd
index 2fbe445a8..ef0495ef0 100644
--- a/man/tm_scale_discrete.Rd
+++ b/man/tm_scale_discrete.Rd
@@ -25,19 +25,19 @@ tm_scale_discrete(
\item{midpoint}{The data value that is interpreted as the midpoint. By default it is set to 0 if negative and positive values are present. Useful when values are diverging colors. In that case, the two sides of the color palette are assigned to negative respectively positive values. If all values are positive or all values are negative, then the midpoint is set to \code{NA}, which means that the value that corresponds to the middle color class (see \code{style}) is mapped to the middle color. If it is specified for sequential color palettes (e.g. \code{"Blues"}), then this color palette will be treated as a diverging color palette.}
-\item{values}{(generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{\link{tm_polygons}}) this is a palette name from the `cols4all` package (see \code{\link[cols4all:c4a]{c4a}}) or vector of colors, for size (e.g. \code{size} for \code{tm_symbols}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{\link{tm_symbols}}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.}
+\item{values}{(generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{\link[=tm_polygons]{tm_polygons()}}) this is a palette name from the \code{cols4all} package (see \code{\link[cols4all:c4a]{cols4all::c4a()}}) or vector of colors, for size (e.g. \code{size} for \code{tm_symbols}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{\link[=tm_symbols]{tm_symbols()}}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.}
\item{values.repeat}{(generic scale argument) Should the values be repeated in case there are more categories?}
-\item{values.range}{(generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \code{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \code{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.}
+\item{values.range}{(generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \verb{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \verb{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.}
-\item{values.scale}{(generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link{tm_symbols}} and \code{lwd} of \code{\link{tm_lines}}.}
+\item{values.scale}{(generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link[=tm_symbols]{tm_symbols()}} and \code{lwd} of \code{\link[=tm_lines]{tm_lines()}}.}
\item{value.na}{(generic scale argument) Value used for missing values. See tmap option \code{"value.na"} for defaults per visual variable.}
\item{value.null}{(generic scale argument) Value used for NULL values. See tmap option \code{"value.null"} for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).}
-\item{value.neutral}{(generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link{tm_symbols}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.}
+\item{value.neutral}{(generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link[=tm_symbols]{tm_symbols()}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.}
\item{labels}{(generic scale argument) Labels}
@@ -45,8 +45,8 @@ tm_scale_discrete(
\item{label.null}{(generic scale argument) Label for null (out-of-scope) values}
-\item{label.format}{(generic scale argument) Label formatting (similar to legend.format in tmap3)}
+\item{label.format}{(generic scale argument) Label formatting (similar to \code{legend.format} in tmap3)}
}
\description{
-Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link{tm_polygons}}). The function \code{tm_scale_discrete} is used for discrete numerical data, such as integers.
+Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link[=tm_polygons]{tm_polygons()}}). The function \code{tm_scale_discrete()} is used for discrete numerical data, such as integers.
}
diff --git a/man/tm_scale_intervals.Rd b/man/tm_scale_intervals.Rd
index b9e169aec..1eaebc60e 100644
--- a/man/tm_scale_intervals.Rd
+++ b/man/tm_scale_intervals.Rd
@@ -28,9 +28,9 @@ tm_scale_intervals(
\arguments{
\item{n}{Number of intervals. For some styles (see argument \code{style} below) it is the preferred number rather than the exact number.}
-\item{style}{Method to create intervals. Options are \code{"cat"}, \code{"fixed"}, \code{"sd"}, \code{"equal"}, \code{"pretty"}, \code{"quantile"}, \code{"kmeans"}, \code{"hclust"}, \code{"bclust"}, \code{"fisher"}, \code{"jenks"}, \code{"dpih"}, \code{"headtails"}, and \code{"log10_pretty"}. See the details in \code{\link[classInt:classIntervals]{classIntervals}} (extra arguments can be passed on via \code{style.args}).}
+\item{style}{Method to create intervals. Options are \code{"cat"}, \code{"fixed"}, \code{"sd"}, \code{"equal"}, \code{"pretty"}, \code{"quantile"}, \code{"kmeans"}, \code{"hclust"}, \code{"bclust"}, \code{"fisher"}, \code{"jenks"}, \code{"dpih"}, \code{"headtails"}, and \code{"log10_pretty"}. See the details in \code{\link[classInt:classIntervals]{classInt::classIntervals()}} (extra arguments can be passed on via \code{style.args}).}
-\item{style.args}{List of extra arguments passed on to \code{\link[classInt:classIntervals]{classIntervals}}.}
+\item{style.args}{List of extra arguments passed on to \code{\link[classInt:classIntervals]{classInt::classIntervals()}}.}
\item{breaks}{Interval breaks (only used and required when \code{style=="fixed"})}
@@ -40,19 +40,19 @@ tm_scale_intervals(
\item{as.count}{Should the data variable be processed as a count variable? For instance, if \code{style = "pretty"}, \code{n = 2}, and the value range of the variable is 0 to 10, then the column classes for \code{as.count = TRUE} are 0; 1 to 5; 6 to 10 (note that 0 is regarded as an own category) whereas for \code{as.count = FALSE} they are 0 to 5; 5 to 10. Only applicable if \code{style} is \code{"pretty"}, \code{"fixed"}, or \code{"log10_pretty"}. By default, \code{TRUE} if \code{style} is one of these, and the variable is an integer.}
-\item{values}{(generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{\link{tm_polygons}}) this is a palette name from the `cols4all` package (see \code{\link[cols4all:c4a]{c4a}}) or vector of colors, for size (e.g. \code{size} for \code{tm_symbols}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{tm_symbols}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.}
+\item{values}{(generic scale argument) The visual values. For colors (e.g. \code{fill} or \code{col} for \code{\link[=tm_polygons]{tm_polygons()}}) this is a palette name from the \code{cols4all} package (see \code{\link[cols4all:c4a]{cols4all::c4a()}}) or vector of colors, for size (e.g. \code{size} for \code{tm_symbols}) these are a set of sizes (if two values are specified they are interpret as range), for symbol shapes (e.g. \code{shape} for \code{tm_symbols}) these are a set of symbols, etc. The tmap option \code{values.var} contains the default values per visual variable and in some cases also per data type.}
\item{values.repeat}{(generic scale argument) Should the values be repeated in case there are more categories?}
-\item{values.range}{(generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \code{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \code{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.}
+\item{values.range}{(generic scale argument) Range of the values. Vector of two numbers (both between 0 and 1) where the first determines the minimum and the second the maximum. Full range, which means that all values are used, is encoded as \code{c(0, 1)}. For instance, when a grey scale is used for color (from black to white), \code{c(0,1)} means that all colors are used, \verb{0.25, 0.75} means that only colors from dark grey to light grey are used (more precisely \code{"grey25"} to \code{"grey75"}), and \verb{0, 0.5} means that only colors are used from black to middle grey (\code{"grey50"}). When only one number is specified, this is interpreted as the second number (where the first is set to 0). Default values can be set via the tmap option \code{values.range}.}
-\item{values.scale}{(generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link{tm_symbols}} and \code{lwd} of \code{\link{tm_lines}}.}
+\item{values.scale}{(generic scale argument) Scaling of the values. Only useful for size-related visual variables, such as \code{size} of \code{\link[=tm_symbols]{tm_symbols()}} and \code{lwd} of \code{\link[=tm_lines]{tm_lines()}}.}
\item{value.na}{(generic scale argument) Value used for missing values. See tmap option \code{"value.na"} for defaults per visual variable.}
\item{value.null}{(generic scale argument) Value used for NULL values. See tmap option \code{"value.null"} for defaults per visual variable. Null data values occur when out-of-scope features are shown (e.g. for a map of Europe showing a data variable per country, the null values are applied to countries outside Europe).}
-\item{value.neutral}{(generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link{tm_symbols}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.}
+\item{value.neutral}{(generic scale argument) Value that can be considered neutral. This is used for legends of other visual variables of the same map layer. E.g. when both \code{fill} and \code{size} are used for \code{\link[=tm_symbols]{tm_symbols()}} (using filled circles), the size legend items are filled with the \code{value.neutral} color from the \code{fill.scale} scale, and fill legend items are bubbles of size \code{value.neutral} from the \code{size.scale} scale.}
\item{labels}{(generic scale argument) Labels}
@@ -63,5 +63,5 @@ tm_scale_intervals(
\item{label.format}{(generic scale argument) Label formatting (similar to legend.format in tmap3)}
}
\description{
-Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link{tm_polygons}}). The function \code{tm_scale_interval} is used for numerical data.
+Scales in tmap are configured by the family of functions with prefix \code{tm_scale}. Such function should be used for the input of the \code{.scale} arguments in the layer functions (e.g. \code{fill.scale} in \code{\link[=tm_polygons]{tm_polygons()}}). The function \code{tm_scale_interval} is used for numerical data.
}
diff --git a/man/tm_scalebar.Rd b/man/tm_scalebar.Rd
index b46075785..13696c0a5 100644
--- a/man/tm_scalebar.Rd
+++ b/man/tm_scalebar.Rd
@@ -60,5 +60,5 @@ tm_scalebar(
\item{z}{z}
}
\description{
-Map component that adds a scale bar. As of version 4.0, `tm_scalebar` is used instead of `tm_scale_bar` (now deprecated), because of the potential confusion with the `tm_scale_x` scaling functions (like \code{\link{tm_scale_continuous}}).
+Map component that adds a scale bar. As of version 4.0, \code{tm_scalebar()} is used instead of \code{tm_scale_bar} (now deprecated), because of the potential confusion with the \code{tm_scale_x} scaling functions (like \code{\link[=tm_scale_continuous]{tm_scale_continuous()}}).
}
diff --git a/man/tm_sf.Rd b/man/tm_sf.Rd
index 8dc35da47..eca52283c 100644
--- a/man/tm_sf.Rd
+++ b/man/tm_sf.Rd
@@ -69,31 +69,31 @@ tm_sf(
\item{col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.free}{Visual variable that determines the border color alpha transparency. See details.}
-\item{linejoin, lineend}{line join and line end. See \code{\link[grid:gpar]{gpar}} for details.}
+\item{linejoin, lineend}{line join and line end. See \link[grid:gpar]{gpar()} for details.}
-\item{plot.order.list}{Specification in which order the spatial features are drawn. This consists of a list of three elementary geometry types: for polygons, lines and, points. For each of these types, which are drawn in that order, a \code{\link{tm_plot_order}} is required.}
+\item{plot.order.list}{Specification in which order the spatial features are drawn. This consists of a list of three elementary geometry types: for polygons, lines and, points. For each of these types, which are drawn in that order, a \code{\link[=tm_plot_order]{tm_plot_order()}} is required.}
-\item{trans.args.list, mapping.args.list}{lists that are passed on to internal transformation and mapping functions respectively. Each is a list of three items, named `polygons`, `lines`, and `points`. See \code{\link{tm_polygons}}, \code{\link{tm_lines}}, and \code{\link{tm_dots}}.}
+\item{trans.args.list, mapping.args.list}{lists that are passed on to internal transformation and mapping functions respectively. Each is a list of three items, named \code{polygons}, \code{lines}, and \code{points}. See \code{\link[=tm_polygons]{tm_polygons()}}, \code{\link[=tm_lines]{tm_lines()}}, and \code{\link[=tm_dots]{tm_dots()}}.}
\item{zindex}{Map layers are drawn on top of each other. The \code{zindex} numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.}
-\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)}
+\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see \code{group.control})}
-\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).}
+\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: \code{"radio"} for radio buttons (meaning only one group can be shown), \code{"check"} for check boxes (so multiple groups can be shown), and \code{"none"} for no control (the group cannot be (de)selected).}
-\item{...}{passed on to \code{\link{tm_polygons}}, \code{\link{tm_lines}}, and \code{\link{tm_dots}}}
+\item{...}{passed on to \code{\link[=tm_polygons]{tm_polygons()}}, \code{\link[=tm_lines]{tm_lines()}}, and \code{\link[=tm_dots]{tm_dots()}}}
}
\description{
Map layer that draws simple features as they are. Supported visual variables are: \code{fill} (the fill color), \code{col} (the border color), \code{size} the point size, \code{shape} the symbol shape, \code{lwd} (line width), \code{lty} (line type), \code{fill_alpha} (fill color alpha transparency) and \code{col_alpha} (border color alpha transparency).
}
\details{
-The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link{tm_shape}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link{tm_facets}}.
+The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link[=tm_shape]{tm_shape()}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link[=tm_facets]{tm_facets()}}.
The \code{.scale} arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available \code{tm_scale_} functions. The default scale that is used is specified by the tmap option \code{scales.var}.
-The \code{.legend} arguments determine the used legend, specified with \code{\link{tm_legend}}. The default legend and its settings are determined by the tmap options \code{legend.}.
+The \code{.legend} arguments determine the used legend, specified with \code{\link[=tm_legend]{tm_legend()}}. The default legend and its settings are determined by the tmap options \code{legend.}.
-The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link{tm_facets}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link{tm_facets_grid}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link{tm_facets_wrap}} and \code{\link{tm_facets_stack}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
+The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link[=tm_facets]{tm_facets()}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link[=tm_facets_grid]{tm_facets_grid()}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link[=tm_facets_wrap]{tm_facets_wrap()}} and \code{\link[=tm_facets_stack]{tm_facets_stack()}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
}
\examples{
data(World)
diff --git a/man/tm_shape.Rd b/man/tm_shape.Rd
index c75e90d6a..62ed52cc3 100644
--- a/man/tm_shape.Rd
+++ b/man/tm_shape.Rd
@@ -33,5 +33,5 @@ tm_shape(
\item{...}{to catch deprecated arguments from version < 4.0}
}
\description{
-Specify a shape, which is a spatial object from one of these spatial object class packages: \code{sf}, \code{stars}, \code{terra}.
+Specify a shape, which is a spatial object from one of these spatial object class packages: \code{\link[sf:sf]{sf}}, \code{\link[stars:st_as_stars]{stars}}, \code{terra}.
}
diff --git a/man/tm_symbols.Rd b/man/tm_symbols.Rd
index 568661e56..6f35a6500 100644
--- a/man/tm_symbols.Rd
+++ b/man/tm_symbols.Rd
@@ -140,17 +140,17 @@ tm_bubbles(
\item{col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.free}{Visual variable that determines the border color alpha transparency. See details.}
-\item{plot.order}{Specification in which order the spatial features are drawn. See \code{\link{tm_plot_order}} for details.}
+\item{plot.order}{Specification in which order the spatial features are drawn. See \code{\link[=tm_plot_order]{tm_plot_order()}} for details.}
\item{trans.args, mapping.args}{lists that are passed on to internal transformation and mapping functions respectively}
\item{zindex}{Map layers are drawn on top of each other. The \code{zindex} numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.}
-\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)}
+\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see \code{group.control})}
-\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).}
+\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: \code{"radio"} for radio buttons (meaning only one group can be shown), \code{"check"} for check boxes (so multiple groups can be shown), and \code{"none"} for no control (the group cannot be (de)selected).}
-\item{popup.vars}{names of data variables that are shown in the popups in \code{"view"} mode. Set popup.vars to \code{TRUE} to show all variables in the shape object. Set popup.vars to \code{FALSE} to disable popups. Set popup.vars to a character vector of variable names to those those variables in the popups. The default (\code{NA}) depends on whether visual variables (e.g.`col`) are used. If so, only those are shown. If not all variables in the shape object are shown.}
+\item{popup.vars}{names of data variables that are shown in the popups in \code{"view"} mode. Set popup.vars to \code{TRUE} to show all variables in the shape object. Set popup.vars to \code{FALSE} to disable popups. Set popup.vars to a character vector of variable names to those those variables in the popups. The default (\code{NA}) depends on whether visual variables (e.g.\code{col}) are used. If so, only those are shown. If not all variables in the shape object are shown.}
\item{popup.format}{list of formatting options for the popup values. See the argument \code{legend.format} for options. Only applicable for numeric data variables. If one list of formatting options is provided, it is applied to all numeric variables of \code{popup.vars}. Also, a (named) list of lists can be provided. In that case, each list of formatting options is applied to the named variable.}
@@ -164,13 +164,13 @@ tm_bubbles(
Map layer that draws symbols Supported visual variables are: \code{fill} (the fill color), \code{col} (the border color), \code{size} the symbol size, \code{shape} the symbol shape, \code{lwd} (line width), \code{lty} (line type), \code{fill_alpha} (fill color alpha transparency) and \code{col_alpha} (border color alpha transparency).
}
\details{
-The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link{tm_shape}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link{tm_facets}}.
+The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link[=tm_shape]{tm_shape()}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link[=tm_facets]{tm_facets()}}.
The \code{.scale} arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available \code{tm_scale_} functions. The default scale that is used is specified by the tmap option \code{scales.var}.
-The \code{.legend} arguments determine the used legend, specified with \code{\link{tm_legend}}. The default legend and its settings are determined by the tmap options \code{legend.}.
+The \code{.legend} arguments determine the used legend, specified with \code{\link[=tm_legend]{tm_legend()}}. The default legend and its settings are determined by the tmap options \code{legend.}.
-The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link{tm_facets}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link{tm_facets_grid}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link{tm_facets_wrap}} and \code{\link{tm_facets_stack}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
+The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link[=tm_facets]{tm_facets()}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link[=tm_facets_grid]{tm_facets_grid()}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link[=tm_facets_wrap]{tm_facets_wrap()}} and \code{\link[=tm_facets_stack]{tm_facets_stack()}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
}
\examples{
# load Africa country data
diff --git a/man/tm_text.Rd b/man/tm_text.Rd
index a4ce8f704..407fd789a 100644
--- a/man/tm_text.Rd
+++ b/man/tm_text.Rd
@@ -43,23 +43,23 @@ tm_text(
\item{col, col.scale, col.legend, col.free}{Visual variable that determines the col color. See details.}
-\item{col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.free}{Visual variable that determines the border color alpha transparency. See details.}
+\item{col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.free}{Visual variable that determines the border color alpha transparency. See Details.}
-\item{fontface, fontface.scale, fontface.legend, fontface.free}{Visual variable that determines the font face. See details.}
+\item{fontface, fontface.scale, fontface.legend, fontface.free}{Visual variable that determines the font face. See Details.}
-\item{fontfamily}{The font family. See \code{\link[grid:gpar]{gpar}} for details.}
+\item{fontfamily}{The font family. See \link[grid:gpar]{gpar()} for details.}
\item{shadow}{Shadow behind the text. Logical or color.}
-\item{plot.order}{Specification in which order the spatial features are drawn. See \code{\link{tm_plot_order}} for details.}
+\item{plot.order}{Specification in which order the spatial features are drawn. See \code{\link[=tm_plot_order]{tm_plot_order()}} for details.}
\item{trans.args, mapping.args}{lists that are passed on to internal transformation and mapping functions respectively}
\item{zindex}{Map layers are drawn on top of each other. The \code{zindex} numbers (one for each map layer) determines the stacking order. By default the map layers are drawn in the order they are called.}
-\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see `group.control`)}
+\item{group}{Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see \code{group.control})}
-\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: `"radio"` for radio buttons (meaning only one group can be shown), `"check"` for check boxes (so multiple groups can be shown), and `"none"` for no control (the group cannot be (de)selected).}
+\item{group.control}{In view mode, the group control determines how layer groups can be switched on and off. Options: \code{"radio"} for radio buttons (meaning only one group can be shown), \code{"check"} for check boxes (so multiple groups can be shown), and \code{"none"} for no control (the group cannot be (de)selected).}
\item{...}{to catch deprecated arguments from version < 4.0}
}
@@ -67,13 +67,13 @@ tm_text(
Map layer that draws symbols Supported visual variables are: \code{text} (the text itself) \code{col} (color), \code{size} (font size), and \code{fontface} (font face).
}
\details{
-The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link{tm_shape}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link{tm_facets}}.
+The visual variable arguments (e.g. \code{col}) can be specified with either a data variable name (of the object specified in \code{\link[=tm_shape]{tm_shape()}}), or with a visual value (for \code{col}, a color is expected). Multiple values can be specified: in that case facets are created. These facets can be combined with other faceting data variables, specified with \code{\link[=tm_facets]{tm_facets()}}.
The \code{.scale} arguments determine the used scale to map the data values to visual variable values. These can be specified with one of the available \code{tm_scale_} functions. The default scale that is used is specified by the tmap option \code{scales.var}.
-The \code{.legend} arguments determine the used legend, specified with \code{\link{tm_legend}}. The default legend and its settings are determined by the tmap options \code{legend.}.
+The \code{.legend} arguments determine the used legend, specified with \code{\link[=tm_legend]{tm_legend()}}. The default legend and its settings are determined by the tmap options \code{legend.}.
-The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link{tm_facets}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link{tm_facets_grid}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will have its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link{tm_facets_wrap}} and \code{\link{tm_facets_stack}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
+The \code{.free} arguments determine whether scales are applied freely across facets, or shared. A logical value is required. They can also be specified with a vector of three logical values; these determine whether scales are applied freely per facet dimension. This is only useful when facets are applied (see \code{\link[=tm_facets]{tm_facets()}}). There are maximally three facet dimensions: rows, columns, and pages. This only applies for a facet grid (\code{\link[=tm_facets_grid]{tm_facets_grid()}}). For instance, \code{col.free = c(TRUE, FALSE, FALSE)} means that for the visual variable \code{col}, each row of facets will has its own scale, and therefore its own legend. For facet wraps and stacks (\code{\link[=tm_facets_wrap]{tm_facets_wrap()}} and \code{\link[=tm_facets_stack]{tm_facets_stack()}}) there is only one facet dimension, so the \code{.free} argument requires only one logical value.
}
\examples{
data(rivers)
diff --git a/man/tm_view.Rd b/man/tm_view.Rd
index 89bcf3ce5..ee8bc9fe2 100644
--- a/man/tm_view.Rd
+++ b/man/tm_view.Rd
@@ -24,13 +24,13 @@ tm_view(
\item{control.overlays}{overlay layers}
-\item{set.bounds}{logical that determines whether maximum bounds are set, or a bounding box. Not applicable in plot mode. In view mode, this is passed on to \code{\link[leaflet:setMaxBounds]{setMaxBounds}}}
+\item{set.bounds}{logical that determines whether maximum bounds are set, or a bounding box. Not applicable in plot mode. In view mode, this is passed on to \link[leaflet:map-methods]{setMaxBounds()}}
-\item{set.view}{numeric vector that determines the view. Either a vector of three: lng, lat, and zoom, or a single value: zoom. See \code{\link[leaflet:setView]{setView}}. Only applicable if \code{bbox} is not specified}
+\item{set.view}{numeric vector that determines the view. Either a vector of three: lng, lat, and zoom, or a single value: zoom. See \link[leaflet:map-methods]{setView()}. Only applicable if \code{bbox} is not specified}
-\item{set.zoom.limits}{numeric vector of two that set the minimum and maximum zoom levels (see \code{\link[leaflet:tileOptions]{tileOptions}}).}
+\item{set.zoom.limits}{numeric vector of two that set the minimum and maximum zoom levels (see \link[leaflet:map-options]{tileOptions()}).}
-\item{leaflet.options}{options passed on to \code{\link[leaflet:leafletOptions]{leafletOptions}}}
+\item{leaflet.options}{options passed on to \link[leaflet:leaflet]{leafletOptions()}}
}
\description{
View mode options. These options are specific to the view mode.
diff --git a/man/tm_xlab.Rd b/man/tm_xlab.Rd
index be8433576..d110a14b0 100644
--- a/man/tm_xlab.Rd
+++ b/man/tm_xlab.Rd
@@ -24,7 +24,7 @@ tm_ylab(text, size, color, rotation, space, fontface, fontfamily, side)
\item{fontfamily}{font family}
-\item{side}{side: `"top"` or `"bottom"` for `tm_xlab` and `"left"` or `"right"` for `tm_ylab`}
+\item{side}{side: \code{"top"} or \code{"bottom"} for \code{tm_xlab} and \code{"left"} or \code{"right"} for \code{tm_ylab}}
}
\description{
The x and y labels for maps
diff --git a/man/tmap-package.Rd b/man/tmap-package.Rd
index 13ae04f7c..807876137 100644
--- a/man/tmap-package.Rd
+++ b/man/tmap-package.Rd
@@ -9,13 +9,13 @@
Thematic maps are geographical maps in which spatial data distributions are visualized. This package offers a flexible, layer-based, and easy to use approach to create thematic maps, such as choropleths and bubble maps. It is based on the grammar of graphics, and resembles the syntax of ggplot2.
}
\details{
-This page provides a brief overview of all package functions. See \href{../doc/tmap-getstarted.html}{\code{vignette("tmap-getstarted")}} for a short introduction with examples.
+This page provides a brief overview of all package functions. See \code{vignette("tmap_sneek_peek")} for a short introduction with examples.
}
\section{Quick plotting method}{
\tabular{ll}{
-\code{\link{qtm}}\tab Plot a thematic map \cr
---------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+\code{\link[=qtm]{qtm()}}\tab Plot a thematic map \cr
+--------------------------- \tab ------------------------------------------- \cr
}
}
@@ -23,101 +23,101 @@ This page provides a brief overview of all package functions. See \href{../doc/t
Shape specification:
\tabular{ll}{
-\code{\link{tm_shape}}\tab Specify a shape object \cr
---------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+\code{\link[=tm_shape]{tm_shape()}}\tab Specify a shape object \cr
+--------------------------- \tab ------------------------------------------- \cr
}
Aesthetics base layers:
\tabular{ll}{
-\code{\link{tm_polygons}}\tab Create a polygon layer (with borders) \cr
-\code{\link{tm_symbols}}\tab Create a layer of symbols \cr
-\code{\link{tm_lines}}\tab Create a layer of lines \cr
-\code{\link{tm_raster}}\tab Create a raster layer \cr
-\code{\link{tm_text}}\tab Create a layer of text labels \cr
-\code{\link{tm_basemap}}\tab Create a layer of basemap tiles \cr
-\code{\link{tm_tiles}}\tab Create a layer of overlay tiles \cr
+\code{\link[=tm_polygons]{tm_polygons()}}\tab Create a polygon layer (with borders) \cr
+\code{\link[=tm_symbols]{tm_symbols()}}\tab Create a layer of symbols \cr
+\code{\link[=tm_lines]{tm_lines()}}\tab Create a layer of lines \cr
+\code{\link[=tm_raster]{tm_raster()}}\tab Create a raster layer \cr
+\code{\link[=tm_text]{tm_text()}}\tab Create a layer of text labels \cr
+\code{\link[=tm_basemap]{tm_basemap()}}\tab Create a layer of basemap tiles \cr
+\code{\link[=tm_tiles]{tm_tiles()}}\tab Create a layer of overlay tiles \cr
}
Aesthetics derived layers:
\tabular{ll}{
-\code{\link{tm_fill}}\tab Create a polygon layer (without borders) \cr
-\code{\link{tm_borders}}\tab Create polygon borders \cr
-\code{\link{tm_bubbles}}\tab Create a layer of bubbles \cr
-\code{\link{tm_squares}}\tab Create a layer of squares \cr
-\code{\link{tm_dots}}\tab Create a layer of dots \cr
-\code{\link{tm_markers}}\tab Create a layer of markers \cr
-\code{\link{tm_iso}}\tab Create a layer of iso/contour lines \cr
-\code{\link{tm_rgb}}\tab Create a raster layer of an image \cr
---------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+\code{\link[=tm_fill]{tm_fill()}}\tab Create a polygon layer (without borders) \cr
+\code{\link[=tm_borders]{tm_borders()}}\tab Create polygon borders \cr
+\code{\link[=tm_bubbles]{tm_bubbles()}}\tab Create a layer of bubbles \cr
+\code{\link[=tm_squares]{tm_squares()}}\tab Create a layer of squares \cr
+\code{\link[=tm_dots]{tm_dots()}}\tab Create a layer of dots \cr
+\code{\link[=tm_markers]{tm_markers()}}\tab Create a layer of markers \cr
+\code{\link[=tm_iso]{tm_iso()}}\tab Create a layer of iso/contour lines \cr
+\code{\link[=tm_rgb]{tm_rgb()}}\tab Create a raster layer of an image \cr
+--------------------------- \tab ------------------------------------------- \cr
}
Faceting (small multiples)
\tabular{ll}{
-\code{\link{tm_facets}}\tab Define facets \cr
---------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+\code{\link[=tm_facets]{tm_facets()}}\tab Define facets \cr
+--------------------------- \tab ------------------------------------------- \cr
}
Attributes:
\tabular{ll}{
-\code{\link{tm_grid}}\tab Create grid lines \cr
-\code{\link{tm_scale_bar}}\tab Create a scale bar \cr
-\code{\link{tm_compass}}\tab Create a map compass \cr
-\code{\link{tm_credits}}\tab Create a text for credits \cr
-\code{\link{tm_logo}}\tab Create a logo \cr
-\code{\link{tm_xlab} and \link{tm_ylab}}\tab Create axis labels \cr
-\code{\link{tm_minimap}}\tab Create a minimap (view mode only) \cr
---------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+\code{\link[=tm_grid]{tm_grid()}}\tab Create grid lines \cr
+\code{\link[=tm_scale_bar]{tm_scale_bar()}}\tab Create a scale bar \cr
+\code{\link[=tm_compass]{tm_compass()}}\tab Create a map compass \cr
+\code{\link[=tm_credits]{tm_credits()}}\tab Create a text for credits \cr
+\code{\link[=tm_logo]{tm_logo()}}\tab Create a logo \cr
+\code{\link[=tm_xlab]{tm_xlab()}} and \code{\link[=tm_ylab]{tm_ylab()}}\tab Create axis labels \cr
+\code{\link[=tm_minimap]{tm_minimap()}}\tab Create a minimap (view mode only) \cr
+--------------------------- \tab ------------------------------------------- \cr
}
Layout element:
\tabular{ll}{
-\code{\link{tm_layout}}\tab Adjust the layout (main function)\cr
-\code{\link{tm_legend}}\tab Adjust the legend \cr
-\code{\link{tm_view}}\tab Configure the interactive view mode \cr
-\code{\link{tm_style}}\tab Apply a predefined style \cr
-\code{\link{tm_format}}\tab Apply a predefined format \cr
---------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+\code{\link[=tm_layout]{tm_layout()}}\tab Adjust the layout (main function)\cr
+\code{\link[=tm_legend]{tm_legend()}}\tab Adjust the legend \cr
+\code{\link[=tm_view]{tm_view()}}\tab Configure the interactive view mode \cr
+\code{\link[=tm_style]{tm_style()}}\tab Apply a predefined style \cr
+\code{\link[=tm_format]{tm_format()}}\tab Apply a predefined format \cr
+--------------------------- \tab ------------------------------------------- \cr
}
Change options:
\tabular{ll}{
-\code{\link{tmap_mode}}\tab Set the tmap mode: \code{"plot"} or \code{"view"}\cr
-\code{\link{ttm}}\tab Toggle between the modes \cr
-\code{\link{tmap_options}}\tab Set global tmap options (from \code{\link{tm_layout}}, \code{\link{tm_view}}, and a couple of others) \cr
-\code{\link{tmap_style}}\tab Set the default style \cr
---------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+\code{\link[=tmap_mode]{tmap_mode()}}\tab Set the tmap mode: \code{"plot"} or \code{"view"}\cr
+\code{\link[=ttm]{ttm()}}\tab Toggle between the modes \cr
+\code{\link[=tmap_options]{tmap_options()}}\tab Set global tmap options (from \code{\link[=tm_layout]{tm_layout()}}, \code{\link[=tm_view]{tm_view()}}, and a couple of others) \cr
+\code{\link[=tmap_style]{tmap_style()}}\tab Set the default style \cr
+--------------------------- \tab ------------------------------------------- \cr
}
Create icons:
\tabular{ll}{
-\code{\link{tmap_icons}}\tab Specify icons for markers or proportional symbols \cr
---------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+\code{\link[=tmap_icons]{tmap_icons()}}\tab Specify icons for markers or proportional symbols \cr
+--------------------------- \tab ------------------------------------------- \cr
}
}
\section{Output functions}{
-
+
\tabular{ll}{
-\code{\link{print}}\tab Plot in graphics device or view interactively in web browser or RStudio's viewer pane \cr
-\code{\link{tmap_last}}\tab Redraw the last map \cr
-\code{\link{tmap_leaflet}}\tab Obtain a leaflet widget object \cr
-\code{\link{tmap_animation}}\tab Create an animation \cr
-\code{\link{tmap_arrange}}\tab Create small multiples of separate maps \cr
-\code{\link{tmap_save}}\tab Save thematic maps (either as image or HTML file) \cr
---------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+\code{\link[=print]{print()}}\tab Plot in graphics device or view interactively in web browser or RStudio's viewer pane \cr
+\code{\link[=tmap_last]{tmap_last()}}\tab Redraw the last map \cr
+\code{\link[=tmap_leaflet]{tmap_leaflet()}}\tab Obtain a leaflet widget object \cr
+\code{\link[=tmap_animation]{tmap_animation()}}\tab Create an animation \cr
+\code{\link[=tmap_arrange]{tmap_arrange()}}\tab Create small multiples of separate maps \cr
+\code{\link[=tmap_save]{tmap_save()}}\tab Save thematic maps (either as image or HTML file) \cr
+--------------------------- \tab ------------------------------------------- \cr
}
}
\section{Spatial datasets}{
-
+
\tabular{ll}{
\code{\link{World}}\tab World country data (\code{\link[sf:sf]{sf}} object of polygons) \cr
-\code{\link{NLD_prov}}\tab Netherlands province data (\code{\link[sf:sf]{sf}} object of polygons) \cr
-\code{\link{NLD_muni}}\tab Netherlands municipal data (\code{\link[sf:sf]{sf}} object of polygons) \cr
+\code{\link{NLD_prov}}\tab Netherlands province data (\code{\link[sf:sf]{sf}} object of polygons) \cr
+\code{\link{NLD_muni}}\tab Netherlands municipal data (\code{\link[sf:sf]{sf}} object of polygons) \cr
\code{\link{metro}}\tab Metropolitan areas (\code{\link[sf:sf]{sf}} object of points) \cr
\code{\link{rivers}}\tab Rivers (\code{\link[sf:sf]{sf}} object of lines) \cr
\code{\link{land}}\tab Global land cover (\code{\link[stars:st_as_stars]{stars}} object)\cr
---------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
+--------------------------- \tab ------------------------------------------- \cr
}
}
@@ -125,7 +125,7 @@ Create icons:
Tennekes, M., 2018, {tmap}: Thematic Maps in {R}, Journal of Statistical Software, 84(6), 1-39, \doi{10.18637/jss.v084.i06}
}
\seealso{
-\href{../doc/tmap-getstarted.html}{\code{vignette("tmap-getstarted")}}
+\code{vignette("tmap_sneek_peek")}, \url{https://r-tmap.github.io/tmap/}
}
\author{
Martijn Tennekes \email{mtennekes@gmail.com}
diff --git a/man/tmapAddLayerOptions.Rd b/man/tmapAddLayerOptions.Rd
index cf3bcce7f..7df3518b6 100644
--- a/man/tmapAddLayerOptions.Rd
+++ b/man/tmapAddLayerOptions.Rd
@@ -7,9 +7,9 @@
tmapAddLayerOptions(option, id, value)
}
\arguments{
-\item{option, }{one of: `"value.const"`, `"value.na"`, `"value.blank"`, `"values.var"`, `'values.range'`, `"value.neutral"`, `"scales.var"`}
+\item{option, }{one of: \code{"value.const"}, \code{"value.na"}, \code{"value.blank"}, \code{"values.var"}, \code{'values.range'}, \code{"value.neutral"}, \code{"scales.var"}}
-\item{id}{name of the visual variable with layer, in the format `"x.y"`, where x is the visual variable and y is the layer. It is also possible to set x only; then it applies to all layer functions.}
+\item{id}{name of the visual variable with layer, in the format \code{"x.y"}, where \code{x} is the visual variable and \code{y} is the layer. It is also possible to set \code{x} only; then it applies to all layer functions.}
\item{value}{value}
}
diff --git a/man/tmapSplitShp.Rd b/man/tmapSplitShp.Rd
index 667b7bc46..e7cc0434a 100644
--- a/man/tmapSplitShp.Rd
+++ b/man/tmapSplitShp.Rd
@@ -9,7 +9,7 @@ tmapSplitShp(shp, split_stars_dim)
\arguments{
\item{shp}{shape}
-\item{split_stars_dim}{name of the dimension to split (`""` to skip)}
+\item{split_stars_dim}{name of the dimension to split (\code{""} to skip)}
}
\description{
Internal method that split shape objects. So far, only used to split stars object (from dimension to attributes)
diff --git a/man/tmap_animation.Rd b/man/tmap_animation.Rd
index 9fffb4ac3..6947d605a 100644
--- a/man/tmap_animation.Rd
+++ b/man/tmap_animation.Rd
@@ -21,13 +21,13 @@ tmap_animation(
)
}
\arguments{
-\item{tm}{tmap or a list of tmap objects. If \code{tm} is a tmap object, facets should be created, where nrow and ncol in \code{\link{tm_facets}} have to be set to 1 in order to create one map per frame.}
+\item{tm}{tmap or a list of tmap objects. If \code{tm} is a tmap object, facets should be created, where nrow and ncol in \code{\link[=tm_facets]{tm_facets()}} have to be set to 1 in order to create one map per frame.}
\item{filename}{filename. If omitted (default), the animation will be shown in the viewer or browser. If specified, it should be a gif file or a video file (i.e. mp4). The package \code{gifski} is required to create a gif animation. The package \code{av} (which uses the \code{FFmpeg} library) is required for video formats. The mp4 format is recommended but many other video formats are supported, such as wmv, avi, and mkv.}
\item{width, height}{width and height of the animation file (in pixels). Required when \code{tm} is a list, and recommended to specify in advance when \code{tm} is a \code{tmap} object. If not specified in the latter case, it will be determined by the aspect ratio of the map.}
-\item{dpi}{dots per inch. By default 100, but this can be set with the option \code{output.dpi.animation} in \code{\link{tmap_options}}.}
+\item{dpi}{dots per inch. By default 100, but this can be set with the option \code{output.dpi.animation} in \code{\link[=tmap_options]{tmap_options()}}.}
\item{delay}{delay time between images (in 1/100th of a second). See also \code{fps}}
@@ -35,15 +35,15 @@ tmap_animation(
\item{loop}{logical that determined whether the animation is looped, or an integer value that determines how many times the animation is looped.}
-\item{outer.margins}{(passed on to \code{\link{tmap_save}}) overrides the outer.margins argument of \code{\link{tm_layout}} (unless set to \code{NA})}
+\item{outer.margins}{(passed on to \code{\link[=tmap_save]{tmap_save()}}) overrides the outer.margins argument of \code{\link[=tm_layout]{tm_layout()}} (unless set to \code{NA})}
-\item{asp}{(passed on to \code{\link{tmap_save}}) if specified, it overrides the asp argument of \code{\link{tm_layout}}. Tip: set to \code{0} if map frame should be placed on the edges of the image.}
+\item{asp}{(passed on to \code{\link[=tmap_save]{tmap_save()}}) if specified, it overrides the asp argument of \code{\link[=tm_layout]{tm_layout()}}. Tip: set to \code{0} if map frame should be placed on the edges of the image.}
-\item{scale}{(passed on to \code{\link{tmap_save}}) overrides the scale argument of \code{\link{tm_layout}} (unless set to \code{NA})}
+\item{scale}{(passed on to \code{\link[=tmap_save]{tmap_save()}}) overrides the scale argument of \code{\link[=tm_layout]{tm_layout()}} (unless set to \code{NA})}
\item{restart.delay}{not used anymore}
-\item{...}{arguments passed on to \code{\link[av:av_encode_video]{av_encode_video}}}
+\item{...}{arguments passed on to \code{\link[av:encoding]{av::av_encode_video()}}}
}
\description{
Create a gif animation or video from a tmap plot.
diff --git a/man/tmap_arrange.Rd b/man/tmap_arrange.Rd
index ffb7ec934..473ce0b35 100644
--- a/man/tmap_arrange.Rd
+++ b/man/tmap_arrange.Rd
@@ -34,21 +34,21 @@ knit_print.tmap_arrange(x, ..., options = NULL)
\item{sync}{logical. Should the navigation in view mode (zooming and panning) be synchronized? By default \code{FALSE}.}
-\item{asp}{aspect ratio. The aspect ratio of each map. Normally, this is controlled by the \code{asp} argument from \code{\link{tm_layout}} (also a tmap option). This argument will overwrite it, unless set to \code{NULL}. The default value for \code{asp} is 0, which means that the aspect ratio is adjusted to the size of the device divided by the number of columns and rows. When \code{asp} is set to \code{NA}, which is also the default value for \code{\link{tm_layout}}, the aspect ratio will be adjusted to the used shapes.}
+\item{asp}{aspect ratio. The aspect ratio of each map. Normally, this is controlled by the \code{asp} argument from \code{\link[=tm_layout]{tm_layout()}} (also a tmap option). This argument will overwrite it, unless set to \code{NULL}. The default value for \code{asp} is 0, which means that the aspect ratio is adjusted to the size of the device divided by the number of columns and rows. When \code{asp} is set to \code{NA}, which is also the default value for \code{\link[=tm_layout]{tm_layout()}}, the aspect ratio will be adjusted to the used shapes.}
-\item{outer.margins}{outer.margins, numeric vector four or a single value. If defines the outer margins for each multiple. If will overwrite the \code{outer.margins} argument from \code{\link{tm_layout}}, unless set to \code{NULL}.}
+\item{outer.margins}{outer.margins, numeric vector four or a single value. If defines the outer margins for each multiple. If will overwrite the \code{outer.margins} argument from \code{\link[=tm_layout]{tm_layout()}}, unless set to \code{NULL}.}
-\item{x}{a \code{tmap_arrange} object (returned from \code{tmap_arrange})}
+\item{x}{a \code{tmap_arrange} object (returned from \code{tmap_arrange()})}
-\item{options}{options passed on to knitprint}
+\item{options}{options passed on to \code{\link[knitr:knit_print]{knitr::knit_print()}}}
-\item{knit}{should \code{\link[knitr:knit_print]{knit_print}} be enabled, or the normal \code{\link[base:print]{print}} function?}
+\item{knit}{should \code{\link[knitr:knit_print]{knitr::knit_print()}} be enabled, or the normal \code{\link[base:print]{base::print()}} function?}
}
\description{
-Arrange small multiples in a grid layout. Normally, small multiples are created by specifying multiple variables for one aesthetic or by specifying the by argument (see \code{\link{tm_facets}}). This function can be used to arrange custom small multiples in a grid layout.
+Arrange small multiples in a grid layout. Normally, small multiples are created by specifying multiple variables for one aesthetic or by specifying the by argument (see \code{\link[=tm_facets]{tm_facets()}}). This function can be used to arrange custom small multiples in a grid layout.
}
\details{
-The global option \code{tmap.limits} controls the limit of the number of facets that are plotted. By default, \code{tmap_options(tmap.limits=c(facets.view=4, facets.plot=64))}. The maximum number of interactive facets is set to four since otherwise it may become very slow.
+The global option \code{tmap.limits} controls the limit of the number of facets that are plotted. By default, \code{tmap_options(tmap.limits = c(facets.view=4, facets.plot=64))}. The maximum number of interactive facets is set to four since otherwise it may become very slow.
}
\examples{
tm1 = tm_shape(World) + tm_polygons("HPI")
diff --git a/man/tmap_design_mode.Rd b/man/tmap_design_mode.Rd
index 0022ce795..34d9cdea2 100644
--- a/man/tmap_design_mode.Rd
+++ b/man/tmap_design_mode.Rd
@@ -10,8 +10,8 @@ tmap_design_mode(design.mode)
\item{design.mode}{Logical value that determines the design mode. If omitted then the design mode is toggled.}
}
\description{
-When the so-called "design mode" is enabled, inner and outer margins, legend position, and aspect ratio are shown explicitly in plot mode. Also, information about aspect ratios is printed in the console. This function sets the global option `tmap.design.mode`. It can be used as toggle function without arguments.
+When the so-called "design mode" is enabled, inner and outer margins, legend position, and aspect ratio are shown explicitly in plot mode. Also, information about aspect ratios is printed in the console. This function sets the global option \code{tmap.design.mode}. It can be used as toggle function without arguments.
}
\seealso{
-\code{\link{tmap_options}}
+\code{\link[=tmap_options]{tmap_options()}}
}
diff --git a/man/tmap_format.Rd b/man/tmap_format.Rd
index 742b79380..caed6731d 100644
--- a/man/tmap_format.Rd
+++ b/man/tmap_format.Rd
@@ -12,7 +12,7 @@ tmap_format_add(..., name)
\arguments{
\item{format}{Name of the format. Run \code{tmap_format()} to see the choices.}
-\item{...}{Options from \code{\link{tm_layout}} or \code{\link{tm_view}}. Can also be a list of those options.}
+\item{...}{Options from \code{\link[=tm_layout]{tm_layout()}} or \code{\link[=tm_view]{tm_view()}}. Can also be a list of those options.}
\item{name}{Name of the new format.}
}
@@ -20,7 +20,7 @@ tmap_format_add(..., name)
The function \code{tmap_format()} returns the names of the available formats. When \code{format} is defined, it returns the option list corresponding the that format.
}
\description{
-Format options are tmap options that are shape dependent. With \code{tmap_format()} the predefined formats can be retrieved. The values for a specific format can be retrieved with \code{tmap_format(format)}, where format is the name of the format. The function \code{tmap_format_add} is used to add a format.
+Format options are tmap options that are shape dependent. With \code{tmap_format()} the predefined formats can be retrieved. The values for a specific format can be retrieved with \code{tmap_format(format)}, where format is the name of the format. The function \code{tmap_format_add()} is used to add a format.
}
\examples{
# available formats
@@ -41,7 +41,7 @@ data(World)
#qtm(World, fill="HPI", format="World_small")
}
\seealso{
-\code{\link{tm_layout}} for predefined styles, \code{tmap_style_catalogue} (not migrated to v4 yet) to create a style catalogue of all available styles, and \code{\link{tmap_options}} for tmap options.
+\code{\link[=tm_layout]{tm_layout()}} for predefined styles, \code{tmap_style_catalogue} (not migrated to v4 yet) to create a style catalogue of all available styles, and \code{\link[=tmap_options]{tmap_options()}} for tmap options.
-\code{\link{tmap_options}} for tmap options
+\code{\link[=tmap_options]{tmap_options()}} for tmap options
}
diff --git a/man/tmap_icons.Rd b/man/tmap_icons.Rd
index a59651437..140682c0e 100644
--- a/man/tmap_icons.Rd
+++ b/man/tmap_icons.Rd
@@ -30,14 +30,14 @@ marker_icon()
\item{as.local}{if the \code{file} is a url, should it be saved to local temporary file?}
-\item{...}{arguments passed on to \code{\link[leaflet:icons]{icons}}. When \code{iconWidth}, \code{iconHeight}, \code{iconAnchorX} and \code{iconAnchorY} are specified, they override \code{width} and \code{height}, and \code{just}.}
+\item{...}{arguments passed on to \code{\link[leaflet:icons]{leaflet::icons()}}. When \code{iconWidth}, \code{iconHeight}, \code{iconAnchorX} and \code{iconAnchorY} are specified, they override \code{width} and \code{height}, and \code{just}.}
}
\value{
-icon data (see \code{\link[leaflet:icons]{icons}})
+icon data (see \code{\link[leaflet:icons]{leaflet::icons()}})
}
\description{
-Specifies icons from a png images, which can be used as markers in thematic maps. The function \code{marker_icon} is the specification of the default marker.
+Specifies icons from a png images, which can be used as markers in thematic maps. The function \code{marker_icon()} is the specification of the default marker.
}
\seealso{
-\code{\link{tm_symbols}}
+\code{\link[=tm_symbols]{tm_symbols()}}
}
diff --git a/man/tmap_last.Rd b/man/tmap_last.Rd
index 338c26c97..177f0a9cc 100644
--- a/man/tmap_last.Rd
+++ b/man/tmap_last.Rd
@@ -10,8 +10,8 @@ tmap_last()
call
}
\description{
-Retrieve the last map to be modified or created. Works in the same way as \code{ggplot2}'s \code{\link[ggplot2:last_plot]{last_plot}}, although there is a difference: \code{last_map} returns the last call instead of the stacked \code{\link{tmap-element}s}.
+Retrieve the last map to be modified or created. Works in the same way as \code{\link[ggplot2:last_plot]{ggplot2::last_plot()}}, although there is a difference: \code{tmap_last()} returns the last call instead of the stacked \code{\link{tmap-element}}s.
}
\seealso{
-\code{\link{tmap_save}}
+\code{\link[=tmap_save]{tmap_save()}}
}
diff --git a/man/tmap_leaflet.Rd b/man/tmap_leaflet.Rd
index 6ed266409..7088b510a 100644
--- a/man/tmap_leaflet.Rd
+++ b/man/tmap_leaflet.Rd
@@ -10,17 +10,28 @@ tmap_leaflet(x, show = FALSE, ...)
tmap_grid(x, show = FALSE, ...)
}
\arguments{
-\item{x}{description}
+\item{x}{a tmap object.}
\item{show}{show the map?}
-\item{...}{arguments passed on the \code{\link{print.tmap}}}
+\item{...}{
+ Arguments passed on to \code{\link[=print.tmap]{print.tmap}}
+ \describe{
+ \item{\code{return.asp}}{should the aspect ratio be returned?}
+ \item{\code{vp}}{viewport (for \code{"plot"} mode)}
+ }}
}
\value{
-`tmap_grid` returns a \code{\link[grid:grob]{grob}} object (\code{"plot"} mode) and `tmap_leaflet` a \code{\link[leaflet:leaflet]{leaflet}} object (\code{"view"} mode). In case small multiples are shown, a list is returned.
+\itemize{
+\item \code{tmap_grid()} returns a \code{\link[grid:grid.grob]{grob}} object (\code{"plot"} mode)
+\item \code{tmap_leaflet()} a \code{\link[leaflet:leaflet]{leaflet}} object (\code{"view"} mode). In case small multiples are shown, a list is returned.
+}
}
\description{
-Export tmap to the format of the used graphics mode. `tmap_grid` returns a \code{\link[grid:grob]{grob}} object (\code{"plot" mode}) and `tmap_leaflet` a \code{\link[leaflet:leaflet]{leaflet}} object (\code{"view"} mode).
+\itemize{
+\item \code{tmap_grid()} returns a \code{\link[grid:grid.grob]{grob}} object (\verb{"plot" mode})
+\item \code{tmap_leaflet()} a \code{\link[leaflet:leaflet]{leaflet}} object (\code{"view"} mode).
+}
}
\examples{
map = tm_shape(World) + tm_polygons()
diff --git a/man/tmap_mode.Rd b/man/tmap_mode.Rd
index 7115055de..dbedef613 100644
--- a/man/tmap_mode.Rd
+++ b/man/tmap_mode.Rd
@@ -15,22 +15,22 @@ ttmp()
\arguments{
\item{mode}{One of:
\describe{
- \item{\code{"plot"}}{Thematic maps are shown in the graphics device. This is the default mode, and supports all tmap's features, such as small multiples (see \code{\link{tm_facets}}) and extensive layout settings (see \code{\link{tm_layout}}). It is recommended for saving static maps (see \code{\link{tmap_save}}).}
- \item{\code{"view"}}{Thematic maps are viewed interactively in the web browser or RStudio's Viewer pane. Maps are fully interactive with tiles from OpenStreetMap or other map providers (see \code{\link{tm_tiles}}). See also \code{\link{tm_view}} for options related to the \code{"view"} mode. This mode generates a \code{\link[leaflet:leaflet]{leaflet}} widget, which can also be directly obtained with \code{\link{tmap_leaflet}}. With RMarkdown, it is possible to publish it to an HTML page.
- There are a couple of constraints in comparison to \code{"plot"}:
- \itemize{
- \item The map is always projected according to the Web Mercator projection. Although this projection is the de facto standard for interactive web-based mapping, it lacks the equal-area property, which is important for many thematic maps, especially choropleths (see examples from \code{\link{tm_shape}}).
- \item Small multiples are not supported
- \item The legend cannot be made for aesthetics regarding size, which are symbol size and line width.
- \item Text labels are not supported (yet)
- \item The layout options set with \code{\link{tm_layout}}) regarding map format are not used. However, the styling options still apply.}
- }}}
+\item{\code{"plot"}}{Thematic maps are shown in the graphics device. This is the default mode, and supports all tmap's features, such as small multiples (see \code{\link[=tm_facets]{tm_facets()}}) and extensive layout settings (see \code{\link[=tm_layout]{tm_layout()}}). It is recommended for saving static maps (see \code{\link[=tmap_save]{tmap_save()}}).}
+\item{\code{"view"}}{Thematic maps are viewed interactively in the web browser or RStudio's Viewer pane. Maps are fully interactive with tiles from OpenStreetMap or other map providers (see \code{\link[=tm_tiles]{tm_tiles()}}). See also \code{\link[=tm_view]{tm_view()}} for options related to the \code{"view"} mode. This mode generates a \code{\link[leaflet:leaflet]{leaflet::leaflet()}} widget, which can also be directly obtained with \code{\link[=tmap_leaflet]{tmap_leaflet()}}. With R Markdown, it is possible to publish it to an HTML page.
+There are a couple of constraints in comparison to \code{"plot"}:
+\itemize{
+\item The map is always projected according to the Web Mercator projection. Although this projection is the de facto standard for interactive web-based mapping, it lacks the equal-area property, which is important for many thematic maps, especially choropleths (see examples from \code{\link[=tm_shape]{tm_shape()}}).
+\item Small multiples are not supported
+\item The legend cannot be made for aesthetics regarding size, which are symbol size and line width.
+\item Text labels are not supported (yet)
+\item The layout options set with \code{\link[=tm_layout]{tm_layout()}}) regarding map format are not used. However, the styling options still apply.}
+}}}
}
\value{
The mode before changing
}
\description{
-Set tmap mode to static plotting or interactive viewing. The global option \code{tmap.mode} determines the whether thematic maps are plot in the graphics device, or shown as an interactive leaflet map (see also \code{\link{tmap_options}}. The function \code{tmap_mode} is a wrapper to set this global option. The convenient function \code{ttm}, which stands for toggle thematic map, is a toggle switch between the two modes. The function \code{ttmp} stands for toggle thematic map and print last map: it does the same as \code{ttm} followed by \code{tmap_last}; in order words, it shows the last map in the other mode. It is recommended to use \code{tmap_mode} in scripts and \code{ttm}/\code{ttmp} in the console.
+Set tmap mode to static plotting or interactive viewing. The global option \code{tmap.mode} determines the whether thematic maps are plot in the graphics device, or shown as an interactive leaflet map (see also \code{\link[=tmap_options]{tmap_options()}}. The function \code{tmap_mode} is a wrapper to set this global option. The convenient function \code{ttm}, which stands for toggle thematic map, is a toggle switch between the two modes. The function \code{ttmp} stands for toggle thematic map and print last map: it does the same as \code{ttm} followed by \code{\link[=tmap_last]{tmap_last()}}; in order words, it shows the last map in the other mode. It is recommended to use \code{tmap_mode()} in scripts and \code{ttm}/\code{ttmp} in the console.
}
\examples{
tmap_mode()
@@ -51,5 +51,5 @@ tm_shape(World) + tm_polygons("HPI")
Tennekes, M., 2018, {tmap}: Thematic Maps in {R}, Journal of Statistical Software, 84(6), 1-39, \doi{10.18637/jss.v084.i06}
}
\seealso{
-\href{../doc/tmap-getstarted.html}{\code{vignette("tmap-getstarted")}}, \code{\link{tmap_last}} to show the last map, \code{\link{tm_view}} for viewing options, and \code{\link{tmap_leaflet}} for obtaining a leaflet widget, and \code{\link{tmap_options}} for tmap options.
+\code{vignette("tmap_sneek_peek")}, \code{\link[=tmap_last]{tmap_last()}} to show the last map, \code{\link[=tm_view]{tm_view()}} for viewing options, and \code{\link[=tmap_leaflet]{tmap_leaflet()}} for obtaining a leaflet widget, and \code{\link[=tmap_options]{tmap_options()}} for tmap options.
}
diff --git a/man/tmap_options.Rd b/man/tmap_options.Rd
index 012697c10..18c5e1bf3 100644
--- a/man/tmap_options.Rd
+++ b/man/tmap_options.Rd
@@ -28,7 +28,7 @@ tmap_options_save(style)
\item{default.options}{return the default options or the current options?}
-\item{style}{style, see `tmap_style()` for available styles}
+\item{style}{style, see \code{\link[=tmap_style]{tmap_style()}} for available styles}
}
\description{
tmap options
@@ -37,9 +37,9 @@ tmap options
\tabular{ll}{
option \tab description \cr
modes \tab Mode specific options. It is a named list where names correspond to the available modes. Each item is a list of options. \cr
- crs \tab Map crs (see \code{\link{tm_shape}}). \code{NA} means the crs is specified in \code{\link{tm_shape}}. The crs that is used by the transformation functions is defined in \code{\link{tm_shape}}. \cr
+ crs \tab Map crs (see \code{\link[=tm_shape]{tm_shape()}}). \code{NA} means the crs is specified in \code{\link[=tm_shape]{tm_shape()}}. The crs that is used by the transformation functions is defined in \code{\link[=tm_shape]{tm_shape()}}. \cr
facet.max \tab Maximum number of facets \cr
- facet.flip \tab Should facets be flipped (in case of facet wrap)? This can also be set via \code{\link{tm_facets_flip}} \cr
+ facet.flip \tab Should facets be flipped (in case of facet wrap)? This can also be set via \code{\link[=tm_facets_flip]{tm_facets_flip()}} \cr
raster.max.cells \tab Maximum number of raster grid cells \cr
show.messages \tab Show messages? \cr
show.warnings \tab Show warnings? \cr
@@ -52,11 +52,11 @@ tmap options
value.null \tab Default visual values that are used to visualize null (out-of-scope) data values. A list is required with per visual variable a value. \cr
value.blank \tab Default visual values that correspond to blank. For color these are \code{"#00000000"} meaning transparent. A list is required with per visual variable a value. \cr
values.var \tab Default values when a data variable to mapped to a visual variable, e.g. a color palette. A list is required with per visual variable a value. \cr
- values.range \tab Default range for values. See \code{values.range} of \code{\link{tm_scale_categorical}}. A list is required with per visual variable a value. \cr
+ values.range \tab Default range for values. See \code{values.range} of \code{\link[=tm_scale_categorical]{tm_scale_categorical()}}. A list is required with per visual variable a value. \cr
value.neutral \tab Default values for when a data variable to mapped to a visual variable, e.g. a color palette. A list is required with per visual variable a value. \cr
scales.var \tab Default scales. \cr
- label.format \tab Format for the labels (was legend.format in tmap v3) \cr
+ label.format \tab Format for the labels (was \code{legend.format} in tmap v3) \cr
label.na \tab Default label for missing values \cr
- See \code{\link{tm_layout}} for layout specific options \tab \cr
+ See \code{\link[=tm_layout]{tm_layout()}} for layout specific options \tab \cr
}
}
diff --git a/man/tmap_save.Rd b/man/tmap_save.Rd
index 377428ff1..bd08d59da 100644
--- a/man/tmap_save.Rd
+++ b/man/tmap_save.Rd
@@ -27,35 +27,35 @@ tmap_save(
\arguments{
\item{tm}{tmap object}
-\item{filename}{filename including extension, and optionally the path. The extensions pdf, eps, svg, wmf (Windows only), png, jpg, bmp, tiff, and html are supported. If the extension is missing, the file will be saved as a static plot in \code{"plot"} mode and as an interactive map (html) in \code{"view"} mode (see details). The default format for static plots is png, but this can be changed using the option \code{"output.format"} in \code{\link{tmap_options}}. If \code{NA} (the default), the file is saved as "tmap01" in the default format, and the number incremented if the file already exists.}
+\item{filename}{filename including extension, and optionally the path. The extensions pdf, eps, svg, wmf (Windows only), png, jpg, bmp, tiff, and html are supported. If the extension is missing, the file will be saved as a static plot in \code{"plot"} mode and as an interactive map (html) in \code{"view"} mode (see details). The default format for static plots is png, but this can be changed using the option \code{"output.format"} in \code{\link[=tmap_options]{tmap_options()}}. If \code{NA} (the default), the file is saved as "tmap01" in the default format, and the number incremented if the file already exists.}
-\item{device}{graphic device to use. Either a device function (e.g., \code{\link[grDevices:png]{png}} or \code{\link[grDevices:cairo_pdf]{cairo_pdf}}) or a text indicating selected graphic device: "pdf", "eps", "svg", "wmf" (Windows only), "png", "jpg", "bmp", "tiff". If NULL, the graphic device is guessed based on the \code{filename} argument.}
+\item{device}{graphic device to use. Either a device function (e.g., \code{\link[grDevices:png]{png}} or \code{\link[grDevices:cairo]{cairo_pdf}}) or a text indicating selected graphic device: "pdf", "eps", "svg", "wmf" (Windows only), "png", "jpg", "bmp", "tiff". If NULL, the graphic device is guessed based on the \code{filename} argument.}
-\item{height, width}{The width and height of the plot (not applicable for html files). Units are set with the argument \code{units}. If one of them is not specified, this is calculated using the formula asp = width / height, where asp is the estimated aspect ratio of the map. If both are missing, they are set such that width * height is equal to the option \code{"output.size"} in \code{\link{tmap_options}}. This is by default 49, meaning that is the map is a square (so aspect ratio of 1) both width and height are set to 7.}
+\item{height, width}{The width and height of the plot (not applicable for html files). Units are set with the argument \code{units}. If one of them is not specified, this is calculated using the formula asp = width / height, where asp is the estimated aspect ratio of the map. If both are missing, they are set such that \code{width * height} is equal to the option \code{"output.size"} in \code{\link[=tmap_options]{tmap_options()}}. This is by default 49, meaning that is the map is a square (so aspect ratio of 1) both width and height are set to 7.}
\item{units}{units for width and height (\code{"in"}, \code{"cm"}, or \code{"mm"}). By default, pixels (\code{"px"}) are used if either width or height is set to a value greater than 50. Else, the units are inches (\code{"in"})}
-\item{dpi}{dots per inch. Only applicable for raster graphics. By default it is set to 300, but this can be changed using the option \code{"output.dpi"} in \code{\link{tmap_options}}.}
+\item{dpi}{dots per inch. Only applicable for raster graphics. By default it is set to 300, but this can be changed using the option \code{"output.dpi"} in \code{\link[=tmap_options]{tmap_options()}}.}
-\item{outer.margins}{overrides the outer.margins argument of \code{\link{tm_layout}} (unless set to \code{NA})}
+\item{outer.margins}{overrides the outer.margins argument of \code{\link[=tm_layout]{tm_layout()}} (unless set to \code{NA})}
-\item{asp}{if specified, it overrides the asp argument of \code{\link{tm_layout}}. Tip: set to \code{0} if map frame should be placed on the edges of the image.}
+\item{asp}{if specified, it overrides the asp argument of \code{\link[=tm_layout]{tm_layout()}}. Tip: set to \code{0} if map frame should be placed on the edges of the image.}
-\item{scale}{overrides the scale argument of \code{\link{tm_layout}} (unless set to \code{NA})}
+\item{scale}{overrides the scale argument of \code{\link[=tm_layout]{tm_layout()}} (unless set to \code{NA})}
\item{insets_tm}{tmap object of an inset map, or a list of tmap objects of multiple inset maps. The number of tmap objects should be equal to the number of viewports specified with \code{insets_vp}.}
\item{insets_vp}{\code{\link[grid:viewport]{viewport}} of an inset map, or a list of \code{\link[grid:viewport]{viewport}}s of multiple inset maps. The number of viewports should be equal to the number of tmap objects specified with \code{insets_tm}.}
-\item{add.titles}{add titles to leaflet object}
+\item{add.titles}{add titles to leaflet object.}
-\item{in.iframe}{should an interactive map be saved as an iframe? If so, two HTML files will be saved; one small parent HTML file with the iframe container, and one large child HTML file with the actual widget. See \code{\link[widgetframe:saveWidgetframe]{saveWidgetframe}} for details. By default \code{FALSE} which means that one large HTML file is saved (see \code{\link[htmlwidgets:saveWidget]{saveWidget}}).}
+\item{in.iframe}{should an interactive map be saved as an iframe? If so, two HTML files will be saved; one small parent HTML file with the iframe container, and one large child HTML file with the actual widget. See \code{\link[widgetframe:saveWidgetframe]{widgetframe::saveWidgetframe()}} for details. By default \code{FALSE} which means that one large HTML file is saved (see \link[htmlwidgets:saveWidget]{saveWidget()}).}
-\item{selfcontained}{when an interactive map is saved, should the resources (e.g. Javascript libraries) be contained in the HTML file? If \code{FALSE}, they are placed in an adjacent directory (see also \code{\link[htmlwidgets:saveWidget]{saveWidget}}). Note that the HTML file will often still be large when \code{selfcontained = FALSE}, since the map data (polygons and popups), which are also contained in the HTML file, usually take more space then the map resources.}
+\item{selfcontained}{when an interactive map is saved, should the resources (e.g. Javascript libraries) be contained in the HTML file? If \code{FALSE}, they are placed in an adjacent directory (see also \code{\link[htmlwidgets:saveWidget]{htmlwidgets::saveWidget()}}). Note that the HTML file will often still be large when \code{selfcontained = FALSE}, since the map data (polygons and popups), which are also contained in the HTML file, usually take more space then the map resources.}
-\item{verbose}{Deprecated. It is now controlled by the tmap option \code{show.messages} (see \code{\link{tmap_options}})}
+\item{verbose}{Deprecated. It is now controlled by the tmap option \code{show.messages} (see \code{\link[=tmap_options]{tmap_options()}})}
-\item{...}{arguments passed on to device functions or to \code{\link[htmlwidgets:saveWidget]{saveWidget}} or \code{\link[widgetframe:saveWidgetframe]{saveWidgetframe}}}
+\item{...}{arguments passed on to device functions or to \code{\link[htmlwidgets:saveWidget]{saveWidget()}} or \code{\link[widgetframe:saveWidgetframe]{saveWidgetFrame()}}}
}
\description{
Save tmap to a file. This can be either a static plot (e.g. png) or an interactive map (html).
diff --git a/man/tmap_style.Rd b/man/tmap_style.Rd
index 6b5f8e73d..592e8e395 100644
--- a/man/tmap_style.Rd
+++ b/man/tmap_style.Rd
@@ -7,20 +7,20 @@
tmap_style(style)
}
\arguments{
-\item{style}{Name of the style. When omitted, \code{tmap_style} returns the current style and also shows all available styles. When the style is specified, \code{tmap_style} sets the style accordingly. Note that in that case, all tmap options (see \code{\link{tmap_options}}) will be reset according to the style definition. See \code{\link{tm_layout}} for predefined styles, and \code{tmap_style_catalogue} (not migrated to v4 yet) for creating a catalogue.}
+\item{style}{Name of the style. When omitted, \code{tmap_style()} returns the current style and also shows all available styles. When the style is specified, \code{tmap_style()} sets the style accordingly. Note that in that case, all tmap options (see \code{\link[=tmap_options]{tmap_options()}}) will be reset according to the style definition. See \code{\link[=tm_layout]{tm_layout()}} for predefined styles, and \code{tmap_style_catalogue} (not migrated to v4 yet) for creating a catalogue.}
}
\value{
The style before changing
}
\description{
-Set or get the default tmap style. Without arguments, the current style is returned. Also the available styles are displayed. When a style is set, the corresponding tmap options (see \code{\link{tmap_options}}) will be set accordingly. The default style (i.e. when loading the package) is \code{"white"}.
+Set or get the default tmap style. Without arguments, the current style is returned. Also the available styles are displayed. When a style is set, the corresponding tmap options (see \code{\link[=tmap_options]{tmap_options()}}) will be set accordingly. The default style (i.e. when loading the package) is \code{"white"}.
}
\details{
-Note that \code{\link{tm_style}} is used within a plot call (so it only affects that plot), whereas \code{tmap_style} sets the style globally.
+Note that \code{\link[=tm_style]{tm_style()}} is used within a plot call (so it only affects that plot), whereas \code{tmap_style()} sets the style globally.
-After loading a style, the options that defined this style (i.e. the difference with the default \code{"white"} style) can be obtained by \code{\link{tmap_options_diff}}.
+After loading a style, the options that defined this style (i.e. the difference with the default \code{"white"} style) can be obtained by \code{\link[=tmap_options_diff]{tmap_options_diff()}}.
-The documentation of \code{\link{tmap_options}} (details and the examples) shows how a new style is created.
+The documentation of \code{\link[=tmap_options]{tmap_options()}} (details and the examples) shows how a new style is created.
}
\examples{
tmap_style()
@@ -42,5 +42,5 @@ tmap_style("cobalt_v3")
tm_shape(World) + tm_polygons("HPI")
}
\seealso{
-\code{\link{tmap_options}} for tmap options, and \code{tmap_style_catalogue} (not migrated to v4 yet) to create a style catalogue of all available styles.
+\code{\link[=tmap_options]{tmap_options()}} for tmap options, and \code{tmap_style_catalogue} (not migrated to v4 yet) to create a style catalogue of all available styles.
}
diff --git a/vignettes/tmap_sneak_peek.Rmd b/vignettes/tmap_sneak_peek.Rmd
index c9d6b92c0..eb6d14b9c 100644
--- a/vignettes/tmap_sneak_peek.Rmd
+++ b/vignettes/tmap_sneak_peek.Rmd
@@ -524,5 +524,5 @@ All default palettes that we use will be usable for color blind people.
## Suggestions
-Do you have any suggestions? Please let us know! Via https://github.com/mtennekes/tmap/issues, and please use the **tmap_v4** tag.
+Do you have any suggestions? Please let us know! Via https://github.com/r-tmap/tmap/issues, and please use the **tmap_v4** tag.
diff --git a/vignettes/tmap_vv.Rmd b/vignettes/tmap_vv.Rmd
index 281e42aba..de9ff415a 100644
--- a/vignettes/tmap_vv.Rmd
+++ b/vignettes/tmap_vv.Rmd
@@ -31,7 +31,7 @@ data(World, metro, rivers, land)
## Introduction
-**tmap** is an R package for spatial data visualization. This vignette describes the alpha version of the major update (version 4), which will be on CRAN in the course of 2022.
+**tmap** is an R package for spatial data visualization. This vignette describes the alpha version of the major update (version 4), which will be on CRAN in the course of 2023.
#### tmap 4 - tmap 3.x