phrRunString | R Documentation |
Runs phreeqc using the given string as input. Returns the number of errors encountered during the run.
phrRunString(input)
input |
character vector containing phreeqc input |
The RunString
method cannot be called until a database has
been successfully loaded by one of the following the LoadDatabase
methods phrLoadDatabase
, phrLoadDatabaseString
.
This function returns NULL on success.
https://water.usgs.gov/water-resources/software/PHREEQC/IPhreeqc.pdf
Other Run:
phrRunAccumulated()
,
phrRunFile()
#
# 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=""))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.