title: New to R, "unexpected symbol error" caused by typo
body: <p>I am trying to write a table legend in R using this line of code: </p>
  
  <pre><code>legend("bottomright", inset=c(0,-0.7), c("valley", "ridge"),  pch=c(2,17) col=c("red", "blue"), bty="n", xpd=TRUE)
  </code></pre>
  
  <p>I keep receiving this error code:       </p>
  
  <pre><code>Error: unexpected symbol in "legend("bottomright", inset=c(0,-0.7), c("valley", "ridge"),  pch=c(2,17) col"
  </code></pre>
  
  <p>I have tried fixing my line of code, but at this point I am not sure what the problem is. Any and all help would be appreciated! Thanks! </p>