title: 'x' must be atomic for 'sort.list' Have you called 'sort' on a list? with knn.cv
body: <p>I am not sure why i am getting this error, I am trying to run cross validation with knn.. </p>
  
  <p>which I do as such </p>
  
  <pre><code>knn.cv(trainingDigit,label,k=1)
  </code></pre>
  
  <p>My trainingDigit consist of </p>
  
  <pre><code>str(trainingDigit)
      List of 10
       $ : num [1:400, 1:324] 1 1 0.969 1 0.992 ...
       $ : num [1:400, 1:324] 1 1 1 1 0.831 ...
       $ : num [1:400, 1:324] 1 1 0.98 1 0.996 ...
       $ : num [1:400, 1:324] 1 1 1 1 1 ...
       $ : num [1:400, 1:324] 0.992 1 1 1 1 ...
       $ : num [1:400, 1:324] 0.961 1 1 1 1 ...
       $ : num [1:400, 1:324] 1 0.957 0.961 0.973 0.988 ...
       $ : num [1:400, 1:324] 1 1 1 1 0.937 ...
       $ : num [1:400, 1:324] 1 0.949 0.988 1 1 ...
       $ : num [1:400, 1:324] 1 1 1 0.984 1 ...
  </code></pre>
  
  <p>Basically just data.. and label contains</p>
  
  <pre><code>str(label)
  List of 10
       $ : num [1:400] 0 0 0 0 0 0 0 0 0 0 ...
       $ : num [1:400] 1 1 1 1 1 1 1 1 1 1 ...
       $ : num [1:401] 2 2 2 2 2 2 2 2 2 2 ...
       $ : num [1:400] 3 3 3 3 3 3 3 3 3 3 ...
       $ : num [1:400] 4 4 4 4 4 4 4 4 4 4 ...
       $ : num [1:400] 5 5 5 5 5 5 5 5 5 5 ...
       $ : num [1:400] 6 6 6 6 6 6 6 6 6 6 ...
       $ : num [1:400] 7 7 7 7 7 7 7 7 7 7 ...
       $ : num [1:400] 8 8 8 8 8 8 8 8 8 8 ...
       $ : num [1:400] 9 9 9 9 9 9 9 9 9 9 ...
  </code></pre>
  
  <p>Labeling eas list in trainingDigit.. But when i run it I get this error </p>
  
  <pre><code>'x' must be atomic for 'sort.list'
  Have you called 'sort' on a list?
  </code></pre>
  
  <p>I am not sure i understand why, and what it means.. Could somebody clarify what it means ? what i have to do to fix it?</p>