Changelog
Source:NEWS.md
ggRandomForests v2.7.2
- Address CRAN reviewer (Benjamin Altmann) feedback on the v2.7.1 resubmission:
- Add methods references to
DESCRIPTION(Breiman 2001 and Ishwaran et al. 2008, with<doi:...>auto-links) per CRAN cookbook. - Drop the
man/shift.RdRd file:shift()is an internal utility and the example usedggRandomForests:::shift(...). Marked the function@noRdso it no longer generates a help page. - Replace
cat()insurv_partial.rfsrc()withmessage()so progress output is suppressible (suppressMessages()) and plays nicely inside notebooks / Shiny / quarto. - Restore the user’s
par()settings in thesurv_partial.rfsrc()example viaoldpar <- par(no.readonly = TRUE); on.exit(par(oldpar)).
- Add methods references to
ggRandomForests v2.7.1
- Fix
gg_partial_rfsrc()for survival forests:partial.rfsrc()was being called withoutpartial.type, causing a zero-length comparison (if (partial.type == "rel.freq") ...) inside the C-level prediction routine and aborting the call. Survival forests now passpartial.type = "surv"(default; configurable via the newpartial.typeargument accepting"surv","chf", or"mort"). This unblocks thepartial-depchunk in the survival vignette. - Fix
gg_partial_rfsrc()for survival forests with multiplepartial.timevalues:get.partial.plot.data()returns yhat as an[length(partial.values) x length(partial.time)]matrix, but the previous code assumed a vector and crashed on column-mismatch when assigningtime. The result is now reshaped to long form so each(x, time)pair is a single row. - Improve
plot.gg_partial_rfsrc()survival layout: predictor value is now on the x-axis with one curve per (rounded) time point coloured byTime, faceted by variable name. The previous default put time on the x-axis and one curve per predictor value, producing a saturated legend with dozens of nearly-identical lines. - Add
tests/testthat/test_plot_layer_data.R: regression suite that usesggplot2::layer_data()to verify eachplot.gg_*()method renders non-empty layers for every supported forest family. Catches the empty-figure class of bug (transform/plot column-name mismatch) without requiring visual inspection. -
ggrandomforests.news()now readsNEWS.md(the canonical change log R also surfaces viautils::news()). The legacy hand-maintainedinst/NEWShas been removed — it had silently drifted to v2.4.0 (June 2025) across three releases, so users running the helper saw stale version info. One source of truth, no more drift window. - Fix
plot.gg_vimp()legend duplication: the bar geom mapped bothfillandcolorto thepositivecolumn, but only the fill legend was titled “VIMP > 0”, leaving a redundant second legend titled “positive”. Both aesthetics now share the “VIMP > 0” title so ggplot merges them into a single legend by default. - Fix
plot.gg_vimp()for forests with all-positive VIMP: the bar geom previously mapped onlycolor(nofill), producing hollow / outline- only bars and an “Ignoring unknown labels: fill” warning wheneverlabs(fill = ...)was applied. Bothfillandcolorare now mapped unconditionally, so bars render filled in every case. - Add
@examplesblocks toplot.gg_partial_rfsrc()andplot.gg_partialpro(). The latter uses a self-contained mock of thevarpro::partialpro()output structure so the example runs without pulling invarproas a dependency.
ggRandomForests v2.7.0
- S3 design overhaul:
gg_partial(),gg_partialpro(), andgg_partial_rfsrc()now stamp their return values with S3 classes (gg_partial,gg_partialpro,gg_partial_rfsrcrespectively), enablingplot()dispatch without any boilerplate. - Add
plot.gg_partial(),plot.gg_partial_rfsrc(), andplot.gg_partialpro()S3 methods; continuous predictors render as line plots, categorical as bar charts, faceted by variable name. Survival forests produce curves over time; two-variable surface plots group byxvar2.name. - Convert
gg_survival()to an S3 generic dispatching on the class of its first argument. Newgg_survival.rfsrc()method extracts the survival response directly from the fitted forest (no separate data argument needed);gg_survival.default()preserves the existing interface. - Fix
plot.gg_survival()auto-coercion: previously calledgg_survival(rfsrc_obj)treating the forest as theintervalstring argument, causing a latent crash; replaced withinherits()guard. - Deprecate
surv_partial.rfsrc()via.Deprecated()with a pointer togg_partial_rfsrc(); all package tests updated to suppress the warning. - Fix
gg_partial_rfsrc()—make_eval_grid()usedunlist(dplyr::select())which coerced factor columns to integer codes; now usesnewx[[xname]]to preserve column class. Categorical detection extended to coveris.factor()andis.character()in addition to the cardinality check. - Add guards to
gg_partial_rfsrc(): all-NAxvalafter NA removal now emits a warning and skips the variable; all-NA grouping variable (xvar2) callsstop();n_evalandcat_limitare validated as single integers >= 2 near function entry. - Fix cyclomatic complexity across
gg_partial_rfsrc.R: refactored into eight top-level unexported helpers (validate_scalar_int,validate_partial_args,snap_partial_time,make_eval_grid,call_partial_rfsrc,partial_one_var,partial_no_group,partial_with_group,split_partial_result); all functions now score below thecyclocomp_linterlimit of 20. - Fix
@param partial.timedocumentation: “see the section above” corrected to “see the section below”. - Replace deprecated
tidyr::gather()withtidyr::pivot_longer()inplot.gg_vimp()andplot.gg_partialpro(). - Add
gg_survival.rfsrc,gg_survival.default,plot.gg_partial,plot.gg_partial_rfsrc, andplot.gg_partialprotoNAMESPACE; add corresponding@rdname/@exportroxygen tags. - Update tests: add
expect_s3_class()checks for all new classes; addplot()smoke tests forgg_partial,gg_partial_rfsrc,gg_partialpro; addgg_survival.rfsrctests for KM extraction,bystratification, and error on non-survival forest. - Add
plot.gg_partial,plot.gg_partial_rfsrc, andplot.gg_partialproto_pkgdown.ymlreference index.
ggRandomForests v2.7.0
- Fix critical visual bug in
plot.gg_rfsrc: allaes()calls used bare string literals instead of.data[[col]], causing every aesthetic to map to a constant string rather than the underlying data column. All plot types (regression, classification, survival) were affected. - Fix
aes()bare-string literals inplot.gg_rocmulti-class branch; remove unreachableif (crv < 2)dead-code branch. - Fix
bootstrap_survivalCI-band indexing ingg_rfsrc: negative index computed viacolnames()was a no-op on large datasets and a latent crash for data with ≤ 2 unique event times. - Fix
gg_rfsrc.rfsrc:is.null(df[, col])does not detect missing columns; replaced with!col %in% colnames()guard. - Fix
gg_rfsrc.randomForest: method used non-existentobject$xvar; now recovers the training frame via.rf_recover_model_frame(). - Fix legend suppression in
plot.gg_errorfor single-outcome forests where the data frame has novariablecolumn. - Fix
gg_vimpandplot.gg_vimp:1:nvarreplaced withseq_len(nvar)in both S3 methods;1:0silently returnedc(1, 0)instead ofinteger(0)whennvar == 0. - Migrate full test suite to testthat 3.x API:
expect_is→expect_s3_class/expect_type/expect_true(is.*());expect_equivalent→expect_equal(ignore_attr = TRUE); allcontext()calls removed; testthat 1.xexpect_that/is_identical_toremoved. - Add
.lintrpackage-level linter configuration; fix lintr spacing ingg_partial. - Improve GitHub Actions:
lint.yamlnow fails CI on any lint issue;R-CMD-check.yamltreats warnings as errors and uses Rtools 44;test-coverage.yamlduplicate codecov upload removed. - Add
covrandvdiffrtoSuggests.
ggRandomForests v2.6.1
- Fix model-label assignment in
gg_partialfor categorical variable data - Refactor
gg_partialandgg_partial_rfsrcto improve factor-level normalisation and categorical data handling
ggRandomForests v2.6.0
- Add and export new plotting functions; update existing plot documentation
- Improve unit and integration tests; overall coverage raised to 83%
- Remove
hvtiRutilitiesinternal dependency; clean up associated imports - Refactor
gg_partial_rfsrcto use.datapronoun for alldplyrcalls
ggRandomForests v2.5.0
- Initial
gg_partial_rfsrcfunction: computes partial dependence data directly from anrfsrcmodel viarandomForestSRC::partial.rfsrc, without requiring a separateplot.variablecall - Add support for a grouping variable (
xvar2.name) ingg_partial_rfsrc - Improved vignette formatting and namespace usage
ggRandomForests v2.4.0
- Updating to latest ggplot2 functions
- Utilize some namespace referencing
- Added pkgdown documentation
- Minor testing improvements
ggRandomForests v2.2.0
CRAN release: 2022-05-09
- Bring back the regression vignette
- Improve package tests and code coverage
- Clean up code with lintr
ggRandomForests v2.1.0
CRAN release: 2022-04-26
To pull this out of archive on randomForestSRC 3.1 build release. Fixed a plot bug for gg_error to show the actual curve (issue 35)
ggRandomForests v2.0.1
CRAN release: 2016-09-07
- Correct a bug in survival plots when predicting on future data without a known outcome.
- All Vignettes are now at https://github.com/ehrlinger/ggRFVignette
- All tests are being moved to https://github.com/ehrlinger/ggRFVignette
- Begin work on rewriting all checks to not use cached data. This will require more runtime, and hence we will run fewer of them on CRAN release.
- Minor bug and documentation fixes.
ggRandomForests v2.0.0
CRAN release: 2016-06-11
- Added initial support for the randomForest package
- Updated cache files for randomForestSRC 2.2.0 release.
- Remove regression vignettes to meet CRAN size limits. These remain available at the package source https://github.com/ehrlinger/ggRandomForests
- Minor bug and documentation fixes.
ggRandomForests v1.2.1
CRAN release: 2015-12-12
- Update cached datasets for randomForestSRC 2.0.0 release.
- Correct some vignette formatting errors (thanks Joe Smith)
ggRandomForests v1.2.0
CRAN release: 2015-11-15
- Convert to semantic versioning http://semver.org/
- Updates for release of ggplot2 2.0.0
- Change from reshape2::melt dependence to tidyr::gather
- Optimize tests for CRAN to optimize R CMD CHECK times.
ggRandomForests v1.1.4
CRAN release: 2015-03-29
combine.gg_partialbug when giving a single variable plot.variable object.Remove
dplyrdepends to transitions from “Imports” to “Suggests”.Argument for single outcome
gg_vimpplot for classification forests.Improvements to
gg_vimparguments for consistency.Add bootstrap confidence intervals to
gg_rfsrcfunction.Initial
partial.rfsrcfunction to replace therandomForestSRC::plot.variablefunction.Move cache data to
randomForestSRCv1.6.1 to take advantage ofrfsrcversion checking between function calls.Vignette updates for JSS submission of “ggRandomForests: Exploring Random Forest Survival”.
Vignette updates for arXiv submission of ggRandomForests: Random Forests for Regression
Some optimizations to reduce package size.
Remove all tests from CRAN build to optimise R CMD CHECK times.
Remove pdf vignette figure from CRAN build.
Return S3method calls to NAMESPACE for “S3 methods exported but not registered” for R V3.2+.
Misc Bug Fixes.
ggRandomForests v1.1.3
CRAN release: 2015-01-08
- Update “ggRandomForests: Visually Exploring a Random Forest for Regression” vignette.
- Further development of draft package vignette “Survival with Random Forests”.
- Rename vignettes to align with randomForestSRC package usage.
- Add more tests and example functions.
- Refactor
gg_functions into S3 methods to allow future implementation for other random forest packages. - Improved help files.
- Updated DESCRIPTION file to remove redundant parts.
- Misc Bug Fixes.
ggRandomForests v1.1.2
CRAN release: 2014-12-25
- Add package vignette “ggRandomForests: Visually Exploring a Random Forest for Regression”
- Add gg_partial_coplot, quantile_cuts and surface_matrix functions
- export the calc_roc and calc_auc functions.
- replace tidyr function dependency with reshape2 (melt instead of gather) due to lazy eval issues.
- reduce dplyr dependencies (remove select and %>% usage for base equivalents, I still use tbl_df for printing)
- Further development of package vignette “Survival with Random Forests”
- Refactor cached example datasets for better documentation, estimates and examples.
- Improved help files.
- Updated DESCRIPTION file to remove redundant parts.
- Misc Bug Fixes.
ggRandomForests v1.1.1
CRAN release: 2014-12-13
Maintenance release, mostly to fix gg_survival and gg_partial plots. * Fix the gg_survival functions to plot kaplan-meier estimates. * Fix the gg_partial functions for categorical variables. * Add some more S3 print functions. * Try to make gg_functions more consistent. * Further development of package vignette “Survival with Random Forests” * Modify the example cached datasets for better estimates and examples. * Improve help files. * Misc Bug Fixes.