title: Adding a legend to a ggplot()
body: <p>Here is my code for a ggplot with multiple lines, however I wanted to add a legend which labelled the black line as "Close price" and the Blue as "RSI"</p>
  
  <pre><code>
  pRSI&lt;-getSymbols("AAPL",src = "yahoo", from="2010-01-01",to="2014-02-01",auto.assign=F)
      df&lt;-as.data.frame(pRSI)
      df&lt;-df[complete.cases(df),]
      n&lt;-nrow(df)
      df$RSI&lt;-RSI(df[,4],n=14,wts=df[,6])
      ggplot()+
          geom_line(data=df,aes(y=RSI,x=c(1:n)),color="blue")+
          geom_line(data=df,aes(y=df[,4],x=c(1:n)),color="black")+
          xlab('Data Point')+
          ylab('Price')
  
  </code></pre>