Search code examples
rquantmod

When using package 'quantmod' in R, how to suppress the 'last price' line of text on a price chart?


I am plotting a price chart using function chartSeries() in the R package quantmod. Here's an example:

#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')

And here's the price chart:

price chart

How can I suppress the text "Last 64.050003" so that it doesn't appear on the chart?


Solution

  • You have to insert the parameter TA = NULL as indincated in the documentation and in this example: http://www.quantmod.com/examples/charting/#chartseries

    chartSeries(hist.xts, type = 'bars', TA = NULL)
    

    enter image description here