Aan de slagGa gratis aan de slag

Graphing a categorical variable

It is a bit hard to compare the frequencies in tab_w since each frequency is a very large number. Let's add proportions to the table and produce a bar graph to better understand the distribution of depression.

Deze oefening maakt deel uit van de cursus

Analyzing Survey Data in R

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Add proportions to table
tab_w <- tab_w %>%
  as.data.frame() %>%
  ___(Prop = Freq/___)
Code bewerken en uitvoeren