Visualize a summary of NHANES data
nhanes_design_viz.Rd
Analyze the prevalence, mean, or quantiles of an outcome over time.
Usage
nhanes_design_viz(
x,
statistic_primary = NULL,
title = NULL,
geom = "bar",
reorder_cats = FALSE,
width = NULL,
height = 600,
size_point = NULL,
size_error = NULL
)
Arguments
- x
[nhanes_design]
an NHANES design object. See nhanes_design for more details.
- statistic_primary
[character(1)]
the statistic that defines the geometric objects in the plot. Other statistics will be featured in the text that appears when the users mouse hovers over the corresponding object.
- title
[character(1)]
The title that will appear above the plot. If this is not supplied, the title will be generated using the
key
data inx
.- geom
[character(1)]
The type of figure that will be made. Valid options are:
'bar'
creates a bar plot with annotations on the bars'point'
creates a scatter plot with 95% confidence interval error bars
- reorder_cats
[logical(1)]
whether to re-order the categorical group variable so that its levels are shown in increasing order by the expected outcome.
- width
[numeric(1)]
the width of the plot, in pixels
- height
[numeric(1)]
the height of the plot, in pixels
- size_point
[numeric(1)]
the size of points in the plot. (only relevant if
'geom' = 'point'
)- size_error
[numeric(1)]
the size of error bars in the plot. (only relevant if
'geom' = 'point'
)