[R] Matrix Approx
onewastedlife
onewastedlife at gmail.com
Thu Oct 20 16:44:36 CEST 2011
Need help with finding out approx over each row of a matrix. Here is the setup:
years <- matrix(c(1,2,3,1,2,3),nrow=2, ncol=3,byrow=TRUE)
rates <- matrix(c(1,2,3,11,12,13), nrow = 2, ncol=3, byrow=TRUE)
points <- matrix(c(1.5, 1.5), nrow=2, ncol=1, byrow=TRUE)
so basically i have above three vectors years is the X vector, rates is the Y vector and points is the points at which each row of X, Y has to be interpolated.
I have tried every possible combination of approx & apply but i am unable to figure out.
Any help will be greatly appreciated.
--
Ramneek
More information about the R-help
mailing list