GLUE package error in input values

It's hard to know without a Reproducible Example,
but Im guessing that input$pedido returns a value without the leading zeros like '54546' and since you are comparing to a character string obviously they don't match, you could use stringr::str_pad() to add the leading zeros.