working on roxygen

git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@8593 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
Scott R Charlton 2014-03-25 04:19:31 +00:00
parent 0a7d7f5e3a
commit 8b9384f2ca
2 changed files with 215 additions and 149 deletions

221
R/R.cpp
View File

@ -290,53 +290,13 @@ setSelectedOutputFileName(SEXP filename)
}
SEXP
getDumpString(void)
getDumpStrings(void)
{
SEXP ans = R_NilValue;
PROTECT(ans = allocVector(STRSXP, 1));
SET_STRING_ELT(ans, 0, mkChar(R::singleton().GetDumpString()));
UNPROTECT(1);
return ans;
}
SEXP
getLogString(void)
{
SEXP ans = R_NilValue;
PROTECT(ans = allocVector(STRSXP, 1));
SET_STRING_ELT(ans, 0, mkChar(R::singleton().GetLogString()));
UNPROTECT(1);
return ans;
}
SEXP
getOutputString(void)
{
SEXP ans = R_NilValue;
PROTECT(ans = allocVector(STRSXP, 1));
SET_STRING_ELT(ans, 0, mkChar(R::singleton().GetOutputString()));
UNPROTECT(1);
return ans;
}
SEXP
getSelectedOutputString(void)
{
SEXP ans = R_NilValue;
PROTECT(ans = allocVector(STRSXP, 1));
SET_STRING_ELT(ans, 0, mkChar(R::singleton().GetSelectedOutputString()));
UNPROTECT(1);
return ans;
}
SEXP
getWarningString(void)
{
SEXP ans = R_NilValue;
const char* warning = R::singleton().GetWarningString();
if (::strlen(warning)) {
std::string warn(warning);
std::istringstream iss(warn);
const char* cstr = R::singleton().GetDumpString();
if (cstr && cstr[0]) {
std::string str(cstr);
std::istringstream iss(str);
std::string line;
std::vector< std::string > lines;
while (std::getline(iss, line))
@ -344,7 +304,103 @@ getWarningString(void)
lines.push_back(line);
}
PROTECT(ans = allocVector(STRSXP, lines.size()));
for (int i = 0; i < lines.size(); ++i)
for (size_t i = 0; i < lines.size(); ++i)
{
SET_STRING_ELT(ans, i, mkChar(lines[i].c_str()));
}
UNPROTECT(1);
}
return ans;
}
SEXP
getLogStrings(void)
{
SEXP ans = R_NilValue;
const char* cstr = R::singleton().GetLogString();
if (cstr && cstr[0]) {
std::string str(cstr);
std::istringstream iss(str);
std::string line;
std::vector< std::string > lines;
while (std::getline(iss, line))
{
lines.push_back(line);
}
PROTECT(ans = allocVector(STRSXP, lines.size()));
for (size_t i = 0; i < lines.size(); ++i)
{
SET_STRING_ELT(ans, i, mkChar(lines[i].c_str()));
}
UNPROTECT(1);
}
return ans;
}
SEXP
getOutputStrings(void)
{
SEXP ans = R_NilValue;
const char* cstr = R::singleton().GetOutputString();
if (cstr && cstr[0]) {
std::string str(cstr);
std::istringstream iss(str);
std::string line;
std::vector< std::string > lines;
while (std::getline(iss, line))
{
lines.push_back(line);
}
PROTECT(ans = allocVector(STRSXP, lines.size()));
for (size_t i = 0; i < lines.size(); ++i)
{
SET_STRING_ELT(ans, i, mkChar(lines[i].c_str()));
}
UNPROTECT(1);
}
return ans;
}
SEXP
getSelectedOutputStrings(void)
{
SEXP ans = R_NilValue;
const char* cstr = R::singleton().GetSelectedOutputString();
if (cstr && cstr[0]) {
std::string str(cstr);
std::istringstream iss(str);
std::string line;
std::vector< std::string > lines;
while (std::getline(iss, line))
{
lines.push_back(line);
}
PROTECT(ans = allocVector(STRSXP, lines.size()));
for (size_t i = 0; i < lines.size(); ++i)
{
SET_STRING_ELT(ans, i, mkChar(lines[i].c_str()));
}
UNPROTECT(1);
}
return ans;
}
SEXP
getWarningStrings(void)
{
SEXP ans = R_NilValue;
const char* cstr = R::singleton().GetWarningString();
if (cstr && cstr[0]) {
std::string str(cstr);
std::istringstream iss(str);
std::string line;
std::vector< std::string > lines;
while (std::getline(iss, line))
{
lines.push_back(line);
}
PROTECT(ans = allocVector(STRSXP, lines.size()));
for (size_t i = 0; i < lines.size(); ++i)
{
SET_STRING_ELT(ans, i, mkChar(lines[i].c_str()));
}
@ -495,9 +551,23 @@ SEXP
getAccumLines(void)
{
SEXP ans = R_NilValue;
PROTECT(ans = allocVector(STRSXP, 1));
SET_STRING_ELT(ans, 0, mkChar(R::singleton().GetAccumulatedLines().c_str()));
UNPROTECT(1);
const char* cstr = R::singleton().GetAccumulatedLines().c_str();
if (cstr && cstr[0]) {
std::string str(cstr);
std::istringstream iss(str);
std::string line;
std::vector< std::string > lines;
while (std::getline(iss, line))
{
lines.push_back(line);
}
PROTECT(ans = allocVector(STRSXP, lines.size()));
for (size_t i = 0; i < lines.size(); ++i)
{
SET_STRING_ELT(ans, i, mkChar(lines[i].c_str()));
}
UNPROTECT(1);
}
return ans;
}
@ -566,8 +636,6 @@ runString(SEXP input)
SEXP
runStringLst(SEXP input)
{
const char* in;
// check args
if (!isString(input)) {
error("a character vector argument expected");
@ -615,6 +683,7 @@ getCol(int ncol)
case TT_DOUBLE: ++nd; break;
case TT_LONG: ++nl; break;
case TT_STRING: ++ns; break;
default: break;
}
VarClear(&vv);
}
@ -691,6 +760,8 @@ getCol(int ncol)
REAL(ans)[r-1] = (double)vv.dVal;
}
break;
default:
break;
}
VarClear(&vv);
}
@ -716,6 +787,8 @@ getCol(int ncol)
INTEGER(ans)[r-1] = vv.lVal;
}
break;
default:
break;
}
VarClear(&vv);
}
@ -732,19 +805,6 @@ getCol(int ncol)
return ans;
}
/* SEXP */
/* getColumn(SEXP column) */
/* { */
/* int ncol; */
/* PROTECT(column = AS_INTEGER(column)); */
/* ncol = INTEGER_POINTER(column)[0]; */
/* UNPROTECT(1); */
/* return getCol(ncol); */
/* } */
SEXP
getSelOut(void)
{
@ -787,8 +847,8 @@ getSelOut(void)
setAttrib(list, R_NamesSymbol, attr);
/* Turn the data "list" into a "data.frame" */
/* see model.c */
// Turn the data "list" into a "data.frame"
// see model.c
PROTECT(klass = mkString("data.frame"));
setAttrib(list, R_ClassSymbol, klass);
@ -837,13 +897,38 @@ getSelOutLst(void)
}
SEXP
getErrStr()
getErrorStrings()
{
SEXP ans = R_NilValue;
const char* cstr = R::singleton().GetErrorString();
if (cstr && cstr[0]) {
std::string str(cstr);
std::istringstream iss(str);
std::string line;
std::vector< std::string > lines;
while (std::getline(iss, line))
{
lines.push_back(line);
}
PROTECT(ans = allocVector(STRSXP, lines.size()));
for (size_t i = 0; i < lines.size(); ++i)
{
SET_STRING_ELT(ans, i, mkChar(lines[i].c_str()));
}
UNPROTECT(1);
}
return ans;
}
SEXP
getVersionString()
{
SEXP ans = R_NilValue;
PROTECT(ans = allocVector(STRSXP, 1));
SET_STRING_ELT(ans, 0, mkChar(R::singleton().GetErrorString()));
SET_STRING_ELT(ans, 0, mkChar(R::singleton().GetVersionString()));
UNPROTECT(1);
return ans;
}
} // extern "C"

View File

@ -178,9 +178,9 @@ function(line)
##' # This example loads some keyword input, clears the input, and displays the results.
##' phrAccumulateLine("SOLUTION 1")
##' phrAccumulateLine("END")
##' cat(paste("The accumulated input is:\n", phrGetAccumulatedLines(), sep=""))
##' cat("The accumulated input is:", phrGetAccumulatedLines(), sep="\n")
##' phrClearAccumulatedLines()
##' cat(paste("The accumulated input now is:\n", phrGetAccumulatedLines(), sep=""))
##' cat("The accumulated input now is:\n", phrGetAccumulatedLines(), sep="\n")
##'
phrClearAccumulatedLines =
function()
@ -276,12 +276,12 @@ function(allow_ = TRUE)
##' This routine is rarely needed when running interactively since the error
##' string is displayed when it occurs.
##'
##' @usage phrGetErrorString()
##' @usage phrGetErrorStrings()
##' @return This function returns the errors that occured during the previous
##' phrReadDB, phrRun, phrRunFile call.
##' @seealso \code{\link{phrReadString}}, \code{\link{phrRun}},
##' \code{\link{phrRunFile}}, \code{\link{phrGetSelectedOutput}}
##' @references Literature references and web URLs can go here.
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -290,12 +290,12 @@ function(allow_ = TRUE)
##' # loaddatabase should fail
##' n <- try(phrLoadDatabase("missing.dat"), silent = TRUE)
##' # if n is non-NULL display error string
##' if (!is.null(n)) phrGetErrorString()
##' if (!is.null(n)) phrGetErrorStrings()
##'
phrGetErrorString =
phrGetErrorStrings =
function()
{
return(.Call("getErrStr", PACKAGE=.packageName))
return(.Call("getErrorStrings", PACKAGE=.packageName))
}
@ -312,7 +312,7 @@ function()
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -348,7 +348,7 @@ function()
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -384,7 +384,7 @@ function(value)
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -420,7 +420,7 @@ function(value)
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -456,7 +456,7 @@ function(value)
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -492,7 +492,7 @@ function(value)
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -528,7 +528,7 @@ function(value)
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -564,7 +564,7 @@ function(value)
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -600,7 +600,7 @@ function(value)
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -636,7 +636,7 @@ function(value)
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -672,7 +672,7 @@ function(value)
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -709,7 +709,7 @@ function(value)
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -745,7 +745,7 @@ function(filename)
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -781,7 +781,7 @@ function(filename)
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -817,7 +817,7 @@ function(filename)
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -853,7 +853,7 @@ function(filename)
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -886,7 +886,7 @@ function(filename)
##' @usage phrGetDumpFileName()
##' @return The name of the dump file as a string.
##' @note %% ~~further notes~~
##' @seealso \code{\link{phrGetDumpFileOn}}, \code{\link{phrGetDumpString}},
##' @seealso \code{\link{phrGetDumpFileOn}}, \code{\link{phrGetDumpStrings}},
##' \code{\link{phrGetDumpStringOn}}, \code{\link{phrSetDumpFileName}},
##' \code{\link{phrSetDumpFileOn}}, \code{\link{phrSetDumpStringOn}}
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
@ -908,7 +908,7 @@ function(filename)
##' input <- paste(input, " -equilibrium_phases 1\n")
##'
##' if (!is.null(phrRunString(input))) {
##' cat(phrGetErrorString())
##' cat(phrGetErrorStrings())
##' }
##' cat(paste("see ", phrGetDumpFileName(), "."))
##'
@ -933,7 +933,7 @@ function()
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -968,7 +968,7 @@ function()
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -1003,7 +1003,7 @@ function()
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -1038,7 +1038,7 @@ function()
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -1069,7 +1069,7 @@ function()
##'
##' %% ~~ If necessary, more details than the description above ~~
##'
##' @usage phrGetDumpString()
##' @usage phrGetDumpStrings()
##' @return The dump output as a string.
##' @note %% ~~further notes~~
##' @seealso \code{\link{phrGetDumpFileName}}, \code{\link{phrGetDumpFileOn}},
@ -1091,36 +1091,17 @@ function()
##' input <- paste(input, "SAVE equilibrium_phases 1 \n")
##' input <- paste(input, "DUMP \n")
##' input <- paste(input, " -solution 1 \n")
##' input <- paste(input, " -equilibrium_phases 1\n")
##' input <- paste(input, " -equilibrium_phases 1 \n")
##'
##' if (!is.null(phrRunString(input))) {
##' cat(phrGetErrorString())
##' cat(phrGetErrorStrings())
##' }
##' cat(phrGetDumpString())
##'
##'
##' phrLoadDatabaseString(phreeqc.dat.list)
##' phrSetDumpStringOn(TRUE)
##'
##' input <- "SOLUTION 1 Pure water \n"
##' input <- paste(input, "EQUILIBRIUM_PHASES 1 \n")
##' input <- paste(input, " Calcite 0 10 \n")
##' input <- paste(input, "SAVE solution 1 \n")
##' input <- paste(input, "SAVE equilibrium_phases 1 \n")
##' input <- paste(input, "DUMP \n")
##' input <- paste(input, " -solution 1 \n")
##' input <- paste(input, " -equilibrium_phases 1\n")
##'
##' if (!is.null(phrRunString(input))) {
##' cat(phrGetErrorString())
##' }
##' cat(phrGetDumpString())
##'
##' cat(phrGetDumpStrings())
##'
phrGetDumpString =
phrGetDumpStrings =
function()
{
return(.Call("getDumpString", PACKAGE=.packageName))
return(.Call("getDumpStrings", PACKAGE=.packageName))
}
@ -1131,13 +1112,13 @@ function()
##'
##' %% ~~ If necessary, more details than the description above ~~
##'
##' @usage phrGetLogString()
##' @usage phrGetLogStrings()
##' @return %% ~Describe the value returned %% If it is a LIST, use %%
##' \item{comp1 }{Description of 'comp1'} %% \item{comp2 }{Description of
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -1152,10 +1133,10 @@ function()
##' {
##' }
##'
phrGetLogString =
phrGetLogStrings =
function()
{
return(.Call("getLogString", PACKAGE=.packageName))
return(.Call("getLogStrings", PACKAGE=.packageName))
}
@ -1166,13 +1147,13 @@ function()
##'
##' %% ~~ If necessary, more details than the description above ~~
##'
##' @usage phrGetOutputString()
##' @usage phrGetOutputStrings()
##' @return %% ~Describe the value returned %% If it is a LIST, use %%
##' \item{comp1 }{Description of 'comp1'} %% \item{comp2 }{Description of
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -1187,10 +1168,10 @@ function()
##' {
##' }
##'
phrGetOutputString =
phrGetOutputStrings =
function()
{
return(.Call("getOutputString", PACKAGE=.packageName))
return(.Call("getOutputStrings", PACKAGE=.packageName))
}
@ -1201,13 +1182,13 @@ function()
##'
##' %% ~~ If necessary, more details than the description above ~~
##'
##' @usage phrGetSelectedOutputString()
##' @usage phrGetSelectedOutputStrings()
##' @return %% ~Describe the value returned %% If it is a LIST, use %%
##' \item{comp1 }{Description of 'comp1'} %% \item{comp2 }{Description of
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -1222,10 +1203,10 @@ function()
##' {
##' }
##'
phrGetSelectedOutputString =
phrGetSelectedOutputStrings =
function()
{
return(.Call("getSelectedOutputString", PACKAGE=.packageName))
return(.Call("getSelectedOutputStrings", PACKAGE=.packageName))
}
@ -1238,34 +1219,34 @@ function()
##' \code{\link{phrLoadDatabaseString}}, \code{\link{phrRunAccumulatedeadString}},
##' \code{\link{phrRunFile}}, \code{\link{phrRunString}}
##'
##' %% ~~ If necessary, more details than the description above ~~
##' A NULL value is returned if there are no warnings.
##'
##' @usage phrGetWarningString()
##' @return A character vector containing warning messages.
##' @usage phrGetWarningStrings()
##' @return A character vector containing warning messages or NULL.
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
##' @examples
##'
##' # This example loads the phreeqc.dat database and attempts to use the
##' # \code{DATABASE} keyword to set the database to wateq4f.dat. A
##' # warning is displayed stating that the DATABASE keyword is ignored
##' # in the 'R' implementation.
##' # DATABASE keyword to set the database to wateq4f.dat. A warning is
##' # displayed stating that the DATABASE keyword is ignored in the 'R'
##' # implementation.
##' phrLoadDatabaseString(phreeqc.dat.list)
##' phrAccumulateLine("DATABASE wateq4f.dat")
##' phrAccumulateLine("SOLUTION 1")
##' phrRunAccumulated()
##' if (is.null(phrGetWarningString())) {
##' cat(phrGetWarningString())
##' if (!is.null(phrGetWarningStrings())) {
##' cat(phrGetWarningStrings(), sep="\n")
##' }
##'
phrGetWarningString =
phrGetWarningStrings =
function()
{
return(.Call("getWarningString", PACKAGE=.packageName))
return(.Call("getWarningStrings", PACKAGE=.packageName))
}
@ -1278,7 +1259,7 @@ function()
##' @param filename The file name of the database.
##' @return This function returns NULL.
##' @seealso \code{\link{phrLoadDatabaseString}}
##' @references Literature references and web URLs can go here.
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -1357,7 +1338,7 @@ function(input)
##' # This example loads some keyword input and displays the contents.
##' phrAccumulateLine("SOLUTION 1")
##' phrAccumulateLine("END")
##' cat(paste("The accumulated input is:", phrGetAccumulatedLines(), sep="\n"))
##' cat("The accumulated input is:", phrGetAccumulatedLines(), sep="\n")
##'
phrGetAccumulatedLines =
function()
@ -1379,7 +1360,7 @@ function()
##' 'comp2'} %% ...
##' @note %% ~~further notes~~
##' @seealso %% ~~objects to See Also as \code{\link{help}}, ~~~
##' @references %% ~put references to the literature/web site here ~
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export
@ -1415,7 +1396,7 @@ function()
##' @return This function returns NULL.
##' @seealso \code{\link{phrReadString}}, \code{\link{phrRun}},
##' \code{\link{phrGetSelectedOutput}}
##' @references Literature references and web URLs can go here.
##' @references \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc}
##' @keywords interface
##' @useDynLib phreeqc
##' @export