TABLE OF CONTENTS
- 1. utility/A
utility/A [ Functions ]
NAME
A --- time in an interval
FUNCTION
Computes the amount of time in interval (a[r,s-1], a[r,s]) prior to time t
SYNOPSIS
457 A <- function(t, as, r, s)
INPUTS
t time as matrix of breakpoints r stratum s interval
SOURCE
460 { 461 s <- s + 1 462 if(s == 0){ return(0)} 463 if(t < as[r, s - 1]){ return(0)} 464 if(t >= as[r, s]){ 465 return(as[r, s] - as[r, s - 1]) 466 } 467 return(t - as[r, s - 1]) 468 }