R programming: For graphics

0 votes
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 15 in Data Analytics by Sophie may
• 9,050 points
25 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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 15 by Tyrion anex
• 8,280 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
• 9,050 points
35 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 in Data Analytics by Sophie may
• 9,050 points
35 views
0 votes
2 answers

Installing MXNet for R in Windows System

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

answered Dec 3, 2018 in Data Analytics by Kalgi
• 35,800 points
182 views
0 votes
1 answer

AUC for 3-Class prediction in R

Use type='probs' inside predict() function, so that ...READ MORE

answered Apr 4, 2018 in Data Analytics by Bharani
• 4,550 points
82 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
• 9,050 points
96 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 27, 2018 in Data Analytics by Sophie may
• 9,050 points
33 views
0 votes
1 answer

R Programming: Market Basket Analysis Error

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

answered Feb 11 in Data Analytics by Sophie may
• 9,050 points
60 views
0 votes
1 answer

R Programming: regexpr error

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

answered Feb 21 in Data Analytics by Tyrion anex
• 8,280 points
15 views
0 votes
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,280 points
10 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,280 points
19 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.