title: Change ggplot legend title
body: <p>So this is my code for my ggplot. How do I easiest change the title of the legend? I know that I can just change my <code>gg_group</code> variable to <code>my_title &lt;- c(rep("train",10), rep("validation", 10))</code>. But i want to just change the title to "<code>whatever I want</code>" without change any variables.</p>
  
  <pre><code>library(ggplot2)
  y &lt;- c(rnorm(10,1), rnorm(10,3))
  x &lt;- rep(seq(1,10,1),2)
  gg_group &lt;- c(rep("train",10), rep("validation", 10))
  
  gg_data &lt;- data.frame(y=y, x=x, gg_group=gg_group)
  
  p &lt;- ggplot(gg_data, aes(x=x, y=y, group=gg_group))
  p + geom_line(aes(colour=gg_group))
  </code></pre>
  
  <p>I have also tried this code:</p>
  
  <p><code>p + geom_line(aes(colour=gg_group)) +
   scale_shape_discrete(name="Dataset",labels=c("Train", "Validation"))</code>  </p>
  
  <p>But this does not work. *Edit, check great snwer from Jaap and JasonAizkalns.</p>