I have an xts object with 4 columns. The first 3 columns represent the middle and lower and upper confidence limits for the fraction. 4th column is the sample size. Since the scales are different, I thought it would be advisable to build the first 3 columns on one chart and build a chart on a separate chart right below it. Any suggestions on how to do this?
Here is the code to create the xts object, which is similar to the one I have:
startTime = Sys.time() n = 10 d = seq(startTime,startTime+n*24*60*60,by="1 day") a = sample(10000,length(d),replace=TRUE) p = runif(length(d)) l = p/2 u = p+(p+1)/2 x= xts(p,d) x = cbind(x,l,u,a) colnames(x) = c("prop","low","high","size")
source share