David Scott's ASH routines ported from S-PLUS to R.