Description Usage Arguments Examples
View source: R/autoplot-methods.R
autoplot methods for party objects
1 2 3 4 5 6 7 8 9 10 11 12 |
object |
object of class party. |
... |
additional parameters |
plot_var |
Which covariate to plot against response. Defaults to second
column in |
show_fit |
If TRUE |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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)
|
Loading required package: ggplot2
Loading required package: partykit
Loading required package: grid
Loading required package: libcoin
Loading required package: mvtnorm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.