[R] Draw a circle at the end of a line
Jue.Wang2 at sanofi-aventis.com
Jue.Wang2 at sanofi-aventis.com
Thu Oct 12 19:32:08 CEST 2006
I have a plot of cumulative distribution function which is a step function,
I'd like to put a cycle at the right end of each line to indicate that the value here is not available in this line.
How can I do that?
Thank you.
cdf<-function(x){
do.call("rbind",lapply(1:nrow(as.matrix(x)), function(i){
a<-x[i]
if (a<0.5){b=0.1}
else if (a<1){b=0.3}
else if (a<1.5){b=0.5}
else if (a<2.5){b=0.7}
else if (a<3){b=0.9}
else b<-1
}))}
xx<-seq(0,3.5,by=0.01)
pp<-cdf(xx)
plot(xx,pp)
Jue Wang, Biostatistician
Contracted Position for Preclinical & Research Biostatistics
PrO Unlimited
(908) 231-3022
More information about the R-help
mailing list