title: Error: (list) object cannot be coerced to type 'logical' adding legend
body: <p>I am having trouble with a <code>legend</code> in <code>R</code>. I am working with survival data and I have two kaplan meir curves. I need to identify each one in my plot. I am using legend and this is what I have tried: </p>
  
  <pre><code>plot(kmenfprimaria.dos.inicio, ylab="2B. Probabilidad de supervivencia", 
       family="Times Roman", xlab="Tiempo en días", 
       sub="Mediana: LLA 175 IC 95% (142-295); LMA: 159 IC 95% (59-NR). p(log-rank)=0.783",
       ps=3, cex.main=0.9, cex.sub=0.7, cex.lab=0.7, 
       main="Supervivencia por diagnóstico", cex.main=0.9, lty=c(1,2), lwd=2, 
       legend(450, 0.8,legend= c("LLA","LMA"), lty=c(1,2), lwd=2))
  </code></pre>
  
  <p>Error: (list) object cannot be coerced to type 'logical'</p>
  
  <p>I dont know what to do to coerce object. </p>