worldmap2: worldmap2

View source: R/worldmap2.R

worldmap2R Documentation

worldmap2

Description

worldmap2

Usage

worldmap2(
  country,
  connect = TRUE,
  connections = NULL,
  reduce2country = NULL,
  region = NULL,
  main = "country and country connection frequency",
  ocean = "grey95",
  missingCol = "white",
  legend = TRUE,
  xpd = TRUE,
  mar = c(0, 0, 0, 0),
  mai = c(0, 0, ifelse(legend == TRUE, 0.1, 0), 0),
  palette = "Blues",
  legend1adjust = 0,
  legend2adjust = 0
)

Arguments

country

a list with vectors or a frequency table of country names

connect

logical. If TRUE draws country connections

connections

an optional vector with connections seperated with " - " (e.g.: "Germany - USA")

reduce2country

character. reduces connections to those of one specific country

region

one of: ('eurasia' 'africa' 'latin america' 'north america' 'uk' 'oceania' 'asia')

main

title

ocean

ocean color

missingCol

color of non present countries

legend

logical. If TRUE legends are drawn

xpd

logical. If TRUE ocean color is set to background color

mar

mar adjustment

mai

mai adjustment

palette

colour palette from brewer.pal(). One of 'Blues', 'BuGn', 'BuPu', 'GnBu', 'Greens', 'Greys', 'Oranges', 'OrRd', 'PuBu', 'PuBuGn', 'PuRd', 'Purples', 'RdPu', 'Reds', 'YlGn', 'YlGnBu', 'YlOrBr', 'YlOrRd', 'BrBG', 'PiYG', 'PRGn', 'PuOr', 'RdBu', 'RdGy', 'RdYlBu', 'RdYlGn' 'Spectral'

legend1adjust

adjust y position of upper legend and title

legend2adjust

adjust y position of lower legend

Examples

worldmap2(country=list(c("Germany","Austria","S. Korea"),
c("Germany","Domenican Rep.","S. Korea"),c("Germany","Austria","S. Korea"),
c("Germany","Spain"),c("Germany","Spain"),c("United States","Germany"),
c("Germany","Cuba","Bolivia","South Africa")),reduce2country="USA",
          #connections=list("NA"," - ",c("Germany - USA","Germany - Peru"),"Germany - USA","Germany - Austria","Germany - USA","Germany - USA"),legend=T,xpd=F,
          legend1=-10,legend2=-15)

ingmarboeschen/graphing documentation built on Jan. 14, 2025, 7:32 a.m.