Dear all, I would like to calculate the complementary cumulative distribution function. As it is known, the ccdf is the 1-ecdf(X)==1-F(x). (From ?ecdf help is shown that ecdf returns a function which is the F(x)
I would like to use that function inside my function and after call curve (which accepts function as input). My code looks like that onVector<-seq(1:100) offVector<-seq(101:200) myecdfOn<-function(onVector){1-ecdf(onVector)} # This gives the ccdf curve(myecdfOn,from=1,to=max(c(onVector,offVector)), add=TRUE,lwd=2) Unfortunately fails and I can not really see what is he problem of it. Could you please help me? B.R Alex [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.