inst/unitTests/test_WriteMatrixToFile.R

WriteMatrixToFile <- function(tmpMatrix, tmpFileName, blnRowNames,
    blnColNames) {
    output <- file(tmpFileName, "at")
    write.table(tmpMatrix, output, sep="\t", quote=FALSE,
        row.names=blnRowNames, col.names=blnColNames)
    close(output)
}

test_WriteMatrixToFile <- function() {
    checkException(WriteMatrixToFile(tmpMatrix= "string",
        tmpFileName= 1, blnRowNames=TRUE,
        blnColNames=TRUE), msg="Unable to use a number for file name")
}
nlawlor/multiClust documentation built on May 16, 2019, 8:12 p.m.