Changes in version 3.1.4 (2026-01-08) Updated some web addresses in the man pages. Changes in version 3.1.3 (2025-07-26) Updates for CRAN checks in R version 4.5.1. Changes in version 3.1.2 (2024-02-26) Updates for R version 4.3.2. For example, had to change "sort.unique" to "sort_unique". Changes in version 3.1.1 (2022-05-21) Minor updates for R version 4.2.0. Changes in version 3.1.0 (2021-07-24) Minor updates for R version 4.1.0. These updates quieten some warnings from sprintf when prp's trace flag is set. Changes in version 3.0.9 (2020-09-17) We now support models built with rpart(formula, data=func(data)), where the data argument is a function call. Removed the very old function rpart.plot.version1. Quietened the warning for rpartScore models (treat rpartScore as a special case). Minor documentation updates. Updated the libraries shared with the earth and plotmo packages. Updated the test scripts for R version 4.0.3. Changes in version 3.0.8 (2019-08-22) Updated test scripts for the new random number generator that came with R version 3.6.0. Fixed an incorrect warning: ncol(fit) 5 != length(ylevels) 6. This was issued under certain circumstances for multiclass models when a class is never predicted in the training data. The legend for multiclass models now shows classes that are never predicted in the training data, even when rpart doesn't include such classes in yval2. Changes in version 3.0.7 (2019-04-12) Minor documentation updates. Minor updates to the libraries shared with earth and plotmo. This package now requires R version at least 3.4.0. Changes in version 3.0.6 (2018-11-24) Minor changes to internal function calls to prevent warnings when options(warnPartialMatchArgs=TRUE). Test script touchups. Added "LazyData: yes" to the DESCRIPTION file. Changes in version 3.0.5 (2018-11-03) We now handle splits with very small values better (less than 1e-10). Thanks to Petr Lenhard for help on this. Added the "under.percent" argument to control spacing before the percentage when 100 is used with the "extra" argument. Changes in version 3.0.4 (2018-08-13) Variables with values 0 and 1 only are now treated as logical variables if roundint=TRUE i.e. they are displayed as "var is 0" and "var is 1". Rpart.rules now explicitly shows if the model is a null model. We now work better with caret train models. (Extended handling of model$call$data, so rpart.plot no longer issues the warning "Bad data field in model call" with such models.) Documentation updates. Changes in version 3.0.3 (2018-08-06) Survival responses are now once again handled correctly (broken in version 3.0.0). Thanks to Robert Redd for help on this. Added the rpart.predict function for printing the rules for predictions. If rpart.rules(nn=TRUE) we now prepend (rather than append) the node numbers. Tweaks to make the colors more visible in the legend for multiclass models. Documentation updates. Changes in version 3.0.2 (2018-07-26) Documentation fixes. Changes in version 3.0.1 (2018-07-19) Touchups to the documentation and code for rules. Changes in version 3.0.0 (2018-07-12) Added the rpart.rules function to display a set of rules for a tree. Numbers in the displayed tree will now be a little different for some models, because of the following changes: (i) The new roundint argument. With roundint=TRUE (default), we display "nsiblings < 3" instead of "nsiblings < 2.5" if all values of "nsiblings" in the training data are integers (where "nsiblings" could be any variable in the tree, with R type "numeric" or "integer"). See Section 4.1 in the package vignette. If roundint=TRUE and the data used to build the model is no longer available, a warning will be issued. (ii) When applying the digits argument in splits, if the last digit is 5 we now always round up (rather than rounding to even). Thus "x < 12.5" is now rounded to "x < 13" (rather than "x < 12", which was misleading). The old behaviour was an artifact of the fact that base::format rounds to even when the last digit is a 5. Splits on variables of class "logical" are now displayed as "survived = 0" and "survived = 1". In previous versions they were displayed as "survived < 0.5" and "survived >= 0.5". Added the clip.facs argument (default FALSE) to drop predictor names in splits on factors. For example, with clip.facs=TRUE, "pclass = 2nd,3rd" is displayed simply as "2nd,3rd". See Section 4.1 in the package vignette. Changes in version 2.2.0 (2018-05-19) Added new option type=5 (puts the split variable name in the interior nodes). Added new options extra=10 and extra=11. Improved error messages for illegal values of extra. Slightly raised right-hand split labels (type=3 and type=4) because they sometimes were too close to the node box beneath them. The legend for multi-class models now includes all classes, even those classes which are never predicted by the model. Such classes have an "(unused)" suffix in the legend. Documentation touch ups. The vignettes are now compressed with gs and qpdf as in tools::compactPDF, (but that happens outside the standard CRAN build system). It does mean that the tar.gz file for rpart.plot is a little smaller (now 628 kByte). Changes in version 2.1.2 (2017-04-20) Added dependency on R version 3.2.0 (necessary for use of anyNA). The digits argument can now be negative, meaning use the standard R "format" function (with the absolute value of digits). Changes in version 2.1.1 (2017-02-17) Added the BlGnYl palette. Changes in version 2.1.0 (2016-09-26) Added the pal.thresh and pal.node.fun arguments, and the show.prp.palettes function. Tweaked the colors in the palettes (among other issues, grays were too light in diverging palettes like RdGy). Box palettes specifying a vector of palettes like c("-Reds", "Blues") are now accepted. The default for node.fun and split.labs is now NULL (instead of internal.node.labs and internal.split.labs). The default behaviour hasn't changed. Changes in version 2.0.1 (2016-06-23) Using box.palette=0 now works more consistently. Changes in version 2.0.0 (2016-06-10) The function rpart.plot now has different defaults, so it automatically creates a colored plot tailored to the type of model. This makes the function non backwards-compatible with earlier versions. The old rpart.plot function is still available under the name "rpart.plot.version1". The defaults for prp haven't changed. Added the "auto" option to the "extra" argument. Added the box.palette argument, a simpler way of coloring nodes than the box.col argument. Using yesno=2 will print "yes" and "no" at all nodes (instead of just at the top). Added the yes.text="yes" and no.text="no" arguments (so other languages can be used for the yes/no text.) When snipping a tree, status messages are now printed on the screen. We now better handle NAs in the fitted values. Nodes for NA predicted values are printed with cross hatching. Merged the library source file lib.R with the earth and plotmo packages's lib.R. Changes in version 1.5.3 (2015-10-01) We now deal correctly with the situation when the user has a variable named "text" in the current environment. Minor updates for CRAN checks. Changes in version 1.5.2 (2015-02-04) Added an example to the vignette based on a question on Stack Exchange. Unified some small utility funcs like printf with my other packages. Changes in version 1.5.1 (2014-12-14) Removed link in the man pages to obsoleted package mvpart. Documentation touchups. Changes in version 1.5.0 (2014-11-30) Updates to the documentation, mostly to satisfy CRAN recommendations. The slowtests postscript file is no longer included, to reduce package size. Changes in version 1.4-5 (2014-11-19) Added an example to the vignette for wrapping long split labels over multiple lines. Added inst/slowtests/webpage-figs.R so user can regenerate the web page figures. Added bibliography to the vignette. Minor updates to the vignette and test scripts. Changes in version 1.4-4 (2014-02-05) Removed use of ::: by removing outdated conversion from old-style rpart objects. This change was made mainly to satisfy CRAN checks. Moved slow tests from the src/tests to the inst/slowtests directory. Changes in version 1.4-3 (2013-12-13) Loosened sanity check in get.class.labs to allow for numerical error. Thanks for Sandrine Lunven for help with this issue. Tweaked vignette to refer now to the rpart package vignette (instead of the old rpart reports). Changes in version 1.4-2 (2012-12-16) Changed some code that was using "0" as a color. Changed some code that was doing rep(NULL, n). R 2.15-2 complains about the above, although previous versions let them slip by. Changes in version 1.4-1 (2012-10-24) Updates for compatibility with rpart_3.1-55 (R 2.15.2). Updates to the vignette (extended section on compatibility with plot.rpart, added section on using split.fun, other touchups). Changes in version 1.4-0 (2012-10-10) We now minimally access internal functions in the rpart package (which are accessed using "rpart:::") and thus are now less dependent on changes to those functions. We now try harder to support rpart objects with "user" node lab funcs. The vignette now has an appendix on mvpart objects. Changes in version 1.3-0 (2012-08-18) There is now more white space in the split text (achieved by adding white space to the default eq, lt, and ge args). To revert to the old behaviour, explictly set these args. Added the trim.fun argument, invoked after each mouse click when interactively trimming the tree. Incorporated Gene Cutler's fix to get.class.labs (so we no longer get an incorrect error message when case weights are used). Added Josh Browning's heat tree example to the vignette. Touch-ups for the new version of plotmo (1.3-2). Removed unnecessary LICENSE file because rpart is now GSL-3. Changes in version 1.2-2 (2011-03-31) Touch-ups for the new version of plotmo (1.2-6) Changes in version 1.2-1 (2011-03-26) Touch-ups to the vignette. Changes in version 1.2-0 (2011-03-24) Added the clip.left.labs argument. Extended the vignette. Changes in version 1.1-1 (2011-03-09) We now call the object's text() function unless the object has a standard method ("anova", "class", "poisson" or "exp"). We now support mvpart::mrt objects Changes in version 1.1-0 (2011-03-07) The prp.pdf file is now smaller, thanks to qpdf. Made several miscellaneous touch-ups to docs and code. Thanks to Jason Roberts for his feedback. Changes in version 1.0-0 (2011-02-25) Initial release