title: error $ operator not defined for this s4 class in r (normalization)
body: <p>I am trying to normalize transactions data.</p>
  
  <pre><code>credit &lt;- read.transactions("directory",sep=",", header="TRUE")
  ind &lt;- sample(2, nrow(credit), replace=TRUE, prob=c(0.7, 0.3))
  trainData &lt;- credit[ind==1, ]
  testData &lt;- credit[ind==2, ]
  testData$amount&lt;- ((testData$amount - min(testData$amount)) / (max(testData$amount) - 
  min(testDat$amount)))
  </code></pre>
  
  <p>However, the following error is returned.</p>
  
  <pre><code>Error in testData$amount : $ operator not defined for this S4 class
  </code></pre>
  
  <p>What is the solution?</p>