[R-SIG-Finance] "Next" in quantmod

Steve Wisdom swisdom at gmail.com
Wed May 13 19:50:16 CEST 2009


Not sure is this is a bug, or a feature, or just a brain-cramp on my end:

> require(quantmod)
Loading required package: quantmod
Loading required package: xts
Loading required package: zoo

Attaching package: 'zoo'

        The following object(s) are masked from package:base :

         as.Date.numeric

Loading required package: Defaults
quantmod: Quantitative Financial Modelling Framework

Version 0.3-7, Revision 461
http://www.quantmod.com

> getSymbols("CSCO")
[1] "CSCO"
> head(Lag(Cl(CSCO)))
           Lag.1
2007-01-03    NA
2007-01-04 27.73
2007-01-05 28.46
2007-01-08 28.47
2007-01-09 28.63
2007-01-10 28.47
> head(Next(Cl(CSCO)))                                <--------------
Error in `[.xts`(x, -(0:k), ) :
  only zeros may be mixed with negative subscripts
> R.version.string



More information about the R-SIG-Finance mailing list