parent
8c596307f3
commit
03808b44bb
14
factors.qmd
14
factors.qmd
|
@ -258,14 +258,12 @@ This makes the plot easier to read because the colors of the line at the far rig
|
|||
#| There is one line for each category of marital status: no answer,
|
||||
#| never married, separated, divorced, widowed, and married. It is
|
||||
#| a little hard to read the plot because the order of the legend is
|
||||
#| unrelated to the lines on the plot.
|
||||
#|
|
||||
#| Rearranging the legend makes the plot easier to read because the
|
||||
#| legend colors now match the order of the lines on the far right
|
||||
#| of the plot. You can see some unsurprising patterns: the proportion
|
||||
#| never married decreases with age, married forms an upside down U
|
||||
#| shape, and widowed starts off low but increases steeply after age
|
||||
#| 60.
|
||||
#| unrelated to the lines on the plot. Rearranging the legend makes
|
||||
#| the plot easier to read because the legend colors now match the
|
||||
#| order of the lines on the far right of the plot. You can see some
|
||||
#| unsurprising patterns: the proportion never married decreases with
|
||||
#| age, married forms an upside down U shape, and widowed starts off
|
||||
#| low but increases steeply after age 60.
|
||||
by_age <- gss_cat |>
|
||||
filter(!is.na(age)) |>
|
||||
count(age, marital) |>
|
||||
|
|
Loading…
Reference in New Issue