Description Usage Arguments Value Author(s) Examples
View source: R/pub02_dataGettingFuncs.R
Series of functions of connect/login Tinysoft server, and remote call funcions of Tinysoft.
1 2 3 4 5 |
funchar |
a charactor string of tinysoft script |
pars |
a list of funchar's parametres |
syspars |
a list of tinysoft system parametres.(including:StockID CurrentDate Cycle bRate RateDay Precision) |
tsInclude: include and load the external dll;
tsRequre: test if tinysoft connected, if not, connect it.
ruifei.yin
1 2 3 4 5 6 7 8 9 10 11 12 | tsInclude()
tsConnect()
tsLogined()
tsRemoteExecute("return close();",list(StockID="SZ000002",CurrentDate=rdate2ts(as.Date("2014-11-11"))))
# use ldply/laply/llply to transform the result from list to comfortable form
ll <- tsRemoteExecute("return Array(('a':1,'b':4),('a':2,'b':5),('a':3,'b':6));")
plyr::ldply(ll,as.data.frame)
plyr::laply(ll,as.array)
plyr::llply(ll,unlist)
tsRemoteCallFunc("close",,list(StockID="SZ000002"))
tsRemoteCallFunc("rand",list(2,3))
tsDisconnect()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.