This function generates a random completion code with a specified number of digits. The code is returned as a character string.
Examples
library(surveydown)
sd_completion_code() # generates a 6-digit code
#> [1] "545358"
sd_completion_code(digits = 8) # generates an 8-digit code
#> [1] "47164415"
sd_completion_code(digits = 4) # generates a 4-digit code
#> [1] "7285"
sd_completion_code(digits = 10) # generates a 10-digit code
#> [1] "6585941037"