title: Adding data labels to points in ggplot: label argument not working
body: <p>I know that this question has been answered a few times <a href="https://stackoverflow.com/questions/43176864/how-to-add-data-labels-to-ggplot">here</a> and <a href="https://stackoverflow.com/questions/23066039/ggplot-add-data-label-to-points">here</a>. The key point seems to be to include the argument <code>label</code> in <code>aes</code>. But, for me ggplot does not accept <code>label</code> as an argument in <code>aes</code>. I tried using the generic function <code>labels</code> in aes as below, but that didn't work to create labels for points, though I am able to generate a graph:</p>
  
  <pre><code>  launch_curve &lt;- ggplot(data = saltsnck_2002_plot_t,aes(x=weeks,y=markets, labels(c(1,2,3,4,5,6,7,8,9,10,11,12))))+
      geom_line()+geom_point()+
      scale_x_continuous(breaks = seq(0,12,by=1))+
      scale_y_continuous(limits=c(0,50), breaks = seq(0,50,by=5))+
      xlab("Weeks since launch")+ ylab("No. of markets")+
      ggtitle(paste0(marker1,marker2))+
      theme(plot.title = element_text(size = 10))
    print(launch_curve)
  </code></pre>
  
  <p>Does anyone know a way around this? I am using R version 3.4.3.</p>
  
  <p><strong>Edited to include sample data:</strong>
  The data that I use to plot is in the dataframe <code>saltsnck_2002_plot_t</code>. (12 rows by 94 cols). A sample is given below:</p>
  
  <pre><code>&gt;saltsnck_2002_plot_t
  
         11410008398 11600028960 11819570760 11819570761 12325461033 12325461035 12325461037
  Week1            3           2           2           1           2           2           1
  Week2            6          16          10           1           3           2           2
  Week3           11          41          13          10           3           3           2
  Week4           15          46          14          14           3           4           4
  Week5           15          48          15          14           3           4           4
  Week6           27          48          15          15           3           4           4
  Week7           31          50          15          15           3           4           5
  Week8           33          50          16          16           5           5           6
  Week9           34          50          18          16           5           5           6
  Week10          34          50          21          19           5           5           6
  Week11          34          50          23          21           5           5           6
  Week12          34          50          24          23           5           5           6
  </code></pre>
  
  <p>I am actually plotting graphs in a loop by moving through the columns of the dataframe. This dataframe is the result of a transpose operation, hence the weird row and column names. The graph for the first column looks like the one below. And a correction from my earlier post, I need to capture as data labels the values in the column and not c(1,2,3,4,5,6,7,8,9,10,11,12).</p>
  
  <p><a href="https://i.stack.imgur.com/MEiqi.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MEiqi.jpg" alt="enter image description here"></a></p>