Add two lines on graph using abline in R

0 votes
I'm working with two variables:

x=rnorm(10, 5, 1) x=c(rnorm(10, 5, 1) x=c(rnorm(10

y=rnorm(10, 5, 1) y=c(rnorm(10, 5, 1) y=c(rnorm(10

I want to plot a vertical line at the corresponding x value of the maximum y. I tried abline(v=max(y)) but that did not bring the line up. I am able to get a horizontal line for that max(y) but no vertical line for the corresponding x. I want two line on the point, essentially.
Jun 13 in Data Science by Avinash
• 1,060 points
5 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Data Science

0 votes
0 answers

How to implement Knn-algorithm without using k-nn function in r?

Is there a website to which I ...READ MORE

6 days ago in Data Science by Avinash
• 1,060 points
5 views
0 votes
0 answers

Introduction to Statistical Learning with Applications in R Figure Codes

I recently bought the following book: An Introduction ...READ MORE

Jun 1 in Data Science by avinash
• 760 points
19 views
0 votes
0 answers

Difference between the == and %in% operators in R

The question concerns the practical difference between ...READ MORE

Jun 1 in Data Science by avinash
• 760 points
11 views
0 votes
0 answers

Difference between the == and %in% operators in R

The question concerns the practical difference between ...READ MORE

Jun 1 in Data Science by avinash
• 760 points
9 views
0 votes
0 answers

How to make loop for one-at-a time logistic regression in R?

The question concerns the practical difference between ...READ MORE

Jun 1 in Data Science by avinash
• 760 points
14 views
0 votes
1 answer

do-while loop in R

Unlike for and while loops, which test the loop condition at ...READ MORE

answered Jun 1 in Data Science by Sohail
• 740 points
18 views
0 votes
1 answer

What does c do in R?

The c function in R programming usually stands ...READ MORE

answered Jun 1 in Data Science by Sohail
• 740 points
14 views
0 votes
1 answer

Creating new Functions with Linear Regression in R :

When we want to create a model ...READ MORE

answered Jun 1 in Data Science by Sohail
• 740 points
22 views
0 votes
0 answers

plotting in different shapes using pch= argument

How can we assign a particular shape ...READ MORE

Jun 2 in Data Science by avinash
• 760 points
20 views
0 votes
0 answers

How To Create Vector of Vector In R

have lines like this in your supplied ...READ MORE

Jun 10 in Data Science by Avinash
• 1,060 points
10 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP