From db9ba4604d4ee30ab4219c8893ce649187a742ca Mon Sep 17 00:00:00 2001 From: Isabella Velasquez Date: Thu, 22 Aug 2024 16:23:09 -0500 Subject: [PATCH] Small edit --- 05-descriptive-analysis.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/05-descriptive-analysis.Rmd b/05-descriptive-analysis.Rmd index 8e24d11..4f7e613 100644 --- a/05-descriptive-analysis.Rmd +++ b/05-descriptive-analysis.Rmd @@ -449,7 +449,7 @@ recs_des %>% mutate(p = p * 100) ``` -`r .preg %>% filter(Region=="Northeast") %>% pull(p) %>% signif(3)`% of the households are in the Northeast, `r .preg %>% filter(Region=="Midwest") %>% pull(p) %>% signif(3)`% in the Midwest, and so on. Note that the proportions in column `p` add up to one. +`r .preg %>% filter(Region=="Northeast") %>% pull(p) %>% signif(3)`% of the households are in the Northeast, `r .preg %>% filter(Region=="Midwest") %>% pull(p) %>% signif(3)`% are in the Midwest, and so on. Note that the proportions in column `p` add up to one. \index{Categorical data|(} The `survey_prop()` function is essentially the same as using `survey_mean()` with a categorical variable and without specifying a numeric variable in the `x` argument. The following code gives us the same results as above: