-2

I have a dataframe which looks like the following:

229 2014-03-11                     6071           
230 2014-03-12                     6071   12 (1.2)
231 2014-03-13                     6080           
232 2014-03-14                     6090           
233 2014-03-15                     6096           
234 2014-03-16                     6084           
235 2014-03-17                     6096           
236 2014-03-18                     6104           
237 2014-03-19                     6111           
238 2014-03-20                     6123           
239 2014-03-21                     6121           
240 2014-03-22                     6141 15 (2.0.1)
241 2014-03-23                     6146           
242 2014-03-24                     6153           

I need to plot date vs second column and at the same time show software version release on the graph.

I've tried to use plot() function but it only shows second column and I can't figure out how to add the second one.

YKY
  • 2,493
  • 8
  • 21
  • 30
  • 1
    Please read the info about [how to ask a good question](http://stackoverflow.com/help/how-to-ask) and how to give a [reproducible example](http://stackoverflow.com/questions/5963269). This will make it much easier for others to help you. – zx8754 Apr 08 '16 at 13:51

1 Answers1

1

Try this example:

# Example data
df <- data.frame(
  x = 1:5,
  value = 1:5,
  label = c(NA, NA, "a", NA, "b")
)

# plot
plot(df$x, df$value)

# add labels
text(df$x, df$value, df$label, pos = 4)

enter image description here

zx8754
  • 52,746
  • 12
  • 114
  • 209