[英]writing a function to get last traded stock price with quantmod package
[英]When using package 'quantmod' in R, how to suppress the 'last price' line of text on a price chart?
我正在使用R包quantmod
中的功能chartSeries()
繪制價格圖表。 這是一個例子:
#Load package 'quantmod'
library(quantmod)
#Download quotes for VNQ
hist.xts <- getSymbols('VNQ',
from = '2006-1-1',
to = '2006-1-31',
auto.assign = F)
#Plot price chart
chartSeries(hist.xts, type = 'bars')
這是價格表:
如何抑制文本“ Last 64.050003”,使其不出現在圖表上?
您必須按照文檔中的說明以及在此示例中插入參數TA = NULL
: http ://www.quantmod.com/examples/charting/#chartseries
chartSeries(hist.xts, type = 'bars', TA = NULL)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.