phrRunString: Runs phreeqc using the given string as input.

Description Usage Arguments Details Value References See Also Examples

View source: R/phreeqc.R

Description

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

Usage

1
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

ftp://brrftp.cr.usgs.gov/pub/charlton/iphreeqc/IPhreeqc.pdf

See Also

Other Run: phrRunAccumulated, phrRunFile

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#
# 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 documentation built on July 1, 2020, 11:46 p.m.