[R] Error in axis ????

eric ericstrom at aol.com
Thu Nov 10 04:34:28 CET 2011


I did an update of both rstudio and my packages. I had some trouble but was
able to move a lot of the packages so most troubles seem to be behind me.
But having a problem with code that previously ran fine. See below:

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

Attaching package: ‘zoo’

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

    as.Date, as.Date.numeric

Loading required package: TTR
> require(rdatamarket)
Loading required package: rdatamarket
> rm(list=ls())
> g
> <-dmlist("http://datamarket.com/data/set/1jz5/st-louis-financial-stress-index#display=line&ds=1jz5")
> g$Date <-as.Date(g[,1], "%Y-%m-%d")
> h <-as.xts(g, order.by=g[,1])
> j <-h[,2]
> s <-getSymbols('^GSPC', from="1990-01-01", to=Sys.Date())
> s <-to.weekly(GSPC)
> s <-s[,6]
> x <-na.omit(merge(s,j)) ; names(x) <-c("sp","stress")
> print(head(x))
               sp stress
1993-12-31 466.45 -0.453
1994-01-07 469.90 -0.442
1994-01-14 474.91 -0.435
1994-01-21 474.72 -0.449
1994-01-28 478.70 -0.462
1994-02-04 469.81 -0.513
> par(mfrow=c(2,1))
> plot(x[,1]/400, ylim=c(-1,5), col="blue")
Error in axis(1, at = xycoords$x, labels = FALSE, col = "#BBBBBB", ...) : 
  formal argument "col" matched by multiple actual arguments
> lines(x[,2], col="red")
> ccf(drop(x[,1]), drop(x[,2]))

How do I fix the error ?

--
View this message in context: http://r.789695.n4.nabble.com/Error-in-axis-tp4022356p4022356.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list