Skip to content

Commit

Permalink
Added challenge for lost tags action.
Browse files Browse the repository at this point in the history
  • Loading branch information
Degoot-AM committed Aug 1, 2024
1 parent 69f3737 commit 5aedf4b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions episodes/clean-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,20 @@ new_df <- data |>
dplyr::select(linelist::has_tag(c("id", "age")))
```

The default options for lost tags in a linelist object is warning. However, it can be change to error message using `lost_tags_action()`.

::::::::::::::::::::::::::::::::::::: challenge

- Set the action for lost tags in a linelist to error as follows:

```{r, eval=FALSE}
linelist::lost_tags_action(action = "error")
```
and re-run the above code segment.
- What do you learn for resulting complementary message?

::::::::::::::::::::::::::::::::::::::::::::::::

The `{linelist}` package supplies tags for the common epidemiological variables
and specify them the appropriate data types. You can view this by running the
following command:
Expand Down

0 comments on commit 5aedf4b

Please sign in to comment.