dialr-example | R Documentation |
Produces example phone numbers for the given region
,
type
and valid
combinations. Input vectors are recycled as
necessary if a vector of length 1 is provided.
get_example(region, type = NULL, valid = TRUE)
region |
A character vector of ISO country codes. |
type |
A character vector of phone number types for each
region. If |
valid |
A logical vector. For each |
A phone vector.
get_example()
: PhoneNumberUtil.getExampleNumberForType()
;
PhoneNumberUtil.getExampleNumber()
if type
is NULL
or NA
;
PhoneNumberUtil.getInvalidExampleNumber()
if valid
is FALSE
.
get_supported_regions()
for valid region codes,
get_types_for_region()
to get valid phone types for a region.
Other phone functions:
dialr-match
,
dialr-phone
,
dialr-region
,
dialr-type
,
dialr-valid
,
dialr
# Get a basic example number
get_example("AU")
# Get an example mobile number
get_example("AU", type = "MOBILE")
# Example phone number for an invalid type
get_example("AU", type = "VOICEMAIL")
# Get an example invalid number
get_example("AU", valid = FALSE)
# Get a combination of the previous examples
get_example(c("AU", "AU", "AU", "AU" ),
c(NA, "MOBILE", "VOICEMAIL", NA ),
c(TRUE, TRUE, TRUE, FALSE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.