
Apply define_water
within a dataframe and output a column of water
class to be chained to other tidywater functions
Source: R/define_water.R
define_water_df.Rd
This function allows define_water to be added to a piped data frame.
Its output is a water
class, and can therefore be chained with "downstream" tidywater functions.
Arguments
- df
a data frame containing columns with all the desired parameters with column names matching argument names in define_water
- output_water
name of the output column storing updated parameters with the class, water. Default is "defined".
- pluck_cols
Extract primary water slots (ph, alk, doc, uv254) into new numeric columns for easy access. Default to FALSE.
- water_prefix
Append the output_water name to the start of the plucked columns. Default is TRUE.
Examples
# \donttest{
example_df <- water_df %>%
define_water_df() %>%
balance_ions_df()
example_df <- water_df %>%
define_water_df(output_water = "This is a column of water") %>%
balance_ions_df(input_water = "This is a column of water")
# }