print.gg: Print methods for gg_* data objects

print.ggR Documentation

Print methods for gg_* data objects

Description

Each print.gg_*() method emits a single-line header containing the class label and, when available, forest provenance metadata (source package, family, ntree, n). The object is returned invisibly so print() calls chain cleanly in pipes.

Usage

## S3 method for class 'gg_error'
print(x, ...)

## S3 method for class 'gg_vimp'
print(x, ...)

## S3 method for class 'gg_rfsrc'
print(x, ...)

## S3 method for class 'gg_variable'
print(x, ...)

## S3 method for class 'gg_partial'
print(x, ...)

## S3 method for class 'gg_partial_rfsrc'
print(x, ...)

## S3 method for class 'gg_partialpro'
print(x, ...)

## S3 method for class 'gg_roc'
print(x, ...)

## S3 method for class 'gg_survival'
print(x, ...)

## S3 method for class 'gg_brier'
print(x, ...)

Arguments

x

A gg_* data object.

...

Not currently used.

Details

To inspect rows use head(). To retrieve per-class diagnostics use summary.gg.

Value

The object x, invisibly.

See Also

summary.gg, autoplot.gg

Examples

set.seed(42)
airq <- na.omit(airquality)
rf <- randomForestSRC::rfsrc(Ozone ~ ., data = airq, ntree = 50)
print(gg_error(rf))
print(gg_vimp(rf))


ggRandomForests documentation built on May 12, 2026, 5:07 p.m.