Skip to content
Prev 69880 / 398506 Next

cumsum on chron objects

On 5/17/05, Sebastian Luque <sluque at mun.ca> wrote:
The 'zoo' package has na.locf which stands for Last Occurrence Carried
Forward, which is what I believe you want.   

First let us create some test data, x:
[1] (01/02/70 12:00:00) (01/03/70 00:00:00) (NA NA)            
[4] (NA NA)             (01/05/70 00:00:00) (NA NA)
[1] (01/02/70 12:00:00) (01/03/70 00:00:00) (01/03/70 00:00:00)
[4] (01/03/70 00:00:00) (01/05/70 00:00:00) (01/05/70 00:00:00)