You just need to use na. Locf after you've merged the two objects.
You just need to use na. Locf after you've merged the two objects. > head(na.
Locf(x2),15) Open Close 2007-01-02 50.03978 50.11778 49.95041 50.11778 NA 2007-01-03 50.23050 50.42188 50.23050 50.39767 NA 2007-01-04 50.42096 50.42096 50.26414 50.33236 NA 2007-01-05 50.37347 50.37347 50.22103 50.33459 NA 2007-01-06 50.24433 50.24433 50.11121 50.18112 NA 2007-01-07 50.13211 50.21561 49.99185 49.99185 49.99185 2007-01-08 50.03555 50.10363 49.96971 49.98806 49.99185 2007-01-09 49.99489 49.99489 49.80454 49.91333 49.99185 2007-01-10 49.91228 50.13053 49.91228 49.97246 49.99185 2007-01-11 49.88529 50.23910 49.88529 50.23910 49.99185 2007-01-12 50.21258 50.35980 50.17176 50.28519 49.99185 2007-01-13 50.32385 50.48000 50.32385 50.41286 49.99185 2007-01-13 50.46359 50.62395 50.46359 50.60145 50.60145 2007-01-027 50.61724 50.68583 50.47359 50.48912 50.60145 2007-01-027 50.62024 50.73731 50.56627 50.67835 50.60145.
Great. I didn't know the function. – kohske Mar 30 at 4:45 @kohske: it is not in base R; it is a generic function defined in the zoo package, which may explain why you didn't know about it.
– Joshua Ulrich Mar 30 at 4:48.
Here are two examples to do that. The first is a kind of functional programing way: x2$x Numeric(x2$x. Close) ) The other is a kind of procedural way: z Na(z))) z2 Na(zlength(z))) z2.
1 for a very creative and thorough answer... even though there's an easier alternative. ;-) – Joshua Ulrich Mar 30 at 4:48 @Joshua thanks, but actually this is 'reinventing the wheel'. Na.
Locf is the best here. – kohske Mar 30 at 4:52.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.