0

I have two variables that I'd like to show on the side of a plot that I've already created, alongside their results

London <- nrow()
NewYork <- nrow()
London
[1] 22
NewYork
[1] 10

This is what I've tried

PreviousPlot + labs(legend = London , NewYork)

Thanks a lot in advance

1
  • 1
    There's an annotate function. Usage" p + annotate("text", x = 4, y = 25, label = "Some text") Commented Feb 2, 2020 at 19:24

1 Answer 1

1
London = 22
NewYork = 10

graphics.off()
plot(1, 1)
legend("topright", legend = c(bquote(.(London)), bquote(.(NewYork))))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.