Read water quality exchange (wqx) metadata input from an external file
Source:R/readMWRwqx.R
readMWRwqx.Rd
Read water quality exchange (wqx) metadata input from an external file
Arguments
- wqxpth
character string of path to the wqx metadata file
- runchk
logical to run data checks with
checkMWRwqx
- warn
logical to return warnings to the console (default)
Details
Date are imported with read_excel
, checked with checkMWRwqx
.
Examples
wqxpth <- system.file('extdata/ExampleWQX.xlsx', package = 'MassWateR')
wqxdat <- readMWRwqx(wqxpth)
#> Running checks on WQX metadata...
#> Checking column names... OK
#> Checking all required columns are present... OK
#> Checking unique parameters... OK
#> Checking Parameter formats... OK
#>
#> All checks passed!
head(wqxdat)
#> # A tibble: 6 × 6
#> Parameter Sampling Method Cont…¹ `Method Speciation` Result Sample Fracti…²
#> <chr> <chr> <chr> <chr>
#> 1 Water Temp NA NA NA
#> 2 pH NA NA NA
#> 3 DO NA NA NA
#> 4 Sp Conducta… NA NA NA
#> 5 TP MassWateR as P Unfiltered
#> 6 Nitrate MassWateR as N Unfiltered
#> # ℹ abbreviated names: ¹`Sampling Method Context`, ²`Result Sample Fraction`
#> # ℹ 2 more variables: `Analytical Method` <chr>,
#> # `Analytical Method Context` <chr>