6/3/01:  Incorporate changes suggested by Brian Ripley.
  including: use of Sint in all the C code
	     the print function for classifcation shouldn't cut the printoff
		short at 4 catetories, rather print fewer digits
	     help file fixes


10Jun01: Added a "cost" argument.  This allows one to weight the variables
considered at a split point.  For instance, one lab test might be much
more expensive than another, and we would like it to give at least 10%
"better" separation before choosing it.  A cost of 1.1 would suitably
divide the improvement values for that variable.

   A future use for costs might be in creation of a set of tools for
direct tree manipulation.  For instance, a user clicks on a node and
indicates that "age" should be used to split it.  Then a call with
maxdepth=1 and an age cost of .001 would reveal the results of such a
split, separate calls for the two daughter nodes fill in the tree below,
and then the three results pasted together, all without recourse to new
C code.  Any volunteers?

15Jun01: If two death times differed only by round-off error, rpart.exp
would fail by returning lots of NA values.  Rewrite the function, both to
correct this and to extend it to (start,stop] data.  The file rpartexp.c
is no longer used, rpartexp2.c has replaced it.
  Two changes in behavior: a) follow-up time after the last death now is
counted in computing the rescaling and b) the number of intervals for
rescaling is restricted to be <=1000.  The latter helps speed up very large
data sets.

15Jun01: Add some suggestions to rpart.class, rpart.exp, and rpart.poisson
from Jim Schimert at StatSci.

20Jun01: Fix the class probabilities.  In adding weights I tried to simplify
the code, and got it wrong.  Return to the old.  (This only affects the
printout of within-node class probabilities -- the trees were computed
correctly).

3Jul01: More updates from Jim S: if observations were deleted due to missing
values, elements may need to be removed from the xval vector.  Also, save
the missing value attributes.

3Jul01: Change the code for trees that have no splits.  Old output: an
error message.  New output: a tree.  The labels.rpart and summary.rpart
routines had to have a few lines added to them to avoid computations on
the 0 row "split" matrix, rpart a few additions for similar reasons, and
rpart.c had the error message removed.  Everything else worked.
  Open question: should the code give a warning message?  I think not.

5Jul01: Fixes to xpred.rpart due to Jim S: if observations were
deleted due to missing values, elements may need to be removed from
the xval vector, and a missing "else" if X is present.

28Jul01: More fixes pointed out by Brian Ripley.  
  The rpart.poisson routine had "+ exp(offset)" when it should be "*".
  The resdiuals.rpart routine had never been fixed up wrt the changes made
to incorporate user-mode splits, in particular still referred to the now
departed "yprob" element of an rpart object.  The routine has been rewritten
extensively and the documentation updated.
  The predict.rpart routine had changed default behavior for class trees;
restore the default to 'prob' output.

5Sep01: Small bug in residuals.rpart (wrong source for loss matrix), pointed
out by Michael Conklin.

26Oct01: Change to graycode.c, so that it returns the "done" code
earlier.  In the >2 categories y vs categorical x situation, I was
evaluating every possible split twice.  (This was one of those
"subscripts start at 0 vs 1" mental mistakes.  The loop moves
x-categories back and forth between the left hand and right hand
groups.  However, since a split ABC vs D is the same as D vs ABC, the
last group in the list does not have to be shifted back and forth.)

30Oct01: Fix the prune.rpart and snip.rpart functions to match the 3July
change, i.e., allow them to prune a tree down to only its root.  For snip
this just meant commenting out the lines that complain about such a severe
trimming, and for snip the addition of "drop=F" to one subscripting operation.
Bug pointed out by Ivan Ordonez.

