title: Svm missing value where TRUE/FALSE needed in R
body: <p>I'm trying to implement binary svm. I've got the following error message:</p>
  
  <pre><code>Error in if (any(co)) { : missing value where TRUE/FALSE needed
  </code></pre>
  
  <p>For the following code:</p>
  
  <pre><code>library(e1071)
  dataset &lt;- read.csv("C:/Users/Backup/Desktop/pos.csv")
  # Subset the dataset dataset to only 2 labels and 2 features
  dataset.part = subset(dataset, label != 1)
  dataset.part$label = factor(dataset.part$label)
  
  
  # Fit svm model
  fit = svm(label ~ ., data=dataset.part, type='C-classification',   kernel='linear')
  </code></pre>
  
  <p>I'm getting the error on this line of code:</p>
  
  <pre><code># Fit svm model
  fit = svm(label ~ ., data=dataset.part, type='C-classification', kernel='linear')
  </code></pre>
  
  <p>I'm a beginner in R and i don't know how to solve this. Could any one help me?</p>