Running examples in 'qtl-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: effectplot
> ### Title: Plot phenotype means against genotypes at one or two markers
> ### Aliases: effectplot
> ### Keywords: hplot
> 
> ### ** Examples
> 
> data(fake.f2)
> ## Don't show: 
> fake.f2 <- subset(fake.f2, chr=c(1, 13, "X"))
> ## End(Don't show)
> 
> # impute genotype data
> ## Not run: fake.f2 <- sim.geno(fake.f2, step=5, n.draws=64)
> ## Don't show: 
> fake.f2 <- sim.geno(fake.f2, step=5, n.draws=8)
> ## End(Don't show)
> 
> ########################################
> # one marker plots
> ########################################
> ### plot of genotype-specific phenotype means for 1 marker
> mname <- find.marker(fake.f2, 1, 37) # marker D1M437
> effectplot(fake.f2, pheno.col=1, mname1=mname)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
qtl
 --- call from context --- 
effectplot.getmark(cross, mname1)
 --- call from argument --- 
if (class(mark) != "matrix") mark <- matrix(mark, ncol = 1)
 --- R stacktrace ---
where 1: effectplot.getmark(cross, mname1)
where 2: effectplot(fake.f2, pheno.col = 1, mname1 = mname)

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (cross, mname) 
{
    type <- class(cross)[1]
    mark <- NULL
    gennames <- NULL
    pmalt.pattern <- "@-*[0-9]+"
    if (length(grep(pmalt.pattern, mname)) > 0 && !(mname %in% 
        names(cross$pheno) || mname %in% colnames(pull.geno(cross)))) {
        ss <- unlist(strsplit(mname, "@"))
        if (!(ss[1] %in% names(cross$geno))) 
            stop("Don't understand the marker name ", mname)
        mname <- find.pseudomarker(cross, ss[1], as.numeric(ss[2]), 
            "draws")
    }
    mar.type <- "none"
    pm.pattern <- "^c.*\\.loc.*$"
    if (mname %in% names(cross$pheno)) {
        mar.type <- "pheno"
        idx.pos <- which(mname == names(cross$pheno))
    }
    else if (length(grep(pm.pattern, mname)) > 0) {
        tmp <- unlist(strsplit(mname, "loc"))
        chr <- substr(tmp[1], 2, nchar(tmp[1]) - 1)
        if (!(chr %in% names(cross$geno))) 
            stop("Couldn't find marker ", mname)
        mar.type <- "pm"
        chrtype <- class(cross$geno[[chr]])
        pm.name <- paste("loc", tmp[2], sep = "")
        idx.pos <- which(pm.name == colnames(cross$geno[[chr]]$draws))
        if (length(idx.pos) == 0) 
            stop("Couldn't find marker ", mname)
        else if (length(idx.pos) > 1) 
            idx.pos <- idx.pos[1]
    }
    else {
        for (i in 1:length(cross$geno)) {
            if (mname %in% colnames(cross$geno[[i]]$draws)) {
                mar.type <- "pm"
                chr <- i
                chrtype <- class(cross$geno[[chr]])
                idx.pos <- which(mname == colnames(cross$geno[[i]]$draws))
                break
            }
            else if (mname %in% colnames(cross$geno[[i]]$data)) {
                mar.type <- "marker"
                chr <- i
                chrtype <- class(cross$geno[[i]])
                idx.pos <- which(mname == colnames(cross$geno[[i]]$data))
                break
            }
        }
    }
    if (mar.type == "none") 
        stop("Marker ", mname, " not found")
    if (mar.type == "pheno") {
        mark <- cross$pheno[, idx.pos]
        if (length(unique(mark)) > 5) {
            stop("The input phenotype ", mname, " is not a categorical trait")
        }
        gennames <- sort(unique(mark))
    }
    else if (mar.type == "marker") {
        mark <- cross$geno[[chr]]$data[, idx.pos]
        if (chrtype == "X" && (type %in% c("bc", "f2", "bcsft"))) {
            sexpgm <- getsex(cross)
            mark <- as.numeric(reviseXdata(type, "full", sexpgm, 
                geno = as.matrix(mark), cross.attr = attributes(cross)))
            gennames <- getgenonames(type, chrtype, "full", sexpgm, 
                attributes(cross))
        }
    }
    else if (mar.type == "pm") {
        mark <- cross$geno[[chr]]$draws[, idx.pos, , drop = FALSE]
        if (chrtype == "X" && (type %in% c("bc", "f2", "bcsft"))) {
            sexpgm <- getsex(cross)
            mark <- reviseXdata(type, "full", sexpgm, draws = mark, 
                cross.attr = attributes(cross))[, 1, ]
            gennames <- getgenonames(type, chrtype, "full", sexpgm, 
                attributes(cross))
        }
        else mark <- mark[, 1, ]
    }
    else stop("Couldn't find marker ", mname)
    if (class(mark) != "matrix") 
        mark <- matrix(mark, ncol = 1)
    ret <- list(mark = mark, gennames = gennames)
    attr(ret, "mname") <- mname
    ret
}
<bytecode: 0x5694b10>
<environment: namespace:qtl>
 --- function search by body ---
Function effectplot.getmark in namespace qtl has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1