Learn R Programming

evolMap (version 1.3.8)

add_entities: Add entities.

Description

Add entities to the interactive map.

Usage

add_entities(map, entities, attributes = NULL, name = NULL,
  label = NULL, color = NULL, text = NULL,
  info = NULL, infoFrame = c("right","left"), rightFrameWidth = NULL,
  start = NULL, end = NULL, period = NULL, opacity = 0.2)

Value

Object of class evolMap.

Arguments

map

an object of class evolMap.

entities

a spatial object of geometries.

attributes

a data frame with information to show for each geometry. Its columns names can be passed as parameters to the arguments.

name

name of the column with names in the entities or attributes data frame.

label

name of the column with labels in the entities or attributes data frame.

color

name of the column with color variable in the entities or attributes data frame.

text

name of the column in the entities or attributes data frame with texts in the entities or attributes data frame. This information will be shown as a popup.

info

name of the column with information to display in a panel in the data matrix.

infoFrame

Panel (right or left) where the information is to be displayed. The left panel is only available if a description is provided with add_description.

rightFrameWidth

a percentage indicating the width for the right information panel.

start

name of the column with the start time of a period in the entities or attributes data frame.

end

name of the column with the end time of a period in the entities or attributes data frame.

period

name of the column with the period name in the entities or attributes data frame.

opacity

Entity opacity expressed as a numeric vector between 0 and 1. Default: 0.2.

Author

Modesto Escobar modesto@usal.es, Department of Sociology and Communication, University of Salamanca, Carlos Prieto cprietos@usal.es, and David Barrios metal@usal.es, Bioinformatics Service, University of Salamanca.

Examples

Run this code
data(World)
map <- create_map()
map <- add_entities(map, World, color="pop")
# \donttest{
# plot map
plot(map)
# }

Run the code above in your browser using DataLab