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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: print.table2x2
> ### Title: print results of 2x2 contingency table analysis
> ### Aliases: print.table2x2
> 
> ### ** Examples
> 
> table2x2(table("marker"=rbinom(100,1,0.4),"response"=rbinom(100,1,0.1)))
_____________________________

2x2 contingency table
_____________________________

            response0     response1     Sum
marker0            55             2      57
marker1            36             7      43
--                 --            --      --
Sum                91             9     100

_____________________________

Statistics
_____________________________


a= 55 
b= 2 
c= 36 
d= 7

p1=a/(a+b)= 0.9649 
p2=c/(c+d)= 0.8372 

_____________________________

Risk difference
_____________________________

Risk difference = RD = p1-p2 = 0.1277
Standard error = SE.RD = sqrt(p1*(1-p1)/(a+b)+p2*(1-p2)/(c+d)) = 0.06135
Lower 95%-confidence limit: = RD - 1.96 * SE.RD = 0.007464
Upper 95%-confidence limit: = RD + 1.96 * SE.RD = 0.2479

The estimated risk difference is 12.8%  (CI_95%: [0.7;24.8]).

_____________________________

Risk ratio
_____________________________

Risk ratio = RR = p1/p2 = 1.1525
Standard error = SE.RR = sqrt((1-p1)/a+(1-p2)/c)= 1.1525
Lower 95%-confidence limit: = RR * exp(- 1.96 * SE.RR) = 1.0012
Upper 95%-confidence limit: = RR * exp(1.96 * SE.RR) = 1.3268

The estimated risk ratio is 1.153 (CI_95%: [1.001;1.327]).

_____________________________

Odds ratio
_____________________________

Odds ratio = OR = (p1/(1-p1))/(p2/(1-p2)) = 5.3472
Standard error = SE.OR = sqrt((1/a+1/b+1/c+1/d)) = 0.8299
Lower 95%-confidence limit: = OR * exp(- 1.96 * SE.OR) = 1.0512
Upper 95%-confidence limit: = OR * exp(1.96 * SE.OR) = 27.2009

The estimated odds ratio is 5.347 (CI_95%: [1.051;27.201]).

_____________________________

Chi-square test
_____________________________

Warning in chisq.test(table2x2) :
  Chi-squared approximation may be incorrect

	Pearson's Chi-squared test with Yates' continuity correction

data:  table2x2
X-squared = 3.4458, df = 1, p-value = 0.06341


_____________________________

Fisher's exact test
_____________________________


	Fisher's Exact Test for Count Data

data:  table2x2
p-value = 0.03641
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
  0.9318097 54.6441933
sample estimates:
odds ratio 
  5.260574 

> table2x2(matrix(c(71,18,38,8),ncol=2),stats="table")
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
Publish
 --- call from context --- 
table2x2(matrix(c(71, 18, 38, 8), ncol = 2), stats = "table")
 --- call from argument --- 
if (class(x) == "data.frame") {
    table2x2 <- as.matrix(x)
} else {
    if (class(x) == "matrix" || class(x) == "table") {
        if (class(x) == "table") {
            table2x2 <- as.matrix(x)
        }
        else table2x2 <- x
    }
    else {
        stop("first argument `x' must be a matrix or a data.frame")
    }
}
 --- R stacktrace ---
where 1: table2x2(matrix(c(71, 18, 38, 8), ncol = 2), stats = "table")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (x, digits = 1, stats = c("table", "rd", "rr", "or", 
    "chisq", "fisher")) 
{
    if (class(x) == "data.frame") {
        table2x2 <- as.matrix(x)
    }
    else {
        if (class(x) == "matrix" || class(x) == "table") {
            if (class(x) == "table") {
                table2x2 <- as.matrix(x)
            }
            else table2x2 <- x
        }
        else {
            stop("first argument `x' must be a matrix or a data.frame")
        }
    }
    if (NROW(x) != 2) 
        stop("Matrix must have exactly 2 rows")
    if (NCOL(x) != 2) 
        stop("Matrix must have exactly 2 columns")
    a <- table2x2[1, 1]
    b <- table2x2[1, 2]
    c <- table2x2[2, 1]
    d <- table2x2[2, 2]
    p1 <- a/(a + b)
    p2 <- c/(c + d)
    out <- list(table2x2 = table2x2, stats = stats)
    if ("rd" %in% stats) {
        rd <- (p1 - p2)
        se.rd <- sqrt(p1 * (1 - p1)/(a + b) + p2 * (1 - p2)/(c + 
            d))
        rd.lower <- rd - qnorm(1 - 0.05/2) * se.rd
        rd.upper <- rd + qnorm(1 - 0.05/2) * se.rd
        out <- c(out, list(rd = rd, se.rd = se.rd, rd.lower = rd.lower, 
            rd.upper = rd.upper))
    }
    if ("rr" %in% stats) {
        rr <- p1/p2
        se.rr <- sqrt((1 - p1)/a + (1 - p2)/c)
        rr.lower <- rr * exp(-qnorm(1 - 0.05/2) * se.rr)
        rr.upper <- rr * exp(qnorm(1 - 0.05/2) * se.rr)
        out <- c(out, list(rr = rr, se.rr = rr, rr.lower = rr.lower, 
            rr.upper = rr.upper))
    }
    if ("or" %in% stats) {
        or <- (a * d)/(b * c)
        se.or <- sqrt(1/a + 1/b + 1/c + 1/d)
        or.lower <- exp(log(or) - qnorm(1 - 0.05/2) * se.or)
        or.upper <- exp(log(or) + qnorm(1 - 0.05/2) * se.or)
        out <- c(out, list(or = or, se.or = se.or, or.lower = or.lower, 
            or.upper = or.upper))
    }
    class(out) <- "table2x2"
    out
}
<bytecode: 0x560514b503e8>
<environment: namespace:Publish>
 --- function search by body ---
Function table2x2 in namespace Publish has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1