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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: PCA_progeny
> ### Title: Perform a PCA on progeny
> ### Aliases: PCA_progeny
> 
> ### ** Examples
> 
> data("ALL_dosages")
> PCA_progeny(dosage_matrix=ALL_dosages, highlight=list(c("P1", "P2")), colors="red")
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
polymapR
 --- call from context --- 
test_dosage_matrix(dosage_matrix)
 --- call from argument --- 
if (class(dosage_matrix) == "data.frame") {
    warning("dosage_matrix should be a matrix, now it's a data.frame.")
    message("Trying to convert it to matrix, assuming markernames are in the first column..")
    rownames(dosage_matrix) <- dosage_matrix[, 1]
    dosage_matrix <- as.matrix(dosage_matrix[, -1])
    class(dosage_matrix) <- "integer"
} else if (class(dosage_matrix) == "matrix") {
    rn <- rownames(dosage_matrix)
    cn <- colnames(dosage_matrix)
    if (is.null(rn)) 
        stop("The rownames of dosage_matrix should contain markernames. Now NULL")
    if (is.null(cn)) 
        stop("The columnnames of dosage_matrix should contain genotype names. Now NULL")
    if (!(typeof(dosage_matrix) == "integer" | typeof(dosage_matrix) == 
        "double")) {
        warning("dosage_matrix should be integer or numeric. Trying to convert it.. ")
        class(dosage_matrix) <- "integer"
    }
} else {
    stop("dosage_matrix should be a matrix of integers. \n         See the manual of this function for more information.")
}
 --- R stacktrace ---
where 1: test_dosage_matrix(dosage_matrix)
where 2: PCA_progeny(dosage_matrix = ALL_dosages, highlight = list(c("P1", 
    "P2")), colors = "red")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (dosage_matrix) 
{
    if (class(dosage_matrix) == "data.frame") {
        warning("dosage_matrix should be a matrix, now it's a data.frame.")
        message("Trying to convert it to matrix, assuming markernames are in the first column..")
        rownames(dosage_matrix) <- dosage_matrix[, 1]
        dosage_matrix <- as.matrix(dosage_matrix[, -1])
        class(dosage_matrix) <- "integer"
    }
    else if (class(dosage_matrix) == "matrix") {
        rn <- rownames(dosage_matrix)
        cn <- colnames(dosage_matrix)
        if (is.null(rn)) 
            stop("The rownames of dosage_matrix should contain markernames. Now NULL")
        if (is.null(cn)) 
            stop("The columnnames of dosage_matrix should contain genotype names. Now NULL")
        if (!(typeof(dosage_matrix) == "integer" | typeof(dosage_matrix) == 
            "double")) {
            warning("dosage_matrix should be integer or numeric. Trying to convert it.. ")
            class(dosage_matrix) <- "integer"
        }
    }
    else {
        stop("dosage_matrix should be a matrix of integers. \n         See the manual of this function for more information.")
    }
    return(dosage_matrix)
}
<bytecode: 0x55b5dbfc6580>
<environment: namespace:polymapR>
 --- function search by body ---
Function test_dosage_matrix in namespace polymapR has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1