This should do it
newaddress <- address[nchar(address$V2) ==5 , ] #would also remove rows with more than 5 digits
EDIT after comment by @Matt:
Assuming the values in address$V2
are integer, you can also do the following:
address[address$V2 >= 10000 & address$V2 <100000, ]