last <- seq.int(from = begin + 2, to = end, by = 3)
last <- seq.int(from = begin + 2, to = end, by = 3)
tempo <- sapply(X = pos, FUN = function(x = X){
tempo <- lapply(X = pos, FUN = function(x = X){
tempo.log <- x >= first & x <= last
tempo.log <- x >= first & x <= last
if(sum(tempo.log, na.rm = TRUE) != 1){ # check that 1 possible TRUE
if(sum(tempo.log, na.rm = TRUE) != 1){ # check that 1 possible TRUE
tempo.cat <- paste0("ERROR IN ", function.name, ": INTERNAL ERROR. CODE HAS TO BE MODIFIED")
tempo.cat <- paste0("ERROR IN ", function.name, ": INTERNAL ERROR. CODE HAS TO BE MODIFIED")
stop(paste0("\n\n================\n\n", tempo.cat, "\n\n================\n\n"), call. = FALSE) # == in stop() to be able to add several messages between ==
stop(paste0("\n\n================\n\n", tempo.cat, "\n\n================\n\n"), call. = FALSE) # == in stop() to be able to add several messages between ==