R/base_stackFragment.R

Defines functions .stackFragment

Documented in .stackFragment

# stack fragment (projection to coordinates)

.stackFragment <- function( fragmentMat ) {

    if ( !is.na(fragmentMat[1,1]) ) {
        xvarq <- c( min(fragmentMat[,1]), max(fragmentMat[,2]) )
        xvar <- c(seq(from = xvarq[1], to = xvarq[2]))
        yvar <- .ff_stack( fragmentMat[,1], fragmentMat[,2], xvarq[1], xvarq[2] )

        outMat <- cbind( xvar, yvar )
    } else {
        outMat <- matrix( NA )
    }

    return( outMat )
}

Try the dpeak package in your browser

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

dpeak documentation built on Nov. 8, 2020, 7:45 p.m.