Skip to content

Commit

Permalink
Apply suggestions from code review from Andree
Browse files Browse the repository at this point in the history
Co-authored-by: Andree Valle Campos <[email protected]>
  • Loading branch information
Degoot-AM and avallecam authored Aug 1, 2024
1 parent 81ef966 commit 69f3737
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions episodes/clean-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,10 @@ data <- linelist::make_linelist(
)
utils::head(data, 7)
```
The resulting linelist object resembles a dataframe but offers richer features
The resulting `linelist` object resembles a data frame but offers richer features
and functionalities. Packages that are linelist-aware can leverage these
features. For example, you can extract a dataframe of only the tagged columns
using the tags_df() function, as shown below:
using the `linelist::tags_df()` function, as shown below:
```{r, warning=FALSE}
head(linelist::tags_df(data), 5)
```
Expand All @@ -326,17 +326,18 @@ Safeguarding is implicitly built into the linelist objects. If you try to delete
columns, you will receive an error or warning message, as shown in the example below.

```{r, warning=TRUE}
new_df <- data |> dplyr::select(linelist::has_tag(c("id", "age")))
new_df <- data |>
dplyr::select(linelist::has_tag(c("id", "age")))
```

The {linelist} package supplies tags for the commen epidemiological variables
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:
```{r, warning=FALSE}
linelist::tags_types()
```
To ensure that all tagged variables are standardized and have the correct data
types, use the validate_tags() and validate_types() functions, respectively, as
types, use the `linelist::validate_tags()` and `linelist::validate_types()` functions, respectively, as
shown in the example below:

```r
Expand Down

0 comments on commit 69f3737

Please sign in to comment.