def plotPairs():
    '''requires counts table'''
    # Plot pairs
    R('''panel.pearson <- function(x, y, digits=2, prefix="", cex.cor, ...)
            {
            usr <- par("usr"); on.exit(par(usr))
            par(usr = c(0, 1, 0, 1))
            r <- abs(cor(x, y))
            txt <- format(c(r, 0.123456789), digits=digits)[1]
            txt <- paste(prefix, txt, sep="")
            if(missing(cex.cor)) cex <- 0.6/strwidth(txt)
            x = 0.5;
            y = 0.5;
            if (par("xlog")) { x = 10^x };
            if (par("ylog")) { y = 10^y };
            text(x, y, txt, cex = cex);
            }
       ''')
    try:
        R('''pairs(countsTable,
        lower.panel = panel.pearson,
        pch=".",
        labels=colnames(countsTable),
        log="xy")''')
    except rpy2.rinterface.RRuntimeError, msg:
        E.warn(msg % "can not plot pairwise scatter plot: %s")
dataset/ETHPy150Open CGATOxford/cgat/CGAT/Expression.py/plotPairs/swapped operands of `%`