swh:1:snp:3a44eb759780145deea094ac2a25c5049546a085
Raw File
Tip revision: 4a78d06e146c9b6801d50fb15c2f67ce174c8c79 authored by Han Lin Shang on 08 June 2010, 07:47:32 UTC
version 1.9
Tip revision: 4a78d06
bin2.r
bin2 = function (x, ab, nbin = c(20, 20))
{
    if (missing(ab)) {
        ab <- t(array(c(nicerange(x[, 1]), nicerange(x[, 2])),
            c(2, 2)))
    }
    n <- nrow(x)
    r <- .Fortran("bin2", as.double(x), as.integer(n), as.double(ab),
        as.integer(nbin[1]), as.integer(nbin[2]), nc = integer(nbin[1] *
            nbin[2]), nskip = integer(1), PACKAGE = "ash")
    list(nc = matrix(r$nc, nbin[1], nbin[2]), ab = ab, nskip = r$nskip)
}
back to top