Description Usage Arguments Examples
Creates hexbin summaries.
1 |
formula |
formula |
data |
xdf file |
shape |
shape parameter, passed to
|
xbins |
Number of xbins, passed to
|
... |
Other arguments, passed to
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Load the Airlines Data
library(RevoScaleR)
working.file <- file.path(rxGetOption("sampleDataDir"), "AirlineDemoSmall.xdf")
library(RevoScaleR)
library(hexbin)
bin1 <- rxHexBin(ArrDelay ~ CRSDepTime, working.file, xbins = 50)
plot(bin1, lcex=.5, border = TRUE, colramp = BTC)
plot(bin1, style="colorscale")
plot(bin1, style="centroids")
plot(bin1, style="lattice")
library(ggplot2)
ggbin <- data.frame(
hcell2xy(bin1),
count = bin1@count,
density = bin1@count / sum(bin1@count, na.rm=TRUE)
)
p2 <- ggplot(data = ggbin, aes(x, y, fill = count))
p2 + geom_hex(stat="identity", nbins = 100) +
guides(fill = guide_colorbar(ticks = FALSE, label.theme = element_text(size = 8, angle = 0))) +
labs(x = "CRSDepTime", y = "ArrDelay")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.