是否有一种简单的方法使标题“通用电气”而不是“通用电气”?
图表R
library(quantmod)
getSymbols("GE")
lineChart(GE)发布于 2017-11-05 21:39:18
只需使用name参数
lineChart(GE, name = "General Electric")发布于 2019-06-15 23:07:51
下面是一个完整的示例,如果有人需要使用新的chart_Series()。
# create a pdf with titles
# R --silent --vanilla < c.r
suppressWarnings(suppressMessages(library(quantmod)))
options("getSymbols.warning4.0"=FALSE)
options("getSymbols.yahoo.warning"=FALSE)
# list of stocks
s= c("IBM", "AAPL", "GE", "GM")
# get symbols from yahoo
symbols <- list (getSymbols(s, source = "yahoo"))
# create a PDF
pdf(file = "out.pdf")
par(mfrow = c( 4, 2 ) )
chart_Series(IBM, name="IBM")
chart_Series(AAPL, name="Apple")
chart_Series(GE, name="General Electric")
chart_Series(GM, name="General Motors")
dev.off()https://stackoverflow.com/questions/47126856
复制相似问题