R programming For graphics

+1 vote
How do I write the following as the legend at the top left of a graph?

(\gp_1,\gp_2)=(8,7)

Here, 8 and 7 come from the value of the variables gp1 and gp2, assigned in the program.
Mar 16, 2019 in Data Analytics by Sophie may
• 10,620 points
761 views

1 answer to this question.

0 votes

Use the bquote to write the expression and place your variables gp1 and gp2 within .():

gp1 <- 7
gp2 <- 8
plot(1,1)
legend("topleft", legend=bquote((gp[1]*","*gp[2])==(.(gp1)*","*.(gp2))))
answered Mar 16, 2019 by Tyrion anex
• 8,700 points

Related Questions In Data Analytics

0 votes
1 answer

Can we have an if loop inside a for loop in R programming?

You're If loop doesn't have any condition ...READ MORE

answered Dec 21, 2018 in Data Analytics by Sophie may
• 10,620 points
695 views
0 votes
1 answer

Does R provide support for tacit programming?

R has a package called magrittr. That's ...READ MORE

answered Jan 17, 2019 in Data Analytics by Sophie may
• 10,620 points
601 views
0 votes
1 answer

For loop in R programming.

Hi@akhtar, You can create a loop in R ...READ MORE

answered Oct 6, 2020 in Data Analytics by MD
• 95,460 points
714 views
0 votes
2 answers

Installing MXNet for R in Windows System

You can install it for python in ...READ MORE

answered Dec 4, 2018 in Data Analytics by Kalgi
• 52,350 points
2,432 views
0 votes
1 answer

R programming: Unexpected symbol error

Format your code this way: myfunction <- function() ...READ MORE

answered Dec 17, 2018 in Data Analytics by Sophie may
• 10,620 points
3,256 views
0 votes
1 answer

R Programming error in 'fert'

You're using a factor: fert <- factor(c(50,20,10,10,20,50)) levels(fert) #[1] ...READ MORE

answered Dec 28, 2018 in Data Analytics by Sophie may
• 10,620 points
727 views
+1 vote
1 answer

R Programming: Market Basket Analysis Error

The basket.sorted() has less than 5 rules. Refer ...READ MORE

answered Feb 12, 2019 in Data Analytics by Sophie may
• 10,620 points
1,514 views
+1 vote
1 answer

R Programming: regexpr error

The below code will help: gregexpr("D", x) # [[1]] # ...READ MORE

answered Feb 21, 2019 in Data Analytics by Tyrion anex
• 8,700 points
630 views
+1 vote
1 answer

R programming error

Alright, you can either use gsub to match the ...READ MORE

answered Dec 18, 2018 in Data Analytics by Tyrion anex
• 8,700 points
664 views
0 votes
1 answer

Check if a matrix is diagonalizable in R Programming Language

On a given matrix, a, the first way ...READ MORE

answered Dec 24, 2018 in Data Analytics by Tyrion anex
• 8,700 points
1,820 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP