I have a column in my dataframe with numerical values up to 6 digits - e.g., 145, 137549, 2355, etc. - and I need to convert the data into a character string format that starts with "PV" and ends with 6 digits. So, 145 -> "PV000145" and 137549 -> "PV137549" so the conversion is smart enough to add leading zeroes where needed. How can I do this in R?
I tried the format function but can't figure out the correct inputs to add PV every time and still retain the number that is already in the field.