I am trying to do the following which doesn't work although the last line where I do the same calculation works. Using mutate I get an error "In Begin:End : numerical expression has 2 elements: only the first used"
library(tidyverse)
l_noga <- c(1:4)
mydata <- tibble(Begin = c(1,5), End = c(3,9)) %>%
mutate(freq = sum(Begin:End %in% l_noga))
# This is, however working:
sum(3:9 %in% l_noga)