https://github.com/cran/fields
Revision 4ea1eee9a25a75a6807ae5937ebc06add58d0859 authored by Doug Nychka on 13 May 2003, 00:00:00 UTC, committed by Gabor Csardi on 13 May 2003, 00:00:00 UTC
1 parent d60d8b9
Raw File
Tip revision: 4ea1eee9a25a75a6807ae5937ebc06add58d0859 authored by Doug Nychka on 13 May 2003, 00:00:00 UTC
version 1.3-1
Tip revision: 4ea1eee
cat.matrix.r
"cat.matrix" <-
function (mat, digits = 8) 
{
    nc <- ncol(mat)
    temp <- matrix(match(c(signif(mat, digits)), unique(c(signif(mat, 
        digits)))), ncol = nc)
    temp2 <- format(temp[, 1])
    if (nc > 1) {
        for (k in 2:nc) {
            temp2 <- paste(temp2, temp[, k], sep = "X")
        }
    }
    match(temp2, unique(temp2))
}
back to top