I would like to calculate enthalpy by using steam table function . I want to adapt the function to a Tibble table which include temp and pressure, but failed. For example, I want to add the enthalpy row.
sample_table
temp pressure
800 16
900 17
1000 18
sample_table_add_enthalpy <- sample_table %>%
mutate(enthalpy = hTp(temp, pressure))
The result is
temp pressure enthalpy
800 16 3375.08509
900 17 3375.08509
1000 18 3375.08509
In this case, the calculation is only adapted to the first column. How should I do to calculate for all column by using mutate?