Andra Tolbus
2011-Jun-12 15:43 UTC
[R] plot probabilities of occurrence of values in a vector using connected points
Hi all, I have been struggling with some plotting issues (maybe not that difficult but I am stuck). If I have 2 vectors : 1st with average values of the columns of a data frame, which, looks similar to : v: (1.4,3,3,3,4.5,0,0,0,0,0,0,0,25.5,6,6,4.2) 2nd with the probability of occurrence of each element of the first vector calculated like this : prob[i]=v[i]*100/sum(v). I would like to plot points representing, on the x axis the values of v, and on the y axis the probabilities: a(prob[i],v[i]). Afterwards I want to connect them by a line and calculate the confidence intervals for this "distribution". I tried to plot using the *points* function, but, somehow it shows a perfect linear distribution - and it shouldn't. It should look more like a density function. Any suggestions? Best, Andra [[alternative HTML version deleted]]