r – `recode` (dplyr) function does not accept numerical ranges

Consider the vector:

x <-runif (30,20,100)

I would like to categorize this vector with the function recode of package dplyr. The intervals can be arbitrary. For example:

  • from 20 to 50 = 1
  • from 51 to 75 = 2
  • from 76 to 100 = 3

I know that I can launch other packages and functions to execute this action. But, my intention is, specifically, to do this with the function recode of dplyr. I have already tried to do this in many ways, but so far I have not succeeded.