Skip to content

Commit

Permalink
minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
khusmann committed Mar 6, 2024
1 parent 5672f66 commit 962c802
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions vignettes/other-approaches.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ is.na(df_spss$favorite_color)
```


So you still have to do the usual gymnastics in pipelines:
This makes it easy to check if a value is a missing reason,
but you still have to filter out missing reasons before you do any aggregations:

```{r}
df_spss |>
Expand All @@ -77,11 +78,12 @@ df_spss |>
It's a little bit of an improvement to working with raw coded values, because
you can use `is.na()`, and your codes get labels, so you don't have be
constantly looking up codes in your codebook. But it still falls short of the
interlacer approach for two key reasons.
interlacer approach for two key reasons:

Reason 1: With the interlacer approach
of having separate columns for values and missing reasons, your value column
can be whatever type you want: numeric, character, factor, etc. With labelled,
can be whatever type you want: numeric, character, factor, etc. With labelled
missing reasons,
values and missing reasons need to be the same type, usually numeric codes.
This creates a lot more type gymnastics and potential errors when you're
manipulating them.
Expand Down

0 comments on commit 962c802

Please sign in to comment.