powered by
In ggsurvey you specify both the plotting variables and weights in plain text with no quotes.
gghistweight3d(df, x, y, z, weights, binwidth = NULL)
data frame
first variable of interest
first categorical variable for faceting
second categorical variable for faceting
survey weights that sum to sample size
desired binwidth, if NULL bins in geom_histogram defaults to 30
ggplot object
# NOT RUN { library(survey) data(api) gghistweight3d(apistrat, api00, stype, awards, pw) gghistweight3d(apistrat, api00, stype, awards, pw, binwidth = 10) # }
Run the code above in your browser using DataLab