Returns compressed recognised water quality EMS codes. If variables = NULL the function returns all recognised codes. Otherwise it first substitutes the provided variables for recognised variables using substitute_variables and then looks up the matching codes from codes.

lookup_codes(
  variables = NULL,
  messages = getOption("wqbc.messages", default = TRUE)
)

Arguments

variables

An optional character vector of variables to lookup codes.

messages

A flag indicating whether to print messages.

Examples

lookup_codes()
#>   [1] "C024" "T029" "T030" "B022" "C022" "P020" "T065" "TCB5" "T066" "B026"
#>  [11] "B025" "IPBC" "PA01" "A003" "0102" "D102" "AK-T" "AL-D" "AL-T" "1108"
#>  [21] "0108" "SB-T" "AS-D" "AS-T" "A016" "BA-D" "BA-T" "B020" "PA05" "BE-T"
#>  [31] "0115" "B--D" "B--T" "B014" "B009" "CD-D" "CD-T" "CA-D" "C005" "C040"
#>  [41] "CLO3" "1104" "0104" "1016" "CLO-" "D073" "T033" "T036" "P022" "T037"
#>  [51] "T034" "T038" "T035" "D050" "T043" "T042" "D075" "D076" "CP07" "T044"
#>  [61] "D077" "D060" "T021" "T020" "0143" "C016" "C017" "CR-D" "CR-6" "CR-T"
#>  [71] "CR-3" "PA09" "CO-D" "CO-T" "0450" "0001" "0002" "0011" "SC-F" "CU-D"
#>  [81] "CU-T" "CYNZ" "1105" "CN-T" "0157" "D052" "D079" "P014" "DISN" "P012"
#>  [91] "D032" "B002" "M041" "D041" "D009" "DDAC" "D001" "D031" "1126" "0007"
#> [101] "0148" "0147" "ST13" "B021" "E020" "0019" "PA12" "1106" "0106" "1107"
#> [111] "0107" "H003" "HCBD" "L002" "FE-D" "FE-T" "PB-D" "PB-T" "M032" "LI-T"
#> [121] "M001" "MN-D" "MN-T" "HG-D" "HGME" "HG-T" "MTBE" "M010" "M005" "M006"
#> [131] "MO-D" "MO-T" "C010" "NAPH" "PA14" "NI-D" "NI-T" "0109" "1109" "NO3-"
#> [141] "0110" "0111" "1114" "0114" "0103" "0014" "DO-F" "PCLB" "0004" "PA15"
#> [151] "P--D" "1118" "P--T" "PICL" "P019" "PAH-" "PSEU" "PA19" "0130" "SE-D"
#> [161] "SE-T" "AG-D" "AG-T" "S001" "SR-T" "S010" "1121" "0121" "0013" "TEMF"
#> [171] "C034" "TL-D" "TL-T" "TRSN" "T001" "T082" "B013" "C032" "T015" "0015"
#> [181] "TURF" "U--D" "U--T" "V--T" "C004" "X001" "ZN-D" "ZN-T"
lookup_codes(c("Aluminum", "Arsenic Total", "Boron Something", "Kryptonite"),
  messages = TRUE
)
#> Failed to substitute 'Aluminum', 'Boron Something' and 'Kryptonite'.
#> Replaced 'Arsenic Total' with 'AS-T'.
#> [1] NA     "AS-T" NA     NA