Dear all R users,
 
Thank you Gabor, and Mark for spending some times on my problem. But I want to move little bit further. I want to show some basic features interactively. I want to move my mouse pointer through the X axis. In graphics window I want to show that, for a particular position of pointer in X-axis, there will be a vertical straightline from that position, which will cull the curve at a point, and from this point another horizontal straight line will be there, which will cut to Y-axis at a particular point. And upon moving my pointer along X-axis, that mapping-point in Y-axis will also move along y-axis accordingly. I also want to mark the position of X-axis point and Y-axis point interactively. 
 
I know there is a package "TeachingDemos" for creating this type of interactive picture. But I really dont know how to apply this in my problem.
 
Can anyone give me any suggestion? Your help will be highly appreciated.
 
Thanks and regards,


----- Original Message ----
From: Gabor Grothendieck <ggrothendieck@gmail.com>
To: Ron Michael <ron_michael70@yahoo.com>
Cc: r-help@stat.math.ethz.ch
Sent: Wednesday, April 18, 2007 10:08:32 PM
Subject: Re: [R] Problem with ?curve


Your chipply function is not vectorized. See ?curve and try:

curve(Vectorize(chippy)(x), 1, 20, n=200)


On 4/18/07, Ron Michael <ron_michael70@yahoo.com> wrote:
>
> Dear all R gurus,
>
>
>
> I have following syntax:
>
>
>
> y = c(1:10)
> chippy <- function(x)
>        {
>         y[5] = x
>         sin(cos(t(y)%*%y)*exp(-t(y)%*%y/2))
>        }
> curve(chippy, 1, 20, n=200)
>
>
>
> But I am getting error while executing :
>
>
>
> Error in xy.coords(x, y, xlabel, ylabel, log) :
>        'x' and 'y' lengths differ
> In addition: Warning message:
> number of items to replace is not a multiple of replacement length
>
>
> Can anyone tell me how I can recover?
>
>
>
> Thanks
>
> Ron
>
>
>
>
>
>
>
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@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
> and provide commented, minimal, self-contained, reproducible code.
>

Send instant messages to your online friends http://uk.messenger.yahoo.com 
	[[alternative HTML version deleted]]

