title: r-project SixSigma ss.rr gives Error in `row.names<-.data.frame`(`*tmp*`, value = value) : invalid 'row.names' length
body: <p>I have below data.frame</p>
  
  <pre>
  > str(luc)
  'data.frame':   19 obs. of  4 variables:
   $ driver  : Factor w/ 16 levels "nr #1","nr #10",..: 1 9 10 11 12 13 14 15 16 2 ...
   $ position: Factor w/ 16 levels "pos #1","pos #10",..: 1 9 10 11 12 13 14 15 16 2 ...
   $ ate     : num  2 2 2 2 2 2 2 2 2 1 ...
   $ i2      : num  0.00656 0.00676 0.00679 0.00681 0.00666 0.00657 0.00674 0.00676 0.00682 0.00684 ...
  </pre>
  
  <pre>
  > luc
     driver position ate      i2
  1   nr #1   pos #1   2 0.00656
  2   nr #2   pos #2   2 0.00676
  3   nr #3   pos #3   2 0.00679
  4   nr #4   pos #4   2 0.00681
  5   nr #5   pos #5   2 0.00666
  6   nr #6   pos #6   2 0.00657
  7   nr #7   pos #7   2 0.00674
  8   nr #8   pos #8   2 0.00676
  9   nr #9   pos #9   2 0.00682
  10 nr #10  pos #10   1 0.00684
  11 nr #11  pos #11   2 0.00671
  12 nr #12  pos #12   2 0.00673
  13 nr #13  pos #13   2 0.00660
  14 nr #14  pos #14   2 0.00672
  15 nr #15  pos #15   2 0.00673
  16 nr #16  pos #16   2 0.00654
  17  nr #7   pos #1   2 0.00678
  18  nr #3   pos #2   2 0.00680
  19  nr #1   pos #3   2 0.00658
  </pre>
  
  <p>which is extremely close to <b>ss.data.rr</b> provided by the SixSigma package.</p>
  
  <p>Calling ss.rr with ss.data.rr works but what ever I try I always get below error when using luc:</p>
  
  <pre>
  > ss.rr(var=i2, appr=driver, part=ate, data=luc)
  <b>Error in ``row.names&lt;-.data.frame``(`*tmp*`, value = value) : 
    invalid 'row.names' length</b>
  </pre> 
  
  <p>How to get rid of it?</p>
  
  <p>Full code below; I create data.frame(luc) from much larger dataset.</p>
  
  <pre><code>library("SixSigma")
  
  luc &lt;- subset(cf, cf$CntrlVal == 85)
  luc &lt;- data.frame(cbind(luc$DriverNumber, luc$Position, luc$ATE, luc$I2))
  colnames(luc)&lt;-c("driver", "position", "ate", "i2")
  
  luc$position &lt;- as.factor(paste0("pos #", luc$position))
  luc$driver&lt;- as.factor(paste0("nr #", luc$driver))
  luc[10, c("ate")] &lt;- 1
  luc&lt;-luc[-c(20:48), ]
  
  ss.rr(var=i2, appr=driver, part=ate, data=luc)
  
  ss.rr(var=i2, appr=driver, part=position, data=luc)
  </code></pre>