Create the results table of the EQuIS EDD.
format_equis_results.Rd
Create the results table of the EQuIS EDD.
Usage
format_equis_results(
file_paths,
limits = imdccal::detection_limits,
concat = FALSE
)
Arguments
- file_paths
Path to .xlsx file delivered by CCAL.
- limits
Table with detection limits. By default, uses the version in the package. User-defined versions must have the same columns.
- concat
If concat is set to TRUE, the output contains one table rather than one for every input file. By default, concat is set to FALSE, so the output contains separate tables for each file. If only one file path is supplied to the file_paths argument, this parameter does not affect the output.
Value
The data formatted for input into the EQuIS system as the "Results" table. Note that after running this function, the user must still complete some of their own processing to prepare their data for EQuIS. For example, users must define Activity_ID, assign any flags in Result_Qualifier, and modify Result_Status depending on the outcome of their quality control process.
Examples
# Edit limits table to work with example data
limits <- imdccal::detection_limits |>
dplyr::mutate(EndDate = dplyr::if_else(EndDate == "2024-12-31",
lubridate::ymd("2099-12-31"),
EndDate))
# Create results table
results <- format_equis_results(file_paths = use_example_data(file_names = "SPAC_080199.xlsx"),
limits = limits)
#> Reading data from /home/runner/work/_temp/Library/imdccal/extdata/SPAC_080199.x…
#> Warning: ! Questionable results contain duplicate rows:
#> ! See samples: 11: TDN, 13: TDN, and 3: TDN.
#> ℹ This may be caused by lab error, or may be a result of one analyte being
#> compared to more than one other analyte.
#> ℹ See the `questionable` table returned by this function.