title: how to find the numbers of all curves
body: <p>I have a data which looks like the following </p>
  
  <pre><code>## the same as: sf &lt;- spectrum((AirPassengers), spans = c(3, 3), plot = FALSE)
  sf &lt;- spec.pgram((AirPassengers), spans = c(3, 3), plot = FALSE)
  x &lt;- sf$freq
  y &lt;- log(sf$spec)
  plot(x, y, type="l", col="red" )
  </code></pre>
  
  <p>I want to find:</p>
  
  <ul>
  <li>the number of curve that are in this data (in this case 5) </li>
  <li>the beginning value that the curve start and the end value that a curve finishes.</li>
  </ul>