Hi, I have following codes :

 

 

library(zoo); library(ggplot2); library(plyr)

 

 

dat <- rnorm(306); vv <- letters[1:6]; dat1 <- data.frame(dat, vv)

dat2 = zooreg(rnorm(51), as.yearmon(as.Date("2000-01-01")), frequency=12)

 

ggplot(dat1) +

            geom_line(aes(y=dat, x=index(dat2), colour=vv), group=vv, size =
1.3)

 

 

However I got error while plotting them :

Error in data.frame(x = c(2000, 2000.08333333333, 2000.16666666667, 2000.25,
: 

  arguments imply differing number of rows: 51, 306

 

I could not find why that error is coming. Any idea please ?

 

Thanks,


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to