The format_aid
function formats (numeric) AID IDs into character strings
of a predefined length (parameter length
) adding leading "0"
s to the
provided ID (x
).
format_aid(x, length = 10)
numeric
with the IDs to format.
integer(1)
defining the length (in characters) of the AID
format.
character
with the formated AID.
format_aid(c(1, 2, 3))
#> [1] "0000000001" "0000000002" "0000000003"
## IDs provided as `character` are not formatted.
format_aid("hello")
#> [1] "hello"