title: lenght of columns of two objects when more than one column in one object is present
body: <p>I have the following vector and acf function (packages quantmod,XML,zoo)</p>
  
  <pre><code>L&lt;- 1
  theurl &lt;- "http://www.iasg.com/groups/group/transtrend/program/transtrend-diversified-   
  trend-program-enhanced-risk-usd"
  tables &lt;- readHTMLTable(theurl)
  n.rows &lt;- unlist(lapply(tables, function(t) dim(t)[1]))
  MONTHLYPERFORMANCE&lt;-tables[[which.max(n.rows)]]
  z&lt;- as.data.frame(MONTHLYPERFORMANCE);
  z$Year&lt;-NULL
  z$YTD &lt;- NULL
  z$DD &lt;- NULL
  z &lt;- z[nrow(z):1,];
  s&lt;-as.vector(t(z))
  w&lt;-as.numeric(s)
  p&lt;-na.omit(w)
  x&lt;-(p*0.01*L)
  d&lt;-length(na.omit(x)) 
  x&lt;- x[1:d]  
  #DETREND+DENOISE
  s&lt;-detrend(x, tt = 'linear', bp = c())
  #AUTOCORRELATION
  a&lt;-acf(x)
  b&lt;-a[[1]]   
  c&lt;-(b[2:length(b)])
  posssignificance_level&lt;-qnorm((1+0.95)/2)/sqrt(sum(!is.na(x)))
  posssignificance_level
  negsignificance_level&lt;- -posssignificance_level
  negsignificance_level
  poscorr&lt;-which(posssignificance_level&lt;c)
  negcorr&lt;-which(negsignificance_level&gt;c)
  posautorrelation &lt;- if(length(poscorr) == 0) Lag(s,0) else na.omit(posautorrelation &lt;-  
  Lag(s, poscorr))
  negautorrelation &lt;- if(length(negcorr) == 0) Lag(s,0) else na.omit(negautorrelation &lt;-  
  Lag(s, negcorr))
  </code></pre>
  
  <p>I then want to make all series resulting from posautorrelation and negautorrelation to take the minimum number of rows either from posautorrelation and negautorrelation by the below expression</p>
  
  <pre><code>shortest &lt;- min(length(posautorrelation), length(negautorrelation))
  posautorrelation &lt;- tail(posautorrelation, shortest)
  negautorrelation &lt;- tail(negautorrelation, shortest)
  tpos &lt;-na.omit(posautorrelation); rownames(tpos)&lt;-NULL
  tneg &lt;-na.omit(negautorrelation); rownames(tneg)&lt;-NULL
  </code></pre>
  
  <p>This works well when I only have one series positive and another negative. However if "posautorrelation" or "negautorrelation" yield more than one column, the shortest function sums the number rows of the different columns handicapping the "shortest" expression from above. Is there a way for "shortest" to consider just one column for posautorelation and the same for negautorrelation. </p>