[R] Hexbin: Counting Bins That Meet Certain Criteria
David L Carlson
dcarlson at tamu.edu
Tue Dec 15 18:18:27 CET 2015
Something like
> library(hexbin)
> set.seed(42)
> xy <- matrix(rnorm(1000), 500)
> xy.hex <- hexbin(xy)
> table(xy.hex at count)
1 2 3 4 5 6 7 8
159 60 33 16 6 1 2 1
> sum(xy.hex at count >= 3)
[1] 59
-------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352
-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Sidoti, Salvatore A.
Sent: Monday, December 14, 2015 6:49 PM
To: r-help at r-project.org
Subject: [R] Hexbin: Counting Bins That Meet Certain Criteria
Greetings!
Is there a way to count the bins in a hexbin plot that meet certain criteria? For instance, what if I wanted to count the bins (hexes) that have a datapoint density of some number x?
Thank you!
______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list