(df_1 <- data.frame(unlabelled_stuff=c(1:12)))
# 5 digits numbers are in the range 10,000 - 99,9999 i.e. there are 89999 of them
# They are these :
(possibles <- seq(from=10000,to=99999))
#make a function to help us make a vector of arbitrary size that comes from that
assign_from_possible <- function(n,seed=42){
if(n>89999 | n<0){
stop("You asked for an impossible quantity meeting the criteria")
}
set.seed(seed)
sample( x=seq(from=10000,to=99999),
size = n,
replace = FALSE)
}
#use it
df_1$unique_rand_id <- assign_from_possible(nrow(df_1))
# see result
df_1