| lowLevelFame {fame} | R Documentation |
These are most of the lower level functions used in the
FAME interface. Most users will never need any of these functions,
as the higher level function getfame and putfame do
almost everything they want to do. The functions documented here were
written in the course of implementing getfame and
putfame, and some of them may prove useful on their own.
fameRunning answers TRUE if there is a process called
"FAME SERVER" already running under the user's id and with the current
R process as its parent process.
fameStart initializes the FAME HLI and opens a work database.
Since the work database is always the first one opened, its key is
always 0.
fameStop kills the HLI session and the FAME SERVER process
started by fameStart. In any given R session, you
cannot restart the HLI once it has died for any reason. (This is a
FAME limitation, not an R one.) Death of the R process also kills
the child FAME SERVER process. So it rarely makes sense to call
fameStop explicitly, as it makes any subsequent FAME
interaction in the current R session impossible.
fameCommand sends its string argument to the child FAME SERVER
process to be executed. If silent is TRUE, it invisibly
returns a status code that can be sent to fameStatusMessage to
get an error message. If silent is FALSE, the status
message is echoed to standard output.
fameStatusMessage looks up and returns the error message
associated with its argument.
fameDbOpen opens the named database in the given access mode.
It returns an integer dbKey, which is a required argument for
some of the other functions documented here.
fameDbClose closes the database associated with the
given dbKey.
fameDeleteObject deletes the named object from the database
associated with the give dbKey.
fameWriteSeries writes the tis (Time Indexed Series)
object ser as fname in the database associated with
dbKey. If an object by that name already exists in the database
and update is TRUE, the frequency and type of ser
are checked for consistency with the existing object, and if
checkBasisAndObserved is TRUE (not the default), those
items are also checked. Any inconsistencies cause the update to fail.
If all checks are OK, then the range covered by ser is written
to the database. If update if FALSE, any existing
series called fname in the database will be replaced by
ser. This function should probably not be called directly, as
putfame provides a nicer interface.
fameWhat returns a list of low level information about an
object in a database, including components named status, dbKey, name,
class, type, freq, basis, observ, fyear, fprd, lyear, lprd, obs, and
range. If getDoc is TRUE, it will also include
description and documentation components. See the FAME
documentation for the CHLI functions cfmwhat and cfmsrng
for details.
fameRunning() fameStart() fameStop() fameCommand(string, silent = F) fameStatusMessage(code) fameDbOpen(dbName, accessMode = "read") fameDbClose(dbKey) fameDeleteObject(dbKey, fname) fameWriteSeries(dbKey, fname, ser, update = F, checkBasisAndObserved = F) fameWhat(dbKey, fname, getDoc = F)
string |
a FAME command to be executed |
silent |
run the command quietly if TRUE |
code |
an integer status code from FAME |
dbName |
name of or path to the database to open |
accessMode |
a string specifying the access model to open the database in: one of "read", "create", "overwrite", "update", or "shared". |
dbKey |
integer returned by dbOpen |
fname |
name of an object in a FAME database |
ser |
a tis time series |
update |
if TRUE update any existing series by the same
name in place. If FALSE, replace existing series. |
checkBasisAndObserved |
see description above for fameWriteSeries |
getDoc |
if TRUE, also return the description and
documentation attributes. |
fameRunning return a Boolean.
fameStart and fameStop return nothing.
fameCommand invisibly returns a status code.
fameStatusMessage returns a message string.
fameDbOpen returns an integer dbKey.
fameDbClose returns a status code.
fameDeleteObject returns a status code.
fameWriteSeries returns a status code.
fameWhat returns a list.
Jeff Hallman
getfame, putfame, fameCustomization