autoplot.party {ggparty} | R Documentation |
autoplot methods for party objects
Description
autoplot methods for party objects
Usage
## S3 method for class 'party'
autoplot(object, ...)
## S3 method for class 'constparty'
autoplot(object, ...)
## S3 method for class 'modelparty'
autoplot(object, plot_var = NULL, ...)
## S3 method for class 'lmtree'
autoplot(object, plot_var = NULL, show_fit = TRUE,
...)
Arguments
object |
object of class party. |
... |
additional parameters |
plot_var |
Which covariate to plot against response. Defaults to second
column in |
show_fit |
If TRUE |
Examples
library(ggparty)
data("WeatherPlay", package = "partykit")
sp_o <- partysplit(1L, index = 1:3)
sp_h <- partysplit(3L, breaks = 75)
sp_w <- partysplit(4L, index = 1:2)
pn <- partynode(1L, split = sp_o, kids = list(
partynode(2L, split = sp_h, kids = list(
partynode(3L, info = "yes"),
partynode(4L, info = "no"))),
partynode(5L, info = "yes"),
partynode(6L, split = sp_w, kids = list(
partynode(7L, info = "yes"),
partynode(8L, info = "no")))))
py <- party(pn, WeatherPlay)
autoplot(py)
[Package ggparty version 1.0.0 Index]