[R] help with the coordinates of the ECDF object

Murray Pung Murraypu at aimnsw.com.au
Wed Nov 2 02:34:36 CET 2005


If you wish to apply labels to identified points: I am sure there is a better way, but what I have done is use

locator(n)  #n is how many points you wish to identify. Then click on the points. The coordinates of each point are returned.

Then I use

identify(x, y, labels = My Label)

...for each point identified. It would be great if you could click on the points and have them identified & labelled, but I'm not sure how to do it.

-----Original Message-----
From: klebyn [mailto:klebyn at yahoo.com.br]
Sent: Wednesday, 2 November 2005 12:25 PM
To: r-help at stat.math.ethz.ch
Subject: [R] help with the coordinates of the ECDF object




Hi all R users


I would like to know how acess the coordinates
of the ECDF object.

I look for the example,
in this part:
######################
     print(ls.Fn12 <- ls(env= environment(Fn12)))
######################

but I do not know to extract
the Y coordinate and put it in other variable.

My objective is to make a plot
and identify the points with labels.


############# Example by  ?ecdf

 y <- round(rnorm(12),1); y[3] <- y[1]
     Fn12 <- ecdf(y)
     Fn12
     print(knots(Fn12), dig=2)
     12*Fn12(knots(Fn12)) ## ~= 1:12  if there were no ties

     summary(Fn12)
     summary.stepfun(Fn12)

     print(ls.Fn12 <- ls(env= environment(Fn12)))
     ##[1] "f"  "method"  "n"  "x"  "y"  "yleft"  "yright"

############# Example by  ?ecdf


My objetive seems to this:

plot(Fn12)
identify( x = knots(Fn12),  y = ??????????, labels="my string set")

or text...


thanks in advanced

klebyn

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list