updateHexbin: updateHexbin

View source: R/hexbin.R

updateHexbinR Documentation

updateHexbin

Description

Dynamically change the data and/or the colorRange.

Usage

updateHexbin(map, data = NULL, lng = NULL, lat = NULL, colorRange = NULL)

Arguments

map

a map widget object created from leaflet()

data

the data object from which the argument values are derived; by default, it is the data object provided to leaflet() initially, but can be overridden

lng

a numeric vector of longitudes, or a one-sided formula of the form ~x where x is a variable in data; by default (if not explicitly provided), it will be automatically inferred from data by looking for a column named lng, long, or longitude (case-insensitively)

lat

a vector of latitudes or a formula (similar to the lng argument; the names lat and latitude are used when guessing the latitude column from data)

colorRange

The range of the color scale used to fill the hexbins

Value

the new map object

See Also

Other Hexbin-D3 Functions: addHexbin(), clearHexbin(), hexbinOptions(), hideHexbin(), showHexbin()


leaflet.extras2 documentation built on Aug. 21, 2023, 5:08 p.m.