0

I am following use the answer to the question Add dynamic subtitle using ggplot in the following way:

      ggtitle(bquote(atop(.(df$fname[row]),
                          atop(italic(.(param_string)), ""))))

When I look at my graphs, I am seeing:

enter image description here

Rather than the actual value of df$fname[row], which has been verified independently to be something else.

What's going on here?

Community
  • 1
  • 1
Tinker
  • 4,165
  • 6
  • 33
  • 72

1 Answers1

1

Try this :

 ggtitle(bquote(atop(.(paste(df$fname[row])),atop(italic(.(param_string)), ""))))
Anuja Parikh
  • 53
  • 1
  • 14
  • Thanks that worked. Can you explain why this is the case? – Tinker Jul 16 '15 at 06:45
  • many times when the column has string objects its pastes the factor number instead . for eg if a column had red blue green as values then it will print 1 for red , 2 for blue , 3 for green. U just have to try both ways and see how u get the result – Anuja Parikh Jul 16 '15 at 09:50