gergness / srvyr

R package to add 'dplyr'-like Syntax for Summary Statistics of Survey Data
214 stars 28 forks source link

Documented how to get `na.rm = TRUE` behavior for proportions #161

Closed bschneidr closed 1 year ago

bschneidr commented 1 year ago

A recurring point of confusion for users is how to drop missing values of a variable they want to calculate proportions for. Right now, it seems like many users think they're supposed to be able to do this by specifying na.rm = TRUE (#106, #146, #149, #158).

This PR updates the help page for survey_mean() and survey_prop() to clearly document how missing values are handled by na.rm = TRUE and to recommend what users should do specifically for proportions.

gergness commented 1 year ago

Thanks!