## Examine different combinations of environmental variables:
ph = c(8, 8, 8, 7.8)
temp = c(10 , 25, 25, 25)
sal = c(0, 0, 35, 35)
round(ammFrac(ph, temp, sal), 4) # 0.0183 0.0539 0.0556 0.0358
round(ammFrac(ph, temp, sal, 'free'), 4) # 0.0183 0.0539 0.0440 0.0282
Run the code above in your browser using DataLab