Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up language a bit and add information on what's required #379

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions vignettes/Join_closest.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,26 @@ The inputs are:

```{r defFunc}

join_qw_uv <- function(qw_data, uv_flow_qw,
hour_threshold,
join_by_qw, join_by_uv,
qw_val_uv, qw_rmk_uv,
flow_val, flow_rmk){
join_qw_uv <- function(qw_data, # data frame from readWQP
uv_flow_qw, # data frame from readNWISuv
hour_threshold, # hours threshold for joining
join_by_qw, # column to join by from qw_data
join_by_uv, # column to join by from uv_flow_qw
qw_val_uv, # value column name from uv_flow_qw for water quality parameter
qw_rmk_uv, # column name of remark column from uv_flow_qw
flow_val, # value column name from uv_flow_qw for flow parameter
flow_rmk){ # column name of remark column from uv_flow_qw for flow parameter

req_cols <- c("ResultDetectionConditionText",
"ResultMeasureValue",
"DetectionQuantitationLimitMeasure.MeasureValue")

if(!all(req_cols %in% names(qw_data))){
stop('qw_data requires columns:
"ResultDetectionConditionText",
"ResultMeasureValue",
"DetectionQuantitationLimitMeasure.MeasureValue"')
}

qw_less <- qw_data |>
filter(!is.na({{ join_by_qw }})) |>
Expand Down
Loading