I have no idea what you are trying to do, but the line that fails is the last line, because you haven't mapped new x and y variables in the mapping geom_text() needs x and y coords but you only provide the label argument, so ggplot takes x and y from p which has only 7 rows of data whilst Tlabel is of length 10. That explains the error. I presume you mean to plot at x = A and y = B of TData?
If so, this works.
I have no idea what you are trying to do, but the line that fails is the last line, because you haven't mapped new x and y variables in the mapping. Geom_text() needs x and y coords but you only provide the label argument, so ggplot takes x and y from p, which has only 7 rows of data whilst Tlabel is of length 10. That explains the error.
I presume you mean to plot at x = A and y = B of TData? If so, this works: p + geom_text(data=TData, mapping = aes(A, B, label=Tlabel), size=3, vjust=1.35, colour="black").
Thanks Gavin Simpson for your help. – MYaseen208 Sep 16 at 21:25.
(This might get a better answer on the ggplot mailing list. ) It looks like you're trying to display some kind of biplot ... the root of your problem is that you're violating the idiom of ggplot, which wants you to specify variables in a way that's consistent with the scope of the data. Maybe this does what you want, via some aes_string trickery that substitutes the names of the desired columns ... varnames.
PS it would be nice to displace the second set of labels in the same direction as the arrows so they were always "in front" of the arrows, but I don't know a really quick way to do that. – Ben Bolker Sep 16 at 21:30 Yes I'm trying to display a biplot. Thanks for nice answer.
Thanks again. – MYaseen208 Sep 16 at 21:40 @ Ben Bolker: Cool idea about the direction of labels for arrows. – MYaseen208 Sep 16 at 22:34 @Ben Bolker.
There you go, giving the kids crazy ideas: See what you caused? Stackoverflow. Com/questions/7451116/… – DWin Sep 17 at 5:23.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.