makeHexs: Generate hexs

Description Usage Arguments Value

Description

Writes lat/lon color information to file specified by file parameter in a format ready to use in GMT (but probably easy to parse by other programs too) Makes test map of hex positions and data in testhex.eps Makes GMT color table scale.cpt for later use Calls makeTicks() which will output tick position for scalebar for later use

Usage

1
2
3
4
makeHexs(lat, lon, lonBase = -45, hexPerDegree = 1, border = 5,
  file = "hexs.dat", hardLimit = NULL, hexMax = NULL, logCounts = FALSE,
  debug = FALSE, scale = 1, proportion = FALSE, showMax = FALSE,
  weights = rep(1, length(lat)), uniqueCounter = NULL, addPlus = TRUE)

Arguments

lat

A vector of latitudes of length N

lon

A vector of longitudes of length N

lonBase

Longitude for centering calculations

hexPerDegree

How many hexs should fit horizontally in 1 degree of longitude at the equator

border

How many degrees of space to leave around the hexs (if hardLimit is NULL)

file

File to lat/lon of hex positions to

hardLimit

A vector of (southernMostLatitude,northernMostLatitude,westernMostLongitude,easternMostLongitude) (or NULL) to filter hexs

hexMax

Sets hexs with counts > hexMax to hexMax (for creating maps with the highest hex counts being something like "100+")

logCounts

If true base color scale on logged hex counts

debug

If true, browser() before returning

scale

Divide day totals by this number (useful for intervals less than 1 day)

proportion

Divide counts by sum(counts)

showMax

show maximum on scale ticks?

weights

Weight for each point

uniqueCounter

If not NULL, count unique occurrences of uniqueCounter in a hex

addPlus

Add a "plus" to maximum label in scale if using hexMax

Value

Vector for use in further functions of (lowXLim,highXlim,lowYLim,highYLim,maxHexCount)


sherrillmix/GMTHexMapR documentation built on May 29, 2019, 9:23 p.m.