[RkWard-devel] ecdf & rug

SJR stefan_roediger at gmx.de
Mon Dec 18 00:08:00 UTC 2006


Am Montag, 18. Dezember 2006 00:22 schrieb Thomas Friedrichsmeier:
> Hi Stefan,
>
> On Monday 18 December 2006 00:04, SJR wrote:
> > I'm trying to implement "rug(x)" as an option to the ecdf plot. Basically
> > it's working, by the means that I get rug(x) in an graph output. But
> > there is also the  output of the data which I cant explain myself.
> > Any comments?
>
> rug (x) returns x (invisibly). Hence, when you do "cat (rug (x))", first
> the rug is plotted, then the value is printed (same thing happens, if you
> use x11 () instead of rk.graph.on ()).
> The solution should be to simply remove the "cat (...)", i.e. simply:
>
> if (dorug) rug(<? echo ($x); ?>)
>
> instead of
>
> if (dorug) cat ((rug(<? echo ($x); ?>)))
>
> Regards
> Thomas

Thanks for the prompt answer! Fixed. Well this makes a lot of sense. I'll pay 
attention to it in other situations!

I wonder if I should create another plug-in to embed things like rug, jitter, 
abline, ... . Would certainly be beneficial for other plot  types. What do 
you think?




More information about the Rkward-devel mailing list