[R] Loess question

Steve Lianoglou
Thu, 30 Jul 2009 13:48:26 -0000

Hi,

On Jul 30, 2009, at 9:35 AM, njhuang86 wrote:

> Hi, suppose I have a vector of values in 'A'. Suppose I use:
> scatter.smooth(A) to add in a smooth curve. Is there a way to obtain
> the
> maximum value of the smoothed curve? Anyways, any help will be greatly
> appreciated!

Look at the help for scatter.smooth: ?scatter.smooth

You'll also find the loess.smooth function -- in the Values section of
the help, you'll see that loess.smooth returns the x/y vals of the
smoothed line that's plotted.

Can you just use that and get the max of the result$y you get back?
Something like:

smoothed <- loess.smooth(my.x, my.y)
max(smoothed$y)

-steve

--
Steve Lianoglou
Graduate Student: Computational Systems Biology
   |  Memorial Sloan-Kettering Cancer Center
   |  Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact