## S3 method for class 'fameDriver,character':
TSconnect(drv, dbname,
accessMode = if (file.exists(dbname)) "shared" else "create",
current = NA, ...)
## S3 method for class 'fameServerDriver,character':
TSconnect(drv, dbname,
service = "", host = "", user = "", password = "", current = NA, ...) ## S3 method for class 'character,TSfameConnection':
TSget(serIDs, con,
TSrepresentation = getOption("TSrepresentation"),
tf = NULL, start = tfstart(tf), end = tfend(tf), names = NULL,
TSdescription = FALSE, TSdoc = FALSE, TSlabel=FALSE, TSsource=TRUE,
vintage=getOption("TSvintage"), ...)
## S3 method for class 'character,TSfameServerConnection':
TSget(serIDs, con,
TSrepresentation = getOption("TSrepresentation"),
tf = NULL, start = tfstart(tf), end = tfend(tf), names = NULL,
TSdescription = FALSE, TSdoc = FALSE, TSlabel=FALSE, TSsource=TRUE,
vintage=getOption("TSvintage"), ...)
## S3 method for class 'ANY,character,TSfameConnection':
TSput(x, serIDs=seriesNames(x),
con, TSdescription.=TSdescription(x),
TSdoc.=TSdoc(x), TSlabel.=NULL, TSsource.=NULL, warn = TRUE, ...)
## S3 method for class 'ANY,character,TSfameServerConnection':
TSput(x, serIDs=seriesNames(x),
con, TSdescription.=TSdescription(x),
TSdoc.=TSdoc(x), TSlabel.=NULL, TSsource.=NULL, warn = TRUE, ...)
## S3 method for class 'character,TSfameConnection':
TSdates(serIDs, con,
vintage=getOption("TSvintage"), panel=NULL, ...)
## S3 method for class 'character,TSfameServerConnection':
TSdates(serIDs, con,
vintage=getOption("TSvintage"), panel=NULL, ...)
## S3 method for class 'character,TSfameConnection':
TSexists(
serIDs, con, vintage=NULL, panel=NULL, ...)
## S3 method for class 'character,TSfameServerConnection':
TSexists(
serIDs, con, vintage=NULL, panel=NULL, ...)
## S3 method for class 'character,TSfameConnection':
TSdelete(serIDs, con,
vintage=getOption("TSvintage"), panel=getOption("TSpanel"), ...)
## S3 method for class 'character,TSfameServerConnection':
TSdelete(serIDs, con,
vintage=getOption("TSvintage"), panel=getOption("TSpanel"), ...)
## S3 method for class 'character,TSfameConnection':
TSdescription(x, con, ...)
## S3 method for class 'character,TSfameServerConnection':
TSdescription(x, con, ...)
## S3 method for class 'character,TSfameConnection':
TSdoc(x, con, ...)
## S3 method for class 'character,TSfameServerConnection':
TSdoc(x, con, ...)
## S3 method for class 'character,TSfameConnection':
TSlabel(x, con, ...)
## S3 method for class 'character,TSfameServerConnection':
TSlabel(x, con, ...)
## S3 method for class 'character,TSfameConnection':
TSsource(x, con, ...)
## S3 method for class 'character,TSfameServerConnection':
TSsource(x, con, ...)
## S3 method for class 'TSfameConnection':
TSvintages(con)
## S3 method for class 'TSfameServerConnection':
TSvintages(con)
## S3 method for class 'TSfameConnection':
dbDisconnect(conn,...)
## S3 method for class 'TSfameServerConnection':
dbDisconnect(conn,...)
## S3 method for class 'fameDriver':
dbUnloadDriver(drv, ...)
## S3 method for class 'fameServerDriver':
dbUnloadDriver(drv, ...)
## S3 method for class 'default':
fame()
## S3 method for class 'default':
fameServer()
tfwindow.)tfwindow.)tfwindow.)This package provides a wrapper to the TSfameConnection establishes a connection
using the locally fame which can access local databases or databases on a remote
server, specified by the server name followed by a space and the database name.
The TSfameServerConnection establishes a connection to a remote server
using one of Fame's remote server protocols. See package
There is a simplistic mechanism for accessing vintages of data stored in
different Fame databases. To use this, the dbname argument to
TSconnect should be a vector of character strings indicating the
databases, with names of the elements indicating the vintages. The
vintage argument to TSget is then a character vector used to
select a subset of dbname. The dbname argument to
TSconnect can also be specified to indicate the version that should be
considered current. (That is, the user needs to know that information and specify it,
rather than having it supplied by the database.) In other respects the vintages
support is then similar to other TSdbi packages such as
TSdbi-package,
dbConnect,
TSput
getfamerequire("tfplot")
con <- try(TSconnect(dbDriver("fame"), dbname="test.db"))
if(! inherits(con, "try-error")) {
z <- ts(rnorm(100), start=c(1975,1), frequency=12)
seriesNames(z) <- "random1"
if(TSexists("random1", con)) TSreplace(z, con) else
TSput(z, con)
z1 <- TSget("random1", con)
tfplot(z1)
z <- ts(matrix(rnorm(100),50,2), start=c(1975,1), frequency=4)
seriesNames(z) <- c("random2","random3")
if(TSexists("random2", con) |
TSexists("random3", con) ) TSreplace(z, con) else
TSput(z, con)
z2 <- TSget("random2", con)
tfplot(z2)
TSdates("D1", con)
TSdates("random2", con)
TSdates(c("random1","random2","random3"), con)
TSmeta("random2", con)
options(TSconnection=con)
z2 <- TSget(c("random2","random3"))
z <- TSdates(c("D1","random2","random3"))
print(z)
TSmeta("random2")
TSdelete("random1", con)
TSdelete("random2")
dbDisconnect(con)
}Run the code above in your browser using DataLab