Running examples in ‘coin-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: MarginalHomogeneityTests
> ### Title: Marginal Homogeneity Tests
> ### Aliases: mh_test mh_test.formula mh_test.table mh_test.SymmetryProblem
> ### Keywords: htest
> 
> ### ** Examples
> 
> ## Performance of prime minister
> ## Agresti (2002, p. 409)
> performance <- matrix(
+     c(794, 150,
+        86, 570),
+     nrow = 2, byrow = TRUE,
+     dimnames = list(
+          "First" = c("Approve", "Disprove"),
+         "Second" = c("Approve", "Disprove")
+     )
+ )
> performance <- as.table(performance)
> diag(performance) <- 0 # speed-up: only off-diagonal elements contribute
> 
> ## Asymptotic McNemar Test
> mh_test(performance)

	Asymptotic Marginal Homogeneity Test

data:  response by
	 conditions (First, Second) 
	 stratified by block
chi-squared = 17.356, df = 1, p-value = 3.099e-05

> 
> ## Exact McNemar Test
> mh_test(performance, distribution = "exact")

	Exact Marginal Homogeneity Test

data:  response by
	 conditions (First, Second) 
	 stratified by block
chi-squared = 17.356, p-value = 3.716e-05

> 
> 
> ## Effectiveness of different media for the growth of diphtheria
> ## Cochran (1950, Tab. 2)
> cases <- c(4, 2, 3, 1, 59)
> n <- sum(cases)
> cochran <- data.frame(
+     diphtheria = factor(
+         unlist(rep(list(c(1, 1, 1, 1),
+                         c(1, 1, 0, 1),
+                         c(0, 1, 1, 1),
+                         c(0, 1, 0, 1),
+                         c(0, 0, 0, 0)),
+                    cases))
+     ),
+     media = factor(rep(LETTERS[1:4], n)),
+     case =  factor(rep(seq_len(n), each = 4))
+ )
> 
> ## Asymptotic Cochran Q test (Cochran, 1950, p. 260)
> mh_test(diphtheria ~ media | case, data = cochran) # Q = 8.05
Warning in Ops.factor(media, case) : '|' not meaningful for factors
Error in .local(.Object, ...) : 'x' is not a balanced factor
Calls: mh_test ... mh_test.formula -> ft -> new -> initialize -> initialize -> .local
Execution halted