[R] Interpolation

Remigijus Lapinskas remigijus.lapinskas at maf.vu.lt
Wed Feb 12 11:54:02 CET 2003


Dear all,

I have two vectors and connect the points by line segments:

x <- c(1990,1994,1995,1997)
y <- c(30,40,80,20)
plot(x,y,type="l")

I want to get the values of y's on these lines at missing x's,
i.e., at 1991,1992,1993,and 1996. Is there a simple way to do this?

Best regards,
Remigijus                          mailto:remigijus.lapinskas at maf.vu.lt




More information about the R-help mailing list