title: "Arguments imply differing number of rows" Error after splliting data set into test and training sets
body: <p>The following code is me splitting the 'Weekly' data set into training and testing datasets. My training data set is supposed to contain years 1990-2008 while my testing data set spans 2009-2010. The Weekly data set is a dataset in R.</p>
  
  <pre><code>weekly.train = split(Weekly, Weekly$Year == 1990:2008)
  weekly.test = split(Weekly, Weekly$Year == 2009:2010)
  </code></pre>
  
  <p>When I do a logistic regression model to the training set I get this error:</p>
  
  <p>"Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, : arguments imply differing number of rows: 1037, 52"</p>
  
  <p>Here's my code for the regression:</p>
  
  <pre><code>mod.fit.lr&lt;-glm(Direction ~ Lag1+Lag2+Lag3+Lag4+Lag5+Volume, data = weekly.train,family = binomial)
  </code></pre>