object of type 'closure' is not subsettable, that doesn't make sense in this situation : <p>I read a few questions that you have already answered however, it doesn't seem to make sense in my situation. you stated in someone else question that they were writing their line as if they were using a function as a dataframe.   I get the following error message for the line below:</p>

<p>"Error in data[train, ] : object of type 'closure' is not subsettable"</p>

<blockquote>
  <p>booastmodel&lt;- ada(default ~ .,data=data[train,],iter=50,bag.frac=0.5,control=rpart.control(maxdepth=30,
  + cp=0.01,minsplit=20,xval=10))</p>
</blockquote>

<p>what am I doing wrong?</p>
