lundi 28 octobre 2019

How can I randomize numbers while validating that the output exists in another dataset?

I have one data set on US Loans but the the zip-codes have the last 2 digits blanked out so 35401 would be listed in the data as 354XX. To make the data plot-able, I wanted to randomize the last two digits so that the last two digits would be a random value from 00-99 where the output zip code would be a real zip code in the US (I have another data set that is simply a list of current US Zip codes). How could I do this in R?




Aucun commentaire:

Enregistrer un commentaire