如何使用带有xtsExtra包的Block和Events行的Plot.xts? [英] How to use Plot.xts with Block and Events lines with xtsExtra package?

查看:185
本文介绍了如何使用带有xtsExtra包的Block和Events行的Plot.xts?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图用其他方式绘制块的时间序列图。
有关示例的更多详细信息,请参阅链接: http:// www.r-bloggers.com/plot-xts-is-wonderful/

I am trying to plot time series graph with blocks as others did. See the link for more detail of the example: http://www.r-bloggers.com/plot-xts-is-wonderful/.


  1. 首先,我安装来自R-Forge的所有最新xts(版本:0.9.874)和xtsExtra(ver:0.0.876)包: https://r-forge.r-project.org/R/?group_id=118

然后我尝试加载xtsExtra,它显示如下:

Then I tried to load xtsExtra and it shows as follows:




库(xtsExtra)

library(xtsExtra)

附件包:'xtsExtra'
以下对象被从package:xts中被掩码:
addLegend ,addSeries,plot.xts

Attaching package: ‘xtsExtra’ The following objects are masked from ‘package:xts’: addLegend, addSeries, plot.xts


  1. 当我看plot.xts组件时,我没有看到块和事件。




names(formals(plot.xts))
[1]xy... 子FUN面板

[7]multi.panelcolup.coldn.coltypelty

[13]lwdlendmainclevcexcex.axis

[19]marsrtxaxis.lasylimyaxis。同样的yaxis.left

[25]yaxis.rightgrid.ticks.ongrid.ticks.lwdgrid.ticks.ltygrid.col标签.col

[31]format.labelsshadingbg.colgrid2legend.loc

names(formals(plot.xts)) [1] "x" "y" "..." "subset" "FUN" "panels"
[7] "multi.panel" "col" "up.col" "dn.col" "type" "lty"
[13] "lwd" "lend" "main" "clev" "cex" "cex.axis"
[19] "mar" "srt" "xaxis.las" "ylim" "yaxis.same" "yaxis.left"
[25] "yaxis.right" "grid.ticks.on" "grid.ticks.lwd" "grid.ticks.lty" "grid.col" "labels.col"
[31] "format.labels" "shading" "bg.col" "grid2" "legend.loc"




  1. 最后当我使用plot.xts时,它显示以下消息。
    警告信息:
    xtsExtra :: plot.xts已弃用,使用xts :: plot.xts

如果有人可以告诉我,我真的很感激:

I really appreciate it if anyone can tell me:


  1. 如果这些软件包版本是正确的。如果没有,xts和xtsExtra的旧版本有块和事件功能。

  2. 如果这些新版本可以做同样的事情,怎么样?

如果您需要数据尝试,请让我知道,因为它很大,我将分开提供。

Please let me know if you need the data to try and I will provide separately since it is big.

推荐答案

我们已将plot.xts移动到主xts包中。

We've moved plot.xts into the main xts package.

请执行

 install.packages("xts", repos="http://R-Forge.R-project.org")

 install_github('joshuaulrich/xts')

然后看看plot.xts和?addEventLines的例子。

and then look at ?plot.xts and ?addEventLines for examples.

这篇关于如何使用带有xtsExtra包的Block和Events行的Plot.xts?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆