I have a density plot graphed using:
plot(density(x))
What I am interested in doing is creating a line for something like x = 5 from the x-axis to the corresponding spot on the curve.
Like this:

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do this by first storing the density values in an object, and then retrieving the
xandyelements from this object. In the following example I usefindIntervalto retrieve the y-value for the given x-value: