Hi I am trying to create a new column called "pCO2" in my data set called "Erie". My dataset currently has ph, alk, and temp values. there is a package called AquaEnv that lets you predict the CO2 value if you have the pH and alkalinity value.
This is the equation to find the values I want in the "pCO2 column"
ae<-aquaenv(S=0,t=0,p=0, SumCO2 = NULL, pH= 7.7,TA=90 )
ae$SumCO2
Is there a way to do this while referencing the corresponding pH and alkalinity values in my Erie dataset?
this was my idea, but it does not give the correct values.
Erie$pCO2<-aquaenv(S=0,t=0,p=0, SumCO2 = NULL, pH=Erie$pH,TA=
Erie$ALKALINITY..mg.L.)
Thanks!