Error when using mutate to label sets of rows in dataset

Hi, can you provide a reproducible example of your dataset and perhaps an example of the output you are after?

This is a very basic example anyway:

library(tidyverse)

tibble(year = seq(1974, 2009, 1)) %>% 
  mutate(x = case_when(year %in% 1974:1979 ~ "I",
                     year %in% 1980:1984  ~ "II",
                     TRUE ~ "III"))

# A tibble: 36 x 2
    year x    
   <dbl> <chr>
 1  1974 I    
 2  1975 I    
 3  1976 I    
 4  1977 I    
 5  1978 I    
 6  1979 I    
 7  1980 II   
 8  1981 II   
 9  1982 II   
10  1983 II   
# ... with 26 more rows