Learn R Programming

lingtypology (version 1.1.7)

ggmap.feature: Create a map with ggplot2

Description

Map a set of languages and color them by feature.

Usage

ggmap.feature(
  languages,
  features = "",
  latitude = NA,
  longitude = NA,
  color = NULL,
  title = NULL,
  legend = TRUE,
  width = 2,
  opacity = 1,
  map.orientation = "Atlantic"
)

Arguments

languages

character vector of languages (can be written in lower case).

features

character vector of features.

latitude

numeric vector of latitudes.

longitude

numeric vector of longitudes.

color

vector of colors or palette. The color argument can be (1) a character vector of RGM or named colors; (2) the name of an RColorBrewer palette; (3) the full name of a viridis palette; (4) a function that receives a single value between 0 and 1 and returns a color. For more examples see colorNumeric.

title

title of a legend.

legend

logical. If TRUE, function show legend. By default is TRUE.

width

a numeric vector of radius for circles or width for barcharts in minicharts.

opacity

a numeric vector of marker opacity.

map.orientation

a character verctor with values "Pacific" and "Atlantic". It distinguishes Pacific-centered and Atlantic-centered maps. By default is "Atlantic".

Examples

Run this code
# NOT RUN {
ggmap.feature(c("Adyghe", "Russian"))

# }

Run the code above in your browser using DataLab