Learn R Programming

tidywater (version 0.7.0)

blend_waters: Determine blended water quality from multiple waters based on mass balance and acid/base equilibrium

Description

This function takes a vector of waters defined by define_water and a vector of ratios and outputs a new water object with updated ions and pH.

Usage

blend_waters(waters, ratios)

Value

A water class object with blended water quality parameters.

Arguments

waters

Vector of source waters created by define_water

ratios

Vector of ratios in the same order as waters. (Blend ratios must sum to 1)

See Also

define_water

Examples

Run this code
water1 <- define_water(7, 20, 50)
water2 <- define_water(7.5, 20, 100, tot_nh3 = 2)
blend_waters(c(water1, water2), c(.4, .6))

Run the code above in your browser using DataLab