al Message-
> From: Nestor Fernandez [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 20, 2007 4:02 AM
> To: [EMAIL PROTECTED]
> Cc: Greg Snow
> Subject: Re: [R] Smooth line in graph
>
> Sorry, I answered too quickly.
> It worked with the "simplif
Sorry, I answered too quickly.
It worked with the "simplified" example I provided but not with
non-regular intervals in x:
x<-c(-45,67,131,259,347)
y <- c(0.31, 0.45, 0.84, 0.43, 0.25)
plot(x,y)
lines(spline(x,y, method='n', n=250))
#or:
lines(predict(interpSpline(x, y)))
Produce the same decre
Both worked, thanks!
N. Fernandez
> Katharine Mullen:
>
> require(splines)
> x<-1:5
> y <- c(0.31, 0.45, 0.84, 0.43, 0.25)
> yy <-predict(interpSpline(x, y))
> plot(x, y)
> lines(yy)
>
> Greg Snow:
> lines(spline(x,y, method='n', n=250))
__
R-help@
Try:
> lines(spline(x,y, method='n', n=250))
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Nestor Fernandez
> Sent: Wednesday,
how about:
require(splines)
x<-1:5
y <- c(0.31, 0.45, 0.84, 0.43, 0.25)
yy <-predict(interpSpline(x, y))
plot(x, y)
lines(yy)
Katharine Mullen
mail: Department of Physics and Astronomy, Faculty of Sciences
Vrije Universiteit Amsterdam, de Boelelaan 1081
1081 HV Amsterdam, The Netherlands
ro
5 matches
Mail list logo