svydbhexplot: Plotting hexagons.

Description Usage Arguments Author(s) See Also Examples

View source: R/svydbhexbin.R

Description

Ploting the hexagons where the density within each hexagon is proportional to their sampling weights.

Usage

1
svydbhexplot(d, xlab = d$xlab, ylab = d$ylab)

Arguments

d

returning object of svydbhexbin.

xlab, ylab

labels for x and y axis.

Author(s)

Charco Hui

See Also

svydbdesign, svydbhexbin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(nhane)
nh.dbsurv = svydbdesign(st = SDMVSTRA, wt = WTMEC2YR, id = SDMVPSU, data = nhane)
hb = svydbhexbin(Height ~ Weight, design = nh.dbsurv)
svydbhexplot(hb, xlab = "xx", ylab = "yy")
svydbhexplot(hb) + theme_bw() + ggtitle("Hex")
# OR with a database connection
# library(MonetDBLite)
# library(DBI)
# library(dbplyr)
# con = dbConnect(MonetDBLite())
# dbWriteTable(con, "nhane", nhane)
# nhane.db = tbl(con, "nhane")
# nh.dbsurv = svydbdesign(st = SDMVSTRA, wt = WTMEC2YR, id = SDMVPSU, data = nhane.db)

chrk623/svydb documentation built on Oct. 6, 2019, 6:54 a.m.