require("tfplot")
## Not run:
# con <- try(TSconnect("histQuote", dbname="yahoo") )
# x <- TSget("^gspc", con)
# tfplot(x)
#
# con <- TSconnect("getSymbol", dbname="FRED")
# x <- TSget("CPIAUCNS", con)
# tfplot(x)
#
# # data from http://pitrading.com/
# # par(ask=TRUE) # to pause between pages
# con <- TSconnect("zip", dbname="http://pitrading.com/free_eod_data")
# x <- TSget("EURUSD", con)
# tfplot(x, graphs.per.page=3)
#
# z <- TSget(c("AD", "CD"), con, quote="Close")
# tfplot(z, start="2007-01-01", Title=
# "Futures, Australian and Canadian Dollar Continuous Contract at Close",
# graphs.per.page=3)
# ## End(Not run)
#### Australian Money ####
# test file copied Nov. 29, 2010 from
# http://www.rba.gov.au/statistics/tables/xls/d03hist.xls
testfile <- system.file("xlsExampleData/d03hist.xls", package = "TSmisc")
con1 <- TSconnect("xls", dbname=testfile,
map=list(ids =list(i=11, j="B:Q"),
data =list(i=12:627, j="B:Q"),
dates=list(i=12:627, j="A"),
names=list(i=4:7, j="B:Q"),
description = NULL,
tsrepresentation = function(data,dates){
ts(data,start=c(1959,7), frequency=12)}))
z <- TSget("DMACN", con1)
tfplot(z)
Run the code above in your browser using DataLab