Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

phrRunString

Runs phreeqc using the given string as input.


Description

Runs phreeqc using the given string as input. Returns the number of errors encountered during the run.

Usage

phrRunString(input)

Arguments

input

character vector containing phreeqc input

Details

The RunString method cannot be called until a database has been successfully loaded by one of the following the LoadDatabase methods phrLoadDatabase, phrLoadDatabaseString.

Value

This function returns NULL on success.

References

See Also

Examples

#
# This example accumulates phreeqc input into a character vector
# and runs it.
#

# load phreeqc.dat file
phrLoadDatabaseString(phreeqc.dat)

# create input
input <- vector()
input <- c(input, "SOLUTION 1") 
input <- c(input, "  temp 25.0") 
input <- c(input, "  pH    7.0")

# turn on output
phrSetOutputFileOn(TRUE)
phrSetOutputFileName(file.path(tempdir(), "pure_water.out"))

# run input
phrRunString(input)
cat(paste("see ", phrGetOutputFileName(), ".\n", sep=""))

phreeqc

R Interface to Geochemical Modeling Software

v3.6.3
GPL-3
Authors
S.R. Charlton, D.L. Parkhurst, and C.A.J. Appelo, with contributions from D. Gillespie for Chipmunk BASIC and S.D. Cohen, A.C. Hindmarsh, R. Serban, D. Shumaker, and A.G. Taylor for CVODE/SUNDIALS
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.