R/readColumns.R

read.columns <- function (filename, columns){
    start <- min(columns)
    length <- max(columns) - start + 1
    if (start == 1) {
        return(read.fwf(filename, widths = length))
    }
    else {
        return(read.fwf(filename, widths = c(start - 1, length))[, 2])
    }
}

Try the arm package in your browser

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

arm documentation built on April 1, 2024, 3:01 p.m.