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,610 points
381 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

+1 vote
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,610 points
425 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,610 points
402 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,440 points
446 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,360 points
1,905 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,610 points
2,856 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,610 points
466 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,610 points
1,217 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
381 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
455 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,517 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