svydbhexbin: Hexagon Binning

Description Usage Arguments Author(s) See Also Examples

View source: R/svydbhexbin.R

Description

Computes the co-ordinates and the necessary information to plot the hexagons.

Usage

1
svydbhexbin(formula, design, xbins = 30, shape = 1)

Arguments

formula

A formula indicating x and y. i.e. y~x.

design

svydb.design object.

xbins

Number of bins on range of the x-axis.

shape

plotting region, shape = height of y/width of x.

Author(s)

Charco Hui

See Also

svydbdesign, svydbhexplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(nhane)
nh.dbsurv = svydbdesign(st = SDMVSTRA, wt = WTMEC2YR, id = SDMVPSU, data = nhane)
hb = svydbhexbin(Height ~ Weight, design = nh.dbsurv)
svydbhexplot(hb)
# 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.