本地读取通达信数据

#本地读取通达信数据
readTDXB <- function(stockName)
{
  tdx <-read.csv(file = paste(stockName,".csv",sep = ""),header = FALSE,sep = ",",skip = 2)[,1:6]
  names(tdx) <- c("DATETIME","Open","High","Low","Close","Volume")
  tdxxts <- as.xts(tdx[,-1],as.Date(tdx$DATETIME))
  return(na.trim(tdxxts))
}

  

posted @ 2017-03-07 00:39  泡面 @ 幸福  阅读(2924)  评论(0编辑  收藏  举报