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

> options(width = 65, prompt = "R> ", continue = "   ")

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

> set.seed(290875)

> anonymous <- FALSE

> if (!anonymous) {
+     cat("\\author{Torsten Hothorn$^1$, Kurt Hornik$^2$, \\\\\n            Mark A. van de Wiel$^3$ and Achim Zeileis$^2$}\n")
+ } .... [TRUNCATED] 
\author{Torsten Hothorn$^1$, Kurt Hornik$^2$, \\
            Mark A. van de Wiel$^3$ and Achim Zeileis$^2$}

> if (!anonymous) cat("\\noindent$^1$ Institut f\\\"ur Medizininformatik, Biometrie und Epidemiologie\\\\\n           Friedrich-Alexander-Universit\\\ .... [TRUNCATED] 
\noindent$^1$ Institut f\"ur Medizininformatik, Biometrie und Epidemiologie\\
           Friedrich-Alexander-Universit\"at Erlangen-N\"urnberg\\
           Waldstra{\ss}e 6, D-91054 Erlangen, Germany \\
           \texttt{Torsten.Hothorn@R-project.org}
         \newline

         \noindent$^2$ Department f\"ur Statistik und Mathematik,
            Wirtschaftsuniversit\"at Wien \\
            Augasse 2-6, A-1090 Wien, Austria \\
            \texttt{Kurt.Hornik@R-project.org} \\
            \texttt{Achim.Zeileis@R-project.org}
         \newline

         \noindent$^3$ Department of Mathematics, Vrije Universiteit \\
                        De Boelelaan 1081a, 1081 HV Amsterdam, The Netherlands \\
            \texttt{mark.vdwiel@vumc.nl}
         \newline

> if (anonymous) {
+     cat(" \\citep{PKG:coina} ")
+ } else {
+     cat(" \\citep{PKG:coin} ")
+ }
 \citep{PKG:coin} 
> n <- table(alpha$alength)

> par(cex.lab = 1.3, cex.axis = 1.3)

> boxplot(elevel ~ alength, data = alpha, ylab = "Expression Level", 
+     xlab = "NACP-REP1 Allele Length", varwidth = TRUE)

> axis(3, at = 1:3, labels = paste("n = ", n))

> rankif <- function(data) trafo(data, numeric_trafo = rank_trafo)

> kruskal.test(elevel ~ alength, data = alpha)

	Kruskal-Wallis rank sum test

data:  elevel by alength
Kruskal-Wallis chi-squared = 8.8302, df = 2, p-value =
0.01209


> independence_test(elevel ~ alength, data = alpha, 
+     ytrafo = rank_trafo, teststat = "quadratic")

	Asymptotic General Independence Test

data:  elevel by
	 alength (short, intermediate, long)
chi-squared = 8.8302, df = 2, p-value = 0.01209


> mpoints <- function(x) c(2, 7, 11)[unlist(x)]

> independence_test(elevel ~ alength, data = alpha, 
+     ytrafo = rank_trafo, xtrafo = mpoints)

	Asymptotic General Independence Test

data:  elevel by
	 alength (short, intermediate, long)
Z = 2.9263, p-value = 0.00343
alternative hypothesis: two.sided


> total <- nrow(alzheimer)

> stopifnot(total == 538)

> male <- sum(alzheimer$gender == "Male")

> stopifnot(male == 200)

> female <- sum(alzheimer$gender == "Female")

> stopifnot(female == 338)

> disease <- table(alzheimer$disease)

> smoked <- sum(alzheimer$smoking != "None")

> atab <- xtabs(~smoking + +disease + gender, data = alzheimer)

> x <- t(atab[, , "Female"])

> lines <- paste(paste(dimnames(x)$disease, " & "), 
+     paste(apply(x, 1, function(l) paste(l, collapse = " & ")), 
+         "\\\\"))

> for (i in 1:length(lines)) cat(lines[i], "\n")
Alzheimer  &  91 & 7 & 15 & 21 \\ 
Other dementias  &  55 & 7 & 16 & 9 \\ 
Other diagnoses  &  80 & 3 & 25 & 9 \\ 

> x <- t(atab[, , "Male"])

> lines <- paste(paste(dimnames(x)$disease, " & "), 
+     paste(apply(x, 1, function(l) paste(l, collapse = " & ")), 
+         "\\\\"))

> for (i in 1:length(lines)) cat(lines[i], "\n")
Alzheimer  &  35 & 8 & 15 & 6 \\ 
Other dementias  &  24 & 1 & 17 & 35 \\ 
Other diagnoses  &  24 & 2 & 22 & 11 \\ 

> layout(matrix(1:2, ncol = 2))

> spineplot(disease ~ smoking, data = alzheimer, subset = gender == 
+     "Male", main = "Male", xlab = "Smoking", ylab = "Disease", 
+     tol = 1)

> spineplot(disease ~ smoking, data = alzheimer, subset = gender == 
+     "Female", main = "Female", xlab = "Smoking", ylab = "Disease", 
+     tol = .... [TRUNCATED] 

> it_alz <- independence_test(disease ~ smoking | gender, 
+     data = alzheimer, teststat = "quadratic")
Warning in Ops.factor(smoking, gender) : ‘|’ not meaningful for factors

  When sourcing ‘LegoCondInf.R’:
Error: ‘x’ and ‘y’ do not contain data
Execution halted
when running code in ‘MAXtest.Rnw’
  ...

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

> set.seed(290875)

> library("xtable")

> xtable.table <- function(x, ...) {
+     tab2 <- function(x, pre = NULL, totals = TRUE) {
+         if (totals) {
+             x <- cbind(x, Total  .... [TRUNCATED] 

> psoriasis <- structure(list(gender = structure(as.integer(c(2, 
+     2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
+     2, 2, 2, 2, 2, .... [TRUNCATED] 

> diabetes <- structure(list(Study = structure(c(1, 
+     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
+     1, 1, 1, 1, 1, 1, 1, 1, 1,  .... [TRUNCATED] 

> me <- as.table(matrix(c(6, 8, 10, 32, 47, 20), byrow = TRUE, 
+     nrow = 2, dimnames = list(Group = c("In situ", "Control"), 
+         Genotype = .... [TRUNCATED] 

> me <- t(me)

> xtable.table(me)
 &  In situ & Control & Total \\ \hline 
AA  &  6 & 32 & 38  \\ 
AG  &  8 & 47 & 55  \\ 
GG  &  10 & 20 & 30  \\ 
Total  &  24 & 99 & 123  \\ 

> add <- c(0, 1, 2)

> dom <- c(0, 1, 1)

> rec <- c(0, 0, 1)

> g <- function(x) {
+     x <- unlist(x)
+     cbind(dominant = dom[x], additive = add[x], recessive = rec[x])
+ }

> it <- independence_test(me, xtrafo = g, alternative = "greater")

> CA <- statistic(it, type = "linear")

> CAstand <- statistic(it, type = "standardized")

> pasympt <- pvalue(it, method = "single-step")

> itp <- independence_test(me, xtrafo = g, distribution = approximate(B = 49999), 
+     alternative = "greater")

> papprox <- pvalue(itp, method = "step-down")

> out <- cbind(CA, round(expectation(it), 4), round(sqrt(variance(it)), 
+     4), round(CAstand, 4), round(pasympt, 4), round(papprox, 
+     4))

> rownames(out) <- rownames(CA)

> out[, 2] <- formatC(out[, 2], digits = 4, format = "f")

> S <- round(covariance(it), 4)

> S <- formatC(S, digits = 4, format = "f")

> for (i in 1:nrow(S)) cat(paste(S[i, ], collapse = " & "), 
+     "\\\\ \n")
4.1579 & 5.6255 & 1.4675 \\ 
5.6255 & 10.6845 & 5.0590 \\ 
1.4675 & 5.0590 & 3.5915 \\ 

> S <- round(cov2cor(covariance(it)), 4)

> S <- formatC(S, digits = 4, format = "f")

> for (i in 1:nrow(S)) cat(paste(S[i, ], collapse = " & "), 
+     "\\\\ \n")
1.0000 & 0.8440 & 0.3798 \\ 
0.8440 & 1.0000 & 0.8167 \\ 
0.3798 & 0.8167 & 1.0000 \\ 

> for (i in 1:nrow(out)) cat(rownames(out)[i], " & ", 
+     paste(out[i, ], collapse = " & "), "\\\\ \n")
dominant  &  18 & 16.5854 & 2.0391 & 0.6938 & 0.3907 & 0.3302 \\ 
additive  &  28 & 22.4390 & 3.2687 & 1.7013 & 0.0868 & 0.0654 \\ 
recessive  &  10 & 5.8537 & 1.8951 & 2.1879 & 0.0303 & 0.0359 \\ 

> xtable(xtabs(~IL1B_511 + group + gender, data = psoriasis))
Male  &  &  Control & Early Onset & Late Onset & Total \\ \hline 
 & CC  &  75 & 54 & 29 & 158  \\ 
 & CT  &  93 & 44 & 13 & 150  \\ 
 & TT  &  14 & 7 & 4 & 25  \\ 
 & Total  &  182 & 105 & 46 & 333  \\ 
Female  &  &  Control & Early Onset & Late Onset & Total \\ \hline 
 & CC  &  76 & 26 & 17 & 119  \\ 
 & CT  &  69 & 20 & 10 & 99  \\ 
 & TT  &  18 & 5 & 2 & 25  \\ 
 & Total  &  163 & 51 & 29 & 243  \\ 

> xtable(xtabs(~TNFA_238 + group + gender, data = psoriasis))
Male  &  &  Control & Early Onset & Late Onset & Total \\ \hline 
 & GG  &  170 & 71 & 40 & 281  \\ 
 & GA  &  12 & 33 & 6 & 51  \\ 
 & AA  &  0 & 1 & 0 & 1  \\ 
 & Total  &  182 & 105 & 46 & 333  \\ 
Female  &  &  Control & Early Onset & Late Onset & Total \\ \hline 
 & GG  &  146 & 43 & 24 & 213  \\ 
 & GA  &  17 & 8 & 5 & 30  \\ 
 & AA  &  0 & 0 & 0 & 0  \\ 
 & Total  &  163 & 51 & 29 & 243  \\ 

> it <- independence_test(TNFA_238 + IL1B_511 ~ group | 
+     gender, data = psoriasis, ytrafo = function(data) trafo(data, 
+     factor_trafo = g), .... [TRUNCATED] 
Warning in Ops.factor(group, gender) : ‘|’ not meaningful for factors

  When sourcing ‘MAXtest.R’:
Error: ‘x’ and ‘y’ do not contain data
Execution halted
when running code in ‘coin.Rnw’
  ...

> options(width = 60)

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

> set.seed(290875)

> library("coin")

> YOY <- data.frame(length = c(46, 28, 46, 37, 32, 41, 
+     42, 45, 38, 44, 42, 60, 32, 42, 45, 58, 27, 51, 42, 52, 38, 
+     33, 26, 25, 28, 28, 2 .... [TRUNCATED] 

> it <- independence_test(length ~ site, data = YOY, 
+     ytrafo = function(data) trafo(data, numeric_trafo = rank_trafo), 
+     teststat = "quadra ..." ... [TRUNCATED] 

> it

	Asymptotic General Independence Test

data:  length by site (I, II, III, IV)
chi-squared = 22.852, df = 3, p-value = 4.335e-05


> statistic(it, type = "linear")
       
I   278
II  307
III 119
IV  116

> expectation(it)
  I  II III  IV 
205 205 205 205 

> covariance(it)
            I        II       III        IV
I   1019.0385 -339.6795 -339.6795 -339.6795
II  -339.6795 1019.0385 -339.6795 -339.6795
III -339.6795 -339.6795 1019.0385 -339.6795
IV  -339.6795 -339.6795 -339.6795 1019.0385

> statistic(it, type = "standardized")
             
I    2.286797
II   3.195250
III -2.694035
IV  -2.788013

> statistic(it)
[1] 22.85242

> pvalue(it)
[1] 4.334659e-05

> kt <- kruskal_test(length ~ site, data = YOY, distribution = approximate(B = 10000))

> kt

	Approximative Kruskal-Wallis Test

data:  length by site (I, II, III, IV)
chi-squared = 22.852, p-value < 2.2e-16


> pvalue(kt)
[1] 0
99 percent confidence interval:
 0.0000000000 0.0005296914 


> data("jobsatisfaction", package = "coin")

> ct <- cmh_test(jobsatisfaction)

> ct

	Asymptotic Generalized Cochran-Mantel-Haenszel Test

data:  Job.Satisfaction by
	 Income (<5000, 5000-15000, 15000-25000, >25000) 
	 stratified by Gender
chi-squared = 10.2, df = 9, p-value = 0.3345


> statistic(ct, type = "standardized")
            Very Dissatisfied A Little Satisfied
<5000               1.3112789         0.69201053
5000-15000          0.6481783         0.83462550
15000-25000        -1.0958361        -1.50130926
>25000             -1.0377629        -0.08983052
            Moderately Satisfied Very Satisfied
<5000                 -0.2478705     -0.9293458
5000-15000             0.5175755     -1.6257547
15000-25000            0.2361231      1.4614123
>25000                -0.5946119      1.2031648

> lbl_test(jobsatisfaction)

	Asymptotic Linear-by-Linear Association Test

data:  Job.Satisfaction (ordered) by
	 Income (<5000 < 5000-15000 < 15000-25000 < >25000) 
	 stratified by Gender
Z = 2.5736, p-value = 0.01006
alternative hypothesis: two.sided


> lbl_test(jobsatisfaction, scores = list(Job.Satisfaction = c(1, 
+     3, 4, 5), Income = c(3, 10, 20, 35)))

	Asymptotic Linear-by-Linear Association Test

data:  Job.Satisfaction (ordered) by
	 Income (<5000 < 5000-15000 < 15000-25000 < >25000) 
	 stratified by Gender
Z = 2.4812, p-value = 0.01309
alternative hypothesis: two.sided


> lbl_test(jobsatisfaction, ytrafo = function(data) trafo(data, 
+     ordered_trafo = function(y) of_trafo(y, scores = c(1, 3, 
+         4, 5))), xt .... [TRUNCATED] 

	Asymptotic Linear-by-Linear Association Test

data:  Job.Satisfaction (ordered) by
	 Income (<5000 < 5000-15000 < 15000-25000 < >25000) 
	 stratified by Gender
Z = 2.4812, p-value = 0.01309
alternative hypothesis: two.sided


> egg_data <- data.frame(scores = c(9.7, 8.7, 5.4, 5, 
+     9.6, 8.8, 5.6, 3.6, 9, 7.3, 3.8, 4.3, 9.3, 8.7, 6.8, 3.8, 
+     10, 7.5, 4.2, 2.8, 9.6,  .... [TRUNCATED] 

> independence_test(scores ~ product | sitting, data = egg_data, 
+     teststat = "quadratic", ytrafo = function(data) trafo(data, 
+         numeric .... [TRUNCATED] 
Warning in Ops.factor(product, sitting) :
  ‘|’ not meaningful for factors

  When sourcing ‘coin.R’:
Error: ‘x’ and ‘y’ do not contain data
Execution halted