phr_write_pqi: Write phr_input_sections to file

Description Usage Arguments Details Value Examples

View source: R/phreeqc_write_pqi.R

Description

Write a phr_input() generated in tidyphreeqc to .pqi files readily interpretable by the widely used PHREEQC-Interactive GUI provided by the USGS to share your models with colleagues.

Usage

1
phr_write_pqi(x, path)

Arguments

x

An object of class "phr_input". See phr_input() for details

path

Path to file.

Details

The path supplied to the function might typically look something like this: "~/path/to/my_program.pqi" but note that the ".pqi" ending is strictly optional and any (or no) file-ending is accepted. However, in order to be automatically recognised by the PHREEQC-Interactive GUI as a PHREEQC-input file, the ".pqi" ending is necessary.

Value

x, invisibly

Examples

1
2
3
4
5
6
7
# create some phr_input_sections
sol <- phr_solution(pH = 8, pe = 2, Na = 1, Cl = 1, units = "mol/l")
phase <- phr_equilibrium_phases(Halite = c(10, 1))

fil <- tempfile("data")
phr_write_pqi(phr_input(sol, phase), path = fil)
unlink(fil) # tidy up

paleolimbot/tidyphreeqc documentation built on Aug. 29, 2019, 11:14 p.m.