[R] Specifying Splits WhenUusing rpart

Terry Therneau therneau at mayo.edu
Fri May 20 15:06:07 CEST 2011


> I'd like to force rpart to use a specific variable, namely "spec" as
> the first split and then allow it to proceed as usual.  Is there a way
> to do this?

  You can often get this effect by using the "cost" argument.  Make the
variable in question have very low cost.

Terry Therneau



More information about the R-help mailing list