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 Rone.) 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. If capture
is
TRUE
, output from the FAME output channel is returned, with a
"status" attribute holding the FAME status code.
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 a named object from a database.
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 = T, capture = F)
fameStatusMessage(code)
fameDbOpen(dbName, accessMode = "read")
fameDbClose(dbKey)
fameDeleteObject(db, fname)
fameWriteSeries(dbKey, fname, ser, update = F, checkBasisAndObserved = F)
fameWhat(dbKey, fname, getDoc = F)
TRUE
TRUE
dbOpen
dbKey
or dbName
form; that is, it can
be an integer returned by dbOpen
, or it can be the name of a
database or path to a database.tis
time seriesTRUE
update any existing series by the same
name in place. If FALSE
, replace existing series.fameWriteSeries
TRUE
, also return the description
and
documentation
attributes.fameRunning
return a Boolean. fameStart
and fameStop
return nothing.
If capture
is FALSE
, fameCommand
invisibly returns a status code.
If capture
is TRUE
, strings sent to the FAME output
channel are returned as a character vector, and the status code is
returned as the "status" attribute of that vector.
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.
getfame
, putfame
, fameCustomization