ps_h2d_tag: Convert Hexidecimal to Decimal PIT Tags

View source: R/h2d-tag.R

ps_h2d_tagR Documentation

Convert Hexidecimal to Decimal PIT Tags

Description

Convert Hexidecimal to Decimal PIT Tags

Usage

ps_h2d_tag(hex, country_code = 900)

Arguments

hex

A string of the hex code.

country_code

Number of the country code to add to the decimal code.

Details

Any decimal codes 13 or more digits long will return NA. If the code is 12 digits long the country code is appended directly to the decimal value. If the decimal code is 11 digits or less then the decimal code is padded with zeros on the front to ensure the code is 12 digits long before appending the country code to the code.

Value

A string.

Examples

ps_h2d_tag("349EA72A50")
ps_h2d_tag("349EA70")
ps_h2d_tag("349EA72A50000")
ps_h2d_tag("349EA72A50", country_code = 124)

poissonconsulting/poisutils documentation built on Feb. 26, 2023, 10 a.m.