Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

hcell2xy

Compute X and Y Coordinates for Hexagon Cells


Description

Computes x and y coordinates from hexagon cell id's.

Usage

hcell2xy(hbin, check.erosion = TRUE)

Arguments

hbin

a object of class "hexbin", typically produced by hexbin(*).

check.erosion

logical indicating if only the eroded points should be returned in the case where hbin inherits from "erodebin" (see erodebin-class); is TRUE by default.

Details

The hexbin object hbin contains all the needed information. The purpose of this function is to reduce storage. The cost is additional calculation.

Value

A list with two components of the same length as bin$cell,

x
y

See Also

Examples

x <- rnorm(10000)
y <- rnorm(10000)
plot(x,y, pch=".")
hbin <- hexbin(x,y)
str(xys <- hcell2xy(hbin))
points(xys, cex=1.5, col=2) ; title("hcell2xy( hexbin(..) )", col.main=2)

hexbin

Hexagonal Binning Routines

v1.28.2
GPL-2
Authors
Dan Carr <dcarr@voxel.galaxy.gmu.edu>, ported by Nicholas Lewin-Koh and Martin Maechler <maechler@stat.math.ethz.ch>, contains copies of lattice functions written by Deepayan Sarkar <deepayan.sarkar@r-project.org>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.