R/isolateLoc.R

isolateLoc <-
function (reg, loc, remove0 = FALSE) 
{
    newE <- reg$E
    newE[is.na(newE)] <- 0
    arr <- matrix(unlist(strsplit(names(newE), "")), byrow = TRUE, 
        nrow = length(names(newE)))
    if (length(loc) < reg$nloc) {
        newE[!apply(as.matrix(arr[, -loc]) != ".", 1, sum) == 
            0] <- 0
    }
    if (remove0) {
        newE <- newE[newE != 0]
    }
    return(newE)
}

Try the noia package in your browser

Any scripts or data that you put into this service are public.

noia documentation built on March 31, 2023, 6:45 p.m.