Skip to content

Commit

Permalink
Add method detection limit
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveViss committed Sep 6, 2024
1 parent 5ce0bbf commit b8e297d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vignettes/articles/import-MET-THg-23-19.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@ dplyr::select(field_sample, id_lab_sample, id_field_sample) |>
## Lab measurements

```{R}
dplyr::select(measurements, id_lab_sample, id_analyte, value, is_censored = 0, percent_moisture = pmoisture) |>
# Set method detection limit
MDL <- 0.0001
dplyr::select(measurements, id_lab_sample, id_analyte, value, percent_moisture = pmoisture) |>
dplyr::mutate(is_censored = ifelse(value > MDL, 0, 1)) |>
dplyr::mutate(id_report = report$id_report) |>
(\(data) DBI::dbWriteTable(con, "lab_measurement", data, append = TRUE))()
```

0 comments on commit b8e297d

Please sign in to comment.