ShORCIDs.Rd
These functions produce ShOCRIDs (Short ORCIDs) from ORCIDs and vice versa.
orcid_to_shorcid(x)
shorcid_to_orcid(x)
The ShORCID(s) or ORCID(s), as a character vector.
Conversion ORCID to ShORCID occurs by detaching the last character (the
checksum) and storing it. Then in the first string of characters, all
non-numbers are removed and the resulting number is converted to a base 30
system with numericToBase30()
. The checksum is then re-attached. This is
done separately because the checksum can be X (i.e. the only character in an
ORCID that's not necessarily numeric). Then, an 'i' is prepended to ensure
that the ShORCID starts with a letter. Conversion the other way around just
inverts the process (and so uses base30toNumeric()
).
orcid_to_shorcid("0000-0002-9540-5371");
#> [1] "i16g2sk1"
shorcid_to_orcid("i16g2sk1");
#> [1] "0000-0002-9540-5371"