Displaying 1 result from an estimated 1 matches for "dm_i".
Did you mean:
d_i
2010 Oct 05
2
Using as.polynomial() over a matrix
...to be made into a polynomial in the equivalent row of (m_p).
I have tried a coupe of things:
------------------------------
1. Using apply()
m_p<-apply(m, 2, as.polynomial)
Here is what happens..
> dim(m)
[1] 40962 3
> m_p<-apply(m, 2, as.polynomial)
> m_p[1:5,]
dM_I dM_a.c dM_a.c.sq
[1,] -0.00593058 -0.000688 3.65e-05
[2,] -0.01913294 0.000103 1.41e-04
[3,] -0.01317958 -0.001190 1.49e-04
[4,] -0.02651112 -0.001550 2.37e-04
[5,] -0.01680289 -0.003520 2.86e-04
So - looks like the coercion hasn't worked. BUT, if I do things piecemeal - it looks ok.....