By sourcing the contents of this function definition (updated Jun. 2001 to improve computational efficiency) you will create the S function "avg.surv". A corresponding help file can be placed in a file caled "avg.surv" in a .Help sub-directory of any attached directory. Typing ?avg.surv will call it up.
The previous version of the avg.surv function can be found here.