Errors in running code in vignettes:
when running code in ‘ctree.Rnw’
  ...

> options(width = 70, SweaveHooks = list(leftpar = function() par(mai = par("mai") * 
+     c(1, 1.1, 1, 1))))

> require("partykit")
Loading required package: partykit
Loading required package: grid
Loading required package: libcoin
Loading required package: mvtnorm

> require("coin")
Loading required package: coin
Loading required package: survival

> require("strucchange")
Loading required package: strucchange
Loading required package: zoo

Attaching package: ‘zoo’

The following objects are masked from ‘package:base’:

    as.Date, as.Date.numeric

Loading required package: sandwich

> require("coin")

> require("Formula")
Loading required package: Formula

> require("survival")

> require("sandwich")

> set.seed(290875)

> ctree_control(teststat = "max")
$criterion
[1] "p.value"

$logmincriterion
[1] -0.05129329

$minsplit
[1] 20

$minbucket
[1] 7

$minprob
[1] 0.01

$stump
[1] FALSE

$nmax
 yx   z 
Inf Inf 

$lookahead
[1] FALSE

$mtry
[1] Inf

$maxdepth
[1] Inf

$multiway
[1] FALSE

$splittry
[1] 2

$maxsurrogate
[1] 0

$numsurrogate
[1] FALSE

$majority
[1] FALSE

$caseweights
[1] TRUE

$applyfun
function (X, FUN, ...) 
{
    FUN <- match.fun(FUN)
    if (!is.vector(X) || is.object(X)) 
        X <- as.list(X)
    .Internal(lapply(X, FUN))
}
<bytecode: 0x56172bcab910>
<environment: namespace:base>

$saveinfo
[1] TRUE

$bonferroni
[1] TRUE

$update
NULL

$selectfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .select(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378b7ac0>
<environment: 0x5617378bcf90>

$splitfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .split(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378bc078>
<environment: 0x5617378c3638>

$svselectfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .select(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378b7ac0>
<environment: 0x5617378c3558>

$svsplitfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .split(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378bc078>
<environment: 0x5617378c3408>

$teststat
[1] "maximum"

$splitstat
[1] "quadratic"

$splittest
[1] FALSE

$pargs
$maxpts
[1] 25000

$abseps
[1] 0.001

$releps
[1] 0

attr(,"class")
[1] "GenzBretz"

$testtype
[1] "Bonferroni"

$nresample
[1] 9999

$tol
[1] 1.490116e-08

$intersplit
[1] FALSE

$MIA
[1] FALSE


> ctree_control(teststat = "quad")
$criterion
[1] "p.value"

$logmincriterion
[1] -0.05129329

$minsplit
[1] 20

$minbucket
[1] 7

$minprob
[1] 0.01

$stump
[1] FALSE

$nmax
 yx   z 
Inf Inf 

$lookahead
[1] FALSE

$mtry
[1] Inf

$maxdepth
[1] Inf

$multiway
[1] FALSE

$splittry
[1] 2

$maxsurrogate
[1] 0

$numsurrogate
[1] FALSE

$majority
[1] FALSE

$caseweights
[1] TRUE

$applyfun
function (X, FUN, ...) 
{
    FUN <- match.fun(FUN)
    if (!is.vector(X) || is.object(X)) 
        X <- as.list(X)
    .Internal(lapply(X, FUN))
}
<bytecode: 0x56172bcab910>
<environment: namespace:base>

$saveinfo
[1] TRUE

$bonferroni
[1] TRUE

$update
NULL

$selectfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .select(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378b7ac0>
<environment: 0x5617378eb410>

$splitfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .split(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378bc078>
<environment: 0x5617378eb330>

$svselectfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .select(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378b7ac0>
<environment: 0x5617378eb250>

$svsplitfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .split(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378bc078>
<environment: 0x5617378eb100>

$teststat
[1] "quadratic"

$splitstat
[1] "quadratic"

$splittest
[1] FALSE

$pargs
$maxpts
[1] 25000

$abseps
[1] 0.001

$releps
[1] 0

attr(,"class")
[1] "GenzBretz"

$testtype
[1] "Bonferroni"

$nresample
[1] 9999

$tol
[1] 1.490116e-08

$intersplit
[1] FALSE

$MIA
[1] FALSE


> ctree_control(testtype = "Bonferroni")
$criterion
[1] "p.value"

$logmincriterion
[1] -0.05129329

$minsplit
[1] 20

$minbucket
[1] 7

$minprob
[1] 0.01

$stump
[1] FALSE

$nmax
 yx   z 
Inf Inf 

$lookahead
[1] FALSE

$mtry
[1] Inf

$maxdepth
[1] Inf

$multiway
[1] FALSE

$splittry
[1] 2

$maxsurrogate
[1] 0

$numsurrogate
[1] FALSE

$majority
[1] FALSE

$caseweights
[1] TRUE

$applyfun
function (X, FUN, ...) 
{
    FUN <- match.fun(FUN)
    if (!is.vector(X) || is.object(X)) 
        X <- as.list(X)
    .Internal(lapply(X, FUN))
}
<bytecode: 0x56172bcab910>
<environment: namespace:base>

$saveinfo
[1] TRUE

$bonferroni
[1] TRUE

$update
NULL

$selectfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .select(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378b7ac0>
<environment: 0x5617378fe990>

$splitfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .split(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378bc078>
<environment: 0x5617378fe8b0>

$svselectfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .select(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378b7ac0>
<environment: 0x5617378fe7d0>

$svsplitfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .split(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378bc078>
<environment: 0x5617378fe680>

$teststat
[1] "quadratic"

$splitstat
[1] "quadratic"

$splittest
[1] FALSE

$pargs
$maxpts
[1] 25000

$abseps
[1] 0.001

$releps
[1] 0

attr(,"class")
[1] "GenzBretz"

$testtype
[1] "Bonferroni"

$nresample
[1] 9999

$tol
[1] 1.490116e-08

$intersplit
[1] FALSE

$MIA
[1] FALSE


> ctree_control(minsplit = 20)
$criterion
[1] "p.value"

$logmincriterion
[1] -0.05129329

$minsplit
[1] 20

$minbucket
[1] 7

$minprob
[1] 0.01

$stump
[1] FALSE

$nmax
 yx   z 
Inf Inf 

$lookahead
[1] FALSE

$mtry
[1] Inf

$maxdepth
[1] Inf

$multiway
[1] FALSE

$splittry
[1] 2

$maxsurrogate
[1] 0

$numsurrogate
[1] FALSE

$majority
[1] FALSE

$caseweights
[1] TRUE

$applyfun
function (X, FUN, ...) 
{
    FUN <- match.fun(FUN)
    if (!is.vector(X) || is.object(X)) 
        X <- as.list(X)
    .Internal(lapply(X, FUN))
}
<bytecode: 0x56172bcab910>
<environment: namespace:base>

$saveinfo
[1] TRUE

$bonferroni
[1] TRUE

$update
NULL

$selectfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .select(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378b7ac0>
<environment: 0x561737911340>

$splitfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .split(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378bc078>
<environment: 0x561737911260>

$svselectfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .select(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378b7ac0>
<environment: 0x561737911180>

$svsplitfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .split(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378bc078>
<environment: 0x561737911030>

$teststat
[1] "quadratic"

$splitstat
[1] "quadratic"

$splittest
[1] FALSE

$pargs
$maxpts
[1] 25000

$abseps
[1] 0.001

$releps
[1] 0

attr(,"class")
[1] "GenzBretz"

$testtype
[1] "Bonferroni"

$nresample
[1] 9999

$tol
[1] 1.490116e-08

$intersplit
[1] FALSE

$MIA
[1] FALSE


> ctree_control(maxsurrogate = 3)
$criterion
[1] "p.value"

$logmincriterion
[1] -0.05129329

$minsplit
[1] 20

$minbucket
[1] 7

$minprob
[1] 0.01

$stump
[1] FALSE

$nmax
 yx   z 
Inf Inf 

$lookahead
[1] FALSE

$mtry
[1] Inf

$maxdepth
[1] Inf

$multiway
[1] FALSE

$splittry
[1] 2

$maxsurrogate
[1] 3

$numsurrogate
[1] FALSE

$majority
[1] FALSE

$caseweights
[1] TRUE

$applyfun
function (X, FUN, ...) 
{
    FUN <- match.fun(FUN)
    if (!is.vector(X) || is.object(X)) 
        X <- as.list(X)
    .Internal(lapply(X, FUN))
}
<bytecode: 0x56172bcab910>
<environment: namespace:base>

$saveinfo
[1] TRUE

$bonferroni
[1] TRUE

$update
NULL

$selectfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .select(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378b7ac0>
<environment: 0x561737926690>

$splitfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .split(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378bc078>
<environment: 0x5617379265b0>

$svselectfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .select(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378b7ac0>
<environment: 0x5617379264d0>

$svsplitfun
function (model, trafo, data, subset, weights, whichvar, ctrl) 
{
    args <- list(...)
    ctrl[names(args)] <- args
    .split(model, trafo, data, subset, weights, whichvar, ctrl, 
        FUN = .ctree_test)
}
<bytecode: 0x5617378bc078>
<environment: 0x561737926380>

$teststat
[1] "quadratic"

$splitstat
[1] "quadratic"

$splittest
[1] FALSE

$pargs
$maxpts
[1] 25000

$abseps
[1] 0.001

$releps
[1] 0

attr(,"class")
[1] "GenzBretz"

$testtype
[1] "Bonferroni"

$nresample
[1] 9999

$tol
[1] 1.490116e-08

$intersplit
[1] FALSE

$MIA
[1] FALSE


> ls <- data.frame(y = gl(3, 50, labels = c("A", "B", 
+     "C")), x1 = rnorm(150) + rep(c(1, 0, 0), c(50, 50, 50)), 
+     x2 = runif(150))

> library("partykit")

> ctree(y ~ x1 + x2, data = ls)

Model formula:
y ~ x1 + x2

Fitted party:
[1] root
|   [2] x1 <= 0.82552: C (n = 96, err = 57.3%)
|   [3] x1 > 0.82552: A (n = 54, err = 42.6%)

Number of inner nodes:    1
Number of terminal nodes: 2

> ct <- ctree(y ~ x1 + x2, data = ls)

> ct

Model formula:
y ~ x1 + x2

Fitted party:
[1] root
|   [2] x1 <= 0.82552: C (n = 96, err = 57.3%)
|   [3] x1 > 0.82552: A (n = 54, err = 42.6%)

Number of inner nodes:    1
Number of terminal nodes: 2

> plot(ct)

  When sourcing ‘ctree.R’:
Error: no string supplied for 'strwidth/height' unit
Execution halted
when running code in ‘partykit.Rnw’
  ...

> options(width = 70)

> library("partykit")
Loading required package: grid
Loading required package: libcoin
Loading required package: mvtnorm

> set.seed(290875)

> data("WeatherPlay", package = "partykit")

> WeatherPlay
    outlook temperature humidity windy play
1     sunny          85       85 false   no
2     sunny          80       90  true   no
3  overcast          83       86 false  yes
4     rainy          70       96 false  yes
5     rainy          68       80 false  yes
6     rainy          65       70  true   no
7  overcast          64       65  true  yes
8     sunny          72       95 false   no
9     sunny          69       70 false  yes
10    rainy          75       80 false  yes
11    sunny          75       70  true  yes
12 overcast          72       90  true  yes
13 overcast          81       75 false  yes
14    rainy          71       91  true   no

> py <- party(partynode(1, split = partysplit(1, index = 1:3), 
+     kids = list(partynode(2, split = partysplit(3, breaks = 75), 
+         kids = l .... [TRUNCATED] 

> plot(py)

  When sourcing ‘partykit.R’:
Error: no string supplied for 'strwidth/height' unit
Execution halted