% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/autoplot_methods.R
\name{autoplot.gg}
\alias{autoplot.gg}
\alias{autoplot.gg_error}
\alias{autoplot.gg_vimp}
\alias{autoplot.gg_rfsrc}
\alias{autoplot.gg_variable}
\alias{autoplot.gg_partial}
\alias{autoplot.gg_partial_rfsrc}
\alias{autoplot.gg_partialpro}
\alias{autoplot.gg_partial_varpro}
\alias{autoplot.gg_roc}
\alias{autoplot.gg_survival}
\alias{autoplot.gg_brier}
\alias{autoplot.gg_varpro}
\alias{autoplot.gg_udependent}
\alias{autoplot.gg_isopro}
\title{\code{autoplot} methods for \pkg{ggRandomForests} data objects}
\usage{
\method{autoplot}{gg_error}(object, ...)

\method{autoplot}{gg_vimp}(object, ...)

\method{autoplot}{gg_rfsrc}(object, ...)

\method{autoplot}{gg_variable}(object, ...)

\method{autoplot}{gg_partial}(object, ...)

\method{autoplot}{gg_partial_rfsrc}(object, ...)

\method{autoplot}{gg_partialpro}(object, ...)

\method{autoplot}{gg_partial_varpro}(object, ...)

\method{autoplot}{gg_roc}(object, ...)

\method{autoplot}{gg_survival}(object, ...)

\method{autoplot}{gg_brier}(object, ...)

\method{autoplot}{gg_varpro}(object, ...)

\method{autoplot}{gg_udependent}(object, ...)

\method{autoplot}{gg_isopro}(object, ...)
}
\arguments{
\item{object}{A \code{gg_*} data object (see Details).}

\item{...}{Additional arguments passed to the underlying
\code{plot.gg_*()} method.}
}
\value{
A \code{ggplot} object.
}
\description{
These let you call \code{ggplot2::autoplot()} on any \code{gg_*} object
\pkg{ggRandomForests} returns. Each is a thin wrapper around the matching
\code{plot.gg_*()} S3 method, and \code{...} passes straight through, so
every argument those plot methods take is still available here.
}
\details{
The following \code{gg_*} classes are supported:
\describe{
\item{\code{gg_error}}{OOB error vs. number of trees}
\item{\code{gg_vimp}}{Variable importance ranking}
\item{\code{gg_rfsrc}}{Predicted vs. observed values}
\item{\code{gg_variable}}{Marginal dependence}
\item{\code{gg_partial}}{Partial dependence (via \code{plot.variable})}
\item{\code{gg_partial_rfsrc}}{Partial dependence (via \code{partial.rfsrc})}
\item{\code{gg_partial_varpro}}{Partial dependence (via \code{varPro})}
\item{\code{gg_partialpro}}{Partial dependence via \code{varPro} (deprecated alias)}
\item{\code{gg_varpro}}{Variable importance from \code{varPro}}
\item{\code{gg_roc}}{ROC curve}
\item{\code{gg_survival}}{Survival / cumulative hazard curves}
\item{\code{gg_brier}}{Time-resolved Brier score and CRPS}
}
}
\examples{
\donttest{
library(ggplot2)
set.seed(42)
rf <- randomForestSRC::rfsrc(Ozone ~ ., data = na.omit(airquality),
                              ntree = 50, importance = TRUE,
                              tree.err = TRUE)
autoplot(gg_error(rf))
autoplot(gg_vimp(rf))
}
}
