argo_use_adjusted: Prefer adjusted values

Description Usage Arguments Value Examples

View source: R/argo-adjusted.R

Description

Many Argo tables have _adjusted columns that contain a more reliable value. However, in many cases, these values are blank or not present. Use argo_use_adjusted() to replace NA values in cols with the value in the paired _adjusted column. You can use this with argo_qc_censor_if_not() to set values in cols to NA based on the paired _qc column prior to preferring the adjusted value.

Usage

1
2
3
4
5
6
7
argo_use_adjusted(
  tbl,
  cols,
  adjusted_cols = argo_adjusted_cols(tbl, {     {         cols     } })
)

argo_adjusted_cols(tbl, cols)

Arguments

tbl

tbl A data frame containing _adjusted or _ADJUSTED columns.

cols

Columns in tbl, specified using dplyr::select() syntax.

adjusted_cols

A paired vector of columns to cols containing the adjusted value to prefer over the value in cols.

Value

A tibble::tibble() with

Examples

1
2
3
4
5
6
library(dplyr, warn.conflicts = FALSE)

with_argo_example_cache({
  argo_prof_levels("dac/csio/2902746/profiles/BR2902746_001.nc") %>%
    argo_use_adjusted(doxy)
})

ArgoCanada/argodata documentation built on Dec. 13, 2021, 10:13 a.m.