##' Plot measured cell counts against predicted
##'
##' @title Validation plot
##' @param measured measured cell counts
##' @param predicted predicted cell counts
##' @param xlab label for x-axis
##' @param ylab label for y-axis
##' @param ... additional parameters for plot()
##' @return graph
##' @author miterson
##' @export
##' @importFrom stats cor
##' @importFrom graphics abline grid par plot
plot_wbcc <- function(measured, predicted, xlab="predicted", ylab="measured", ...)
{
op <- par(mfcol=c(3,2), mar=c(4, 4, 3, 1))
for(k in 1:ncol(measured))
{
type <- colnames(measured)[k]
cme <- cor(predicted[ , k], measured[ , k])
plot(predicted[ , k], measured[ , k], main=paste(type, " (correlation: ", round(cme, 4), ")", sep=""),
bty="n", pty="s")
abline(lm(measured[ , k]~0+predicted[ , k]), col=2, lty=1, lwd=2)
abline(0, 1, col="grey", lty=1, lwd=2)
grid()
}
par(op)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.