Helper function to clean up long vectors

cleanLong(currentlong, sub, currentbp)

Arguments

currentlong

numeric vector of current parameter values

sub

numeric vector of indices to subset

currentbp

numeric vector of current breakpoints

Value

numeric vector of cleaned up parameter values

Examples


currentlong <- c(1, 2, NA, 4, 5)
sub <- c(1, 2, 4, 5)
currentbp <- c(1, 3)
cleanLong(currentlong, sub, currentbp)
#> [1] 1 2 4 5 1 2 4 5