worldmap2 | R Documentation |
worldmap2
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
)
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 |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.