% 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_roc}
\alias{autoplot.gg_survival}
\alias{autoplot.gg_brier}
\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_roc}(object, ...)

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

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

\item{...}{Additional arguments forwarded to the underlying
\code{plot.gg_*()} method.}
}
\value{
A \code{ggplot} object.
}
\description{
These methods let you use \code{ggplot2::autoplot()} on any \code{gg_*}
object returned by \pkg{ggRandomForests}.  They are thin wrappers around
the corresponding \code{plot.gg_*()} S3 methods, so all arguments
accepted by those methods are forwarded via \code{...}.
}
\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_partialpro}}{Partial dependence (via \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))
}
}
