Skip to contents

internet methods, e.g., email addresses, domain names

Note

Note that if a locale you set doesn't have a locale specific set of data for PersonProvider or CompanyProvider we fall back to en_US

Super class

charlatan::BaseProvider -> InternetProvider

Public fields

locale

(character) the locale

safe_email_tlds

(character) safe email tlds

free_email_domains

(character) free email tlds

tlds

(character) tlds

uri_pages

(character) uri pages

uri_paths

(character) uri paths

uri_extensions

(character) uri extensions

user_name_formats

(character) user name formats

email_formats

(character) email formats

url_formats

(character) url formats

uri_formats

(character) uri formats

image_placeholder_services

(character) image uri formats

replacements

(list) a list

Methods

Inherited methods


Method allowed_locales()

fetch the allowed locales for this provider

Usage

InternetProvider$allowed_locales()


Method new()

Create a new InternetProvider object

Usage

InternetProvider$new(locale = NULL)

Arguments

locale

(character) the locale to use. See $allowed_locales() for locales supported (default: en_US)

Returns

A new InternetProvider object


Method to_ascii()

convert to ascii

Usage

InternetProvider$to_ascii(x)

Arguments

x

the stringn to convert to ascii


Method email()

get an email address

Usage

InternetProvider$email(domain = NULL)

Arguments

domain

(character) a domain name, if not given, a random name is chosen


Method safe_email()

get a safe email address

Usage

InternetProvider$safe_email()


Method free_email()

a free email address

Usage

InternetProvider$free_email()


Method company_email()

company email address

Usage

InternetProvider$company_email()


Method ascii_email()

ascii email address

Usage

InternetProvider$ascii_email()


Method ascii_safe_email()

safe ascii email address

Usage

InternetProvider$ascii_safe_email()


Method ascii_free_email()

an ascii free email address

Usage

InternetProvider$ascii_free_email()


Method ascii_company_email()

ascii company email address

Usage

InternetProvider$ascii_company_email()


Method user_name()

a user name

Usage

InternetProvider$user_name()


Method tld()

a tld

Usage

InternetProvider$tld()


Method free_email_domain()

free email domain name

Usage

InternetProvider$free_email_domain()


Method url()

a url

Usage

InternetProvider$url(schemes = NULL)

Arguments

schemes

(character vector) a url scheme, defaults are http and https


Method domain_name()

Produce an Internet domain name with the specified number of subdomain levels

Usage

InternetProvider$domain_name(levels = 1)

Arguments

levels

(integer) how many levels, must be >1


Method domain_word()

a domain word

Usage

InternetProvider$domain_word()


Method ipv4()

an ipv4 address or network

Usage

InternetProvider$ipv4(network = FALSE)

Arguments

network

(logical) produce a network


Method ipv6()

an ipv6 address or network

Usage

InternetProvider$ipv6(network = FALSE)

Arguments

network

(logical) produce a network


Method mac_address()

a mac address

Usage

InternetProvider$mac_address()


Method uri_page()

a uri page

Usage

InternetProvider$uri_page()


Method uri_path()

a uri path

Usage

InternetProvider$uri_path(deep = NULL)

Arguments

deep

how deep to go, an integer, if not given an integer between 1 and 4 (inclusive) is chosen


Method uri_extension()

a uri extension

Usage

InternetProvider$uri_extension()


Method uri()

a uri

Usage

InternetProvider$uri()


Method slug()

a slug

Usage

InternetProvider$slug(value = NULL)

Arguments

value

(character) a string, if given, returns itself, if not, uses LoremProvider to get a random string. default: NULL


Method image_url()

Returns URL to placeholder image - Example: http://placehold.it/640x480

Usage

InternetProvider$image_url(width = NULL, height = NULL)

Arguments

width

image width, in pixels

height

image height, in pixels


Method clone()

The objects of this class are cloneable with this method.

Usage

InternetProvider$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

(x <- InternetProvider$new())
#> <InternetProvider>
#>   Inherits from: <BaseProvider>
#>   Public:
#>     allowed_locales: function () 
#>     ascii_company_email: function () 
#>     ascii_email: function () 
#>     ascii_free_email: function () 
#>     ascii_safe_email: function () 
#>     bothify: function (text = "## ??") 
#>     check_locale: function (x) 
#>     clone: function (deep = FALSE) 
#>     company_email: function () 
#>     domain_name: function (levels = 1) 
#>     domain_word: function () 
#>     email: function (domain = NULL) 
#>     email_formats: {{user_name}}@{{domain_name}} {{user_name}}@{{free_email ...
#>     free_email: function () 
#>     free_email_domain: function () 
#>     free_email_domains: gmail.com yahoo.com hotmail.com
#>     image_placeholder_services: https://placeholdit.imgix.net/~text?txtsize=55&txt={{wid ...
#>     image_url: function (width = NULL, height = NULL) 
#>     initialize: function (locale = NULL) 
#>     ipv4: function (network = FALSE) 
#>     ipv6: function (network = FALSE) 
#>     lexify: function (text = "????") 
#>     locale: en_US
#>     mac_address: function () 
#>     numerify: function (text = "###") 
#>     random_digit: function () 
#>     random_digit_not_zero: function () 
#>     random_digit_not_zero_or_empty: function () 
#>     random_digit_or_empty: function () 
#>     random_element: function (x) 
#>     random_element_prob: function (x) 
#>     random_int: function (min = 0, max = 9999, size = 1) 
#>     random_letter: function () 
#>     randomize_nb_elements: function (number = 10, le = FALSE, ge = FALSE, min = NULL, max = NULL) 
#>     replacements: list
#>     safe_email: function () 
#>     safe_email_tlds: org com net
#>     slug: function (value = NULL) 
#>     tld: function () 
#>     tlds: com com com com com com biz info net org
#>     to_ascii: function (x) 
#>     uri: function () 
#>     uri_extension: function () 
#>     uri_extensions: .html .html .html .htm .htm .php .php .jsp .asp
#>     uri_formats: {{url}} {{url}}{{uri_page}}/ {{url}}{{uri_page}}{{uri_ex ...
#>     uri_page: function () 
#>     uri_pages: index home search main post homepage category register l ...
#>     uri_path: function (deep = NULL) 
#>     uri_paths: app main wp-content search category tag categories tags  ...
#>     url: function (schemes = NULL) 
#>     url_formats: www.{{domain_name}}/ {{domain_name}}/
#>     user_name: function () 
#>     user_name_formats: {{last_names}}.{{first_names}} {{first_names}}.{{last_na ...
#>   Private:
#>     has_locale: function (locale, provider) 
#>     locales: en_US en_AU en_NZ de_DE bg_BG cs_CZ fa_IR fr_FR hr_HR
#>     parse_eval_safe: function (name) 
x$locale
#> [1] "en_US"

# uri/url/tld/etc.
x$tld()
#> [1] "com"
x$slug()
#> [1] "mention-join-chair"
x$domain_word()
#> [1] "group"
x$domain_name()
#> [1] "renner.com"
x$domain_name(levels = 2)
#> [1] "koss.inc.com"
x$domain_name(levels = 3)
#> [1] "conroy.cartwright.mckenzie.net"
x$domain_name(levels = 10)
#> [1] "bins.leffler.llc.ltd.plc.frami.plc.carter.wilkinson.shanahan.com"
## url's
x$url()
#> [1] "https://www.o'hara.com/"
x$url(schemes = c('hbbp', 'hggp'))
#> [1] "hbbp://www.inc.com/"
x$image_url()
#> [1] "https://placeholdit.imgix.net/~text?txtsize=55&txt=156x145&w="
## uri's
x$uri()
#> [1] "https://gutkowski.info/list/tags/search.php"
x$uri_page()
#> [1] "login"
x$uri_extension()
#> [1] ".html"
x$uri_path()
#> [1] "wp-content/posts/main/tags"
x$uri_path(deep = 1)
#> [1] "list"
x$uri_path(deep = 2)
#> [1] "app/posts"
x$uri_path(deep = 3)
#> [1] "tag/main/blog"
x$uri_path(deep = 4)
#> [1] "categories/categories/app/main"

# user name
x$user_name()
#> [1] "onie25"

# emails
x$email()
#> [1] "[email protected]"
x$safe_email()
#> [1] "[email protected]"
x$free_email()
#> [1] "[email protected]"
x$company_email()
#> [1] "[email protected]"
x$free_email_domain()
#> [1] "hotmail.com"
x$ascii_email()
#> [1] "[email protected]"
x$ascii_safe_email()
#> [1] "[email protected]"
x$ascii_free_email()
#> [1] "[email protected]"
x$ascii_company_email()
#> [1] "[email protected]"

# addresses, mac, ipv4, ipv6
x$mac_address()
#> [1] "1f:c6:96:44:e5:d2:96"
if (requireNamespace("ipaddress", quietly=TRUE)) {
  x$ipv4()
  x$ipv4(network = TRUE)
  x$ipv6()
  x$ipv6(network = TRUE)
}
#> [1] "b2c8:d3b6:5206:dda:430::/78"

# different locales
(x <- InternetProvider$new(locale = "en_AU"))
#> <InternetProvider>
#>   Inherits from: <BaseProvider>
#>   Public:
#>     allowed_locales: function () 
#>     ascii_company_email: function () 
#>     ascii_email: function () 
#>     ascii_free_email: function () 
#>     ascii_safe_email: function () 
#>     bothify: function (text = "## ??") 
#>     check_locale: function (x) 
#>     clone: function (deep = FALSE) 
#>     company_email: function () 
#>     domain_name: function (levels = 1) 
#>     domain_word: function () 
#>     email: function (domain = NULL) 
#>     email_formats: {{user_name}}@{{domain_name}} {{user_name}}@{{free_email ...
#>     free_email: function () 
#>     free_email_domain: function () 
#>     free_email_domains: gmail.com yahoo.com hotmail.com yahoo.com.au hotmail.com.au
#>     image_placeholder_services: https://placeholdit.imgix.net/~text?txtsize=55&txt={{wid ...
#>     image_url: function (width = NULL, height = NULL) 
#>     initialize: function (locale = NULL) 
#>     ipv4: function (network = FALSE) 
#>     ipv6: function (network = FALSE) 
#>     lexify: function (text = "????") 
#>     locale: en_AU
#>     mac_address: function () 
#>     numerify: function (text = "###") 
#>     random_digit: function () 
#>     random_digit_not_zero: function () 
#>     random_digit_not_zero_or_empty: function () 
#>     random_digit_or_empty: function () 
#>     random_element: function (x) 
#>     random_element_prob: function (x) 
#>     random_int: function (min = 0, max = 9999, size = 1) 
#>     random_letter: function () 
#>     randomize_nb_elements: function (number = 10, le = FALSE, ge = FALSE, min = NULL, max = NULL) 
#>     replacements: list
#>     safe_email: function () 
#>     safe_email_tlds: org com net
#>     slug: function (value = NULL) 
#>     tld: function () 
#>     tlds: com com.au org org.au net net.au biz info edu edu.au
#>     to_ascii: function (x) 
#>     uri: function () 
#>     uri_extension: function () 
#>     uri_extensions: .html .html .html .htm .htm .php .php .jsp .asp
#>     uri_formats: {{url}} {{url}}{{uri_page}}/ {{url}}{{uri_page}}{{uri_ex ...
#>     uri_page: function () 
#>     uri_pages: index home search main post homepage category register l ...
#>     uri_path: function (deep = NULL) 
#>     uri_paths: app main wp-content search category tag categories tags  ...
#>     url: function (schemes = NULL) 
#>     url_formats: www.{{domain_name}}/ {{domain_name}}/
#>     user_name: function () 
#>     user_name_formats: {{last_names}}.{{first_names}} {{first_names}}.{{last_na ...
#>   Private:
#>     has_locale: function (locale, provider) 
#>     locales: en_US en_AU en_NZ de_DE bg_BG cs_CZ fa_IR fr_FR hr_HR
#>     parse_eval_safe: function (name) 
x$locale
#> [1] "en_AU"
x$tld()
#> [1] "net.au"
x$email()
#> [1] "[email protected]"
x$free_email_domain()
#> [1] "hotmail.com.au"

(x <- InternetProvider$new(locale = "de_DE"))
#> <InternetProvider>
#>   Inherits from: <BaseProvider>
#>   Public:
#>     allowed_locales: function () 
#>     ascii_company_email: function () 
#>     ascii_email: function () 
#>     ascii_free_email: function () 
#>     ascii_safe_email: function () 
#>     bothify: function (text = "## ??") 
#>     check_locale: function (x) 
#>     clone: function (deep = FALSE) 
#>     company_email: function () 
#>     domain_name: function (levels = 1) 
#>     domain_word: function () 
#>     email: function (domain = NULL) 
#>     email_formats: {{user_name}}@{{domain_name}} {{user_name}}@{{free_email ...
#>     free_email: function () 
#>     free_email_domain: function () 
#>     free_email_domains: aol.de gmail.com gmx.de googlemail.com hotmail.de web.de ...
#>     image_placeholder_services: https://placeholdit.imgix.net/~text?txtsize=55&txt={{wid ...
#>     image_url: function (width = NULL, height = NULL) 
#>     initialize: function (locale = NULL) 
#>     ipv4: function (network = FALSE) 
#>     ipv6: function (network = FALSE) 
#>     lexify: function (text = "????") 
#>     locale: de_DE
#>     mac_address: function () 
#>     numerify: function (text = "###") 
#>     random_digit: function () 
#>     random_digit_not_zero: function () 
#>     random_digit_not_zero_or_empty: function () 
#>     random_digit_or_empty: function () 
#>     random_element: function (x) 
#>     random_element_prob: function (x) 
#>     random_int: function (min = 0, max = 9999, size = 1) 
#>     random_letter: function () 
#>     randomize_nb_elements: function (number = 10, le = FALSE, ge = FALSE, min = NULL, max = NULL) 
#>     replacements: list
#>     safe_email: function () 
#>     safe_email_tlds: org com net
#>     slug: function (value = NULL) 
#>     tld: function () 
#>     tlds: com com com net org de de de
#>     to_ascii: function (x) 
#>     uri: function () 
#>     uri_extension: function () 
#>     uri_extensions: .html .html .html .htm .htm .php .php .jsp .asp
#>     uri_formats: {{url}} {{url}}{{uri_page}}/ {{url}}{{uri_page}}{{uri_ex ...
#>     uri_page: function () 
#>     uri_pages: index home search main post homepage category register l ...
#>     uri_path: function (deep = NULL) 
#>     uri_paths: app main wp-content search category tag categories tags  ...
#>     url: function (schemes = NULL) 
#>     url_formats: www.{{domain_name}}/ {{domain_name}}/
#>     user_name: function () 
#>     user_name_formats: {{last_names}}.{{first_names}} {{first_names}}.{{last_na ...
#>   Private:
#>     has_locale: function (locale, provider) 
#>     locales: en_US en_AU en_NZ de_DE bg_BG cs_CZ fa_IR fr_FR hr_HR
#>     parse_eval_safe: function (name) 
x$locale
#> [1] "de_DE"
x$tld()
#> [1] "de"
x$uri()
#> [1] "http://www.ltd.de/posts/list/main/main/about.asp"
x$email()
#> [1] "[email protected]"
x$ascii_email()
#> [1] "[email protected]"

(x <- InternetProvider$new(locale = "bg_BG"))
#> <InternetProvider>
#>   Inherits from: <BaseProvider>
#>   Public:
#>     allowed_locales: function () 
#>     ascii_company_email: function () 
#>     ascii_email: function () 
#>     ascii_free_email: function () 
#>     ascii_safe_email: function () 
#>     bothify: function (text = "## ??") 
#>     check_locale: function (x) 
#>     clone: function (deep = FALSE) 
#>     company_email: function () 
#>     domain_name: function (levels = 1) 
#>     domain_word: function () 
#>     email: function (domain = NULL) 
#>     email_formats: {{user_name}}@{{free_email_domain}} {{user_name}}@{{doma ...
#>     free_email: function () 
#>     free_email_domain: function () 
#>     free_email_domains: gmail.com yahoo.com hotmail.com mail.bg abv.bg dir.bg
#>     image_placeholder_services: https://placeholdit.imgix.net/~text?txtsize=55&txt={{wid ...
#>     image_url: function (width = NULL, height = NULL) 
#>     initialize: function (locale = NULL) 
#>     ipv4: function (network = FALSE) 
#>     ipv6: function (network = FALSE) 
#>     lexify: function (text = "????") 
#>     locale: bg_BG
#>     mac_address: function () 
#>     numerify: function (text = "###") 
#>     random_digit: function () 
#>     random_digit_not_zero: function () 
#>     random_digit_not_zero_or_empty: function () 
#>     random_digit_or_empty: function () 
#>     random_element: function (x) 
#>     random_element_prob: function (x) 
#>     random_int: function (min = 0, max = 9999, size = 1) 
#>     random_letter: function () 
#>     randomize_nb_elements: function (number = 10, le = FALSE, ge = FALSE, min = NULL, max = NULL) 
#>     replacements: list
#>     safe_email: function () 
#>     safe_email_tlds: org com net
#>     slug: function (value = NULL) 
#>     tld: function () 
#>     tlds: bg com biz info net org edu
#>     to_ascii: function (x) 
#>     uri: function () 
#>     uri_extension: function () 
#>     uri_extensions: .html .html .html .htm .htm .php .php .jsp .asp
#>     uri_formats: {{url}} {{url}}{{uri_page}}/ {{url}}{{uri_page}}{{uri_ex ...
#>     uri_page: function () 
#>     uri_pages: index home search main post homepage category register l ...
#>     uri_path: function (deep = NULL) 
#>     uri_paths: app main wp-content search category tag categories tags  ...
#>     url: function (schemes = NULL) 
#>     url_formats: www.{{domain_name}}/ {{domain_name}}/
#>     user_name: function () 
#>     user_name_formats: {{last_name_female}}.{{first_name_female}} {{last_name_m ...
#>   Private:
#>     has_locale: function (locale, provider) 
#>     locales: en_US en_AU en_NZ de_DE bg_BG cs_CZ fa_IR fr_FR hr_HR
#>     parse_eval_safe: function (name) 
x$locale
#> [1] "bg_BG"
x$tld()
#> [1] "com"
x$uri()
#> [1] "http://and.biz/home/"
x$url()
#> [1] "http://www.group.net/"
x$user_name()
#> [1] "."
x$email()
#> [1] "[email protected]"
x$ascii_email()
#> [1] "[email protected]"

(x <- InternetProvider$new(locale = "cs_CZ"))
#> <InternetProvider>
#>   Inherits from: <BaseProvider>
#>   Public:
#>     allowed_locales: function () 
#>     ascii_company_email: function () 
#>     ascii_email: function () 
#>     ascii_free_email: function () 
#>     ascii_safe_email: function () 
#>     bothify: function (text = "## ??") 
#>     check_locale: function (x) 
#>     clone: function (deep = FALSE) 
#>     company_email: function () 
#>     domain_name: function (levels = 1) 
#>     domain_word: function () 
#>     email: function (domain = NULL) 
#>     email_formats: {{user_name}}@{{free_email_domain}}
#>     free_email: function () 
#>     free_email_domain: function () 
#>     free_email_domains: seznam.cz gmail.com email.cz post.cz chello.cz centrum.c ...
#>     image_placeholder_services: https://placeholdit.imgix.net/~text?txtsize=55&txt={{wid ...
#>     image_url: function (width = NULL, height = NULL) 
#>     initialize: function (locale = NULL) 
#>     ipv4: function (network = FALSE) 
#>     ipv6: function (network = FALSE) 
#>     lexify: function (text = "????") 
#>     locale: cs_CZ
#>     mac_address: function () 
#>     numerify: function (text = "###") 
#>     random_digit: function () 
#>     random_digit_not_zero: function () 
#>     random_digit_not_zero_or_empty: function () 
#>     random_digit_or_empty: function () 
#>     random_element: function (x) 
#>     random_element_prob: function (x) 
#>     random_int: function (min = 0, max = 9999, size = 1) 
#>     random_letter: function () 
#>     randomize_nb_elements: function (number = 10, le = FALSE, ge = FALSE, min = NULL, max = NULL) 
#>     replacements: list
#>     safe_email: function () 
#>     safe_email_tlds: org com net
#>     slug: function (value = NULL) 
#>     tld: function () 
#>     tlds: cz com cz
#>     to_ascii: function (x) 
#>     uri: function () 
#>     uri_extension: function () 
#>     uri_extensions: .html .html .html .htm .htm .php .php .jsp .asp
#>     uri_formats: {{url}} {{url}}{{uri_page}}/ {{url}}{{uri_page}}{{uri_ex ...
#>     uri_page: function () 
#>     uri_pages: index home search main post homepage category register l ...
#>     uri_path: function (deep = NULL) 
#>     uri_paths: app main wp-content search category tag categories tags  ...
#>     url: function (schemes = NULL) 
#>     url_formats: www.{{domain_name}}/ {{domain_name}}/
#>     user_name: function () 
#>     user_name_formats: {{last_names_female}}.{{first_names_female}} {{last_name ...
#>   Private:
#>     has_locale: function (locale, provider) 
#>     locales: en_US en_AU en_NZ de_DE bg_BG cs_CZ fa_IR fr_FR hr_HR
#>     parse_eval_safe: function (name) 
x$url()
#> [1] "https://and.com/"
x$user_name()
#> [1] "ynovotny"
x$email()
#> [1] "[email protected]"

(x <- InternetProvider$new(locale = "en_NZ"))
#> <InternetProvider>
#>   Inherits from: <BaseProvider>
#>   Public:
#>     allowed_locales: function () 
#>     ascii_company_email: function () 
#>     ascii_email: function () 
#>     ascii_free_email: function () 
#>     ascii_safe_email: function () 
#>     bothify: function (text = "## ??") 
#>     check_locale: function (x) 
#>     clone: function (deep = FALSE) 
#>     company_email: function () 
#>     domain_name: function (levels = 1) 
#>     domain_word: function () 
#>     email: function (domain = NULL) 
#>     email_formats: {{user_name}}@{{domain_name}} {{user_name}}@{{free_email ...
#>     free_email: function () 
#>     free_email_domain: function () 
#>     free_email_domains: gmail.com yahoo.com hotmail.com inspire.net.nz xtra.co.nz
#>     image_placeholder_services: https://placeholdit.imgix.net/~text?txtsize=55&txt={{wid ...
#>     image_url: function (width = NULL, height = NULL) 
#>     initialize: function (locale = NULL) 
#>     ipv4: function (network = FALSE) 
#>     ipv6: function (network = FALSE) 
#>     lexify: function (text = "????") 
#>     locale: en_NZ
#>     mac_address: function () 
#>     numerify: function (text = "###") 
#>     random_digit: function () 
#>     random_digit_not_zero: function () 
#>     random_digit_not_zero_or_empty: function () 
#>     random_digit_or_empty: function () 
#>     random_element: function (x) 
#>     random_element_prob: function (x) 
#>     random_int: function (min = 0, max = 9999, size = 1) 
#>     random_letter: function () 
#>     randomize_nb_elements: function (number = 10, le = FALSE, ge = FALSE, min = NULL, max = NULL) 
#>     replacements: list
#>     safe_email: function () 
#>     safe_email_tlds: org com net
#>     slug: function (value = NULL) 
#>     tld: function () 
#>     tlds: nz co.nz org.nz kiwi kiwi.nz geek.nz net.nz school.nz ac ...
#>     to_ascii: function (x) 
#>     uri: function () 
#>     uri_extension: function () 
#>     uri_extensions: .html .html .html .htm .htm .php .php .jsp .asp
#>     uri_formats: {{url}} {{url}}{{uri_page}}/ {{url}}{{uri_page}}{{uri_ex ...
#>     uri_page: function () 
#>     uri_pages: index home search main post homepage category register l ...
#>     uri_path: function (deep = NULL) 
#>     uri_paths: app main wp-content search category tag categories tags  ...
#>     url: function (schemes = NULL) 
#>     url_formats: www.{{domain_name}}/ {{domain_name}}/
#>     user_name: function () 
#>     user_name_formats: {{last_names}}.{{first_names}} {{first_names}}.{{last_na ...
#>   Private:
#>     has_locale: function (locale, provider) 
#>     locales: en_US en_AU en_NZ de_DE bg_BG cs_CZ fa_IR fr_FR hr_HR
#>     parse_eval_safe: function (name) 
x$free_email_domain()
#> [1] "hotmail.com"
x$tld()
#> [1] "geek.nz"

(x <- InternetProvider$new(locale = "fa_IR"))
#> <InternetProvider>
#>   Inherits from: <BaseProvider>
#>   Public:
#>     allowed_locales: function () 
#>     ascii_company_email: function () 
#>     ascii_email: function () 
#>     ascii_free_email: function () 
#>     ascii_safe_email: function () 
#>     bothify: function (text = "## ??") 
#>     check_locale: function (x) 
#>     clone: function (deep = FALSE) 
#>     company_email: function () 
#>     domain_name: function (levels = 1) 
#>     domain_word: function () 
#>     email: function (domain = NULL) 
#>     email_formats: {{user_name}}@{{domain_name}} {{user_name}}@{{free_email ...
#>     free_email: function () 
#>     free_email_domain: function () 
#>     free_email_domains: chmail.ir mailfa.com gmail.com hotmail.com yahoo.com
#>     image_placeholder_services: https://placeholdit.imgix.net/~text?txtsize=55&txt={{wid ...
#>     image_url: function (width = NULL, height = NULL) 
#>     initialize: function (locale = NULL) 
#>     ipv4: function (network = FALSE) 
#>     ipv6: function (network = FALSE) 
#>     lexify: function (text = "????") 
#>     locale: fa_IR
#>     mac_address: function () 
#>     numerify: function (text = "###") 
#>     random_digit: function () 
#>     random_digit_not_zero: function () 
#>     random_digit_not_zero_or_empty: function () 
#>     random_digit_or_empty: function () 
#>     random_element: function (x) 
#>     random_element_prob: function (x) 
#>     random_int: function (min = 0, max = 9999, size = 1) 
#>     random_letter: function () 
#>     randomize_nb_elements: function (number = 10, le = FALSE, ge = FALSE, min = NULL, max = NULL) 
#>     replacements: list
#>     safe_email: function () 
#>     safe_email_tlds: com net ir org
#>     slug: function (value = NULL) 
#>     tld: function () 
#>     tlds: com com com net org ir ir ir
#>     to_ascii: function (x) 
#>     uri: function () 
#>     uri_extension: function () 
#>     uri_extensions: .html .html .html .htm .htm .php .php .jsp .asp
#>     uri_formats: {{url}} {{url}}{{uri_page}}/ {{url}}{{uri_page}}{{uri_ex ...
#>     uri_page: function () 
#>     uri_pages: index home search main post homepage category register l ...
#>     uri_path: function (deep = NULL) 
#>     uri_paths: app main wp-content search category tag categories tags  ...
#>     url: function (schemes = NULL) 
#>     url_formats: www.{{domain_name}}/ {{domain_name}}/
#>     user_name: function () 
#>     user_name_formats: {{last_names}}.{{first_names}} {{first_names}}.{{last_na ...
#>   Private:
#>     has_locale: function (locale, provider) 
#>     locales: en_US en_AU en_NZ de_DE bg_BG cs_CZ fa_IR fr_FR hr_HR
#>     parse_eval_safe: function (name) 
x$url()
#> [1] "http://www.llc.com/"

(x <- InternetProvider$new(locale = "fr_FR"))
#> <InternetProvider>
#>   Inherits from: <BaseProvider>
#>   Public:
#>     allowed_locales: function () 
#>     ascii_company_email: function () 
#>     ascii_email: function () 
#>     ascii_free_email: function () 
#>     ascii_safe_email: function () 
#>     bothify: function (text = "## ??") 
#>     check_locale: function (x) 
#>     clone: function (deep = FALSE) 
#>     company_email: function () 
#>     domain_name: function (levels = 1) 
#>     domain_word: function () 
#>     email: function (domain = NULL) 
#>     email_formats: {{user_name}}@{{domain_name}} {{user_name}}@{{free_email ...
#>     free_email: function () 
#>     free_email_domain: function () 
#>     free_email_domains: voila.fr gmail.com hotmail.fr yahoo.fr laposte.net free. ...
#>     image_placeholder_services: https://placeholdit.imgix.net/~text?txtsize=55&txt={{wid ...
#>     image_url: function (width = NULL, height = NULL) 
#>     initialize: function (locale = NULL) 
#>     ipv4: function (network = FALSE) 
#>     ipv6: function (network = FALSE) 
#>     lexify: function (text = "????") 
#>     locale: fr_FR
#>     mac_address: function () 
#>     numerify: function (text = "###") 
#>     random_digit: function () 
#>     random_digit_not_zero: function () 
#>     random_digit_not_zero_or_empty: function () 
#>     random_digit_or_empty: function () 
#>     random_element: function (x) 
#>     random_element_prob: function (x) 
#>     random_int: function (min = 0, max = 9999, size = 1) 
#>     random_letter: function () 
#>     randomize_nb_elements: function (number = 10, le = FALSE, ge = FALSE, min = NULL, max = NULL) 
#>     replacements: list
#>     safe_email: function () 
#>     safe_email_tlds: com net fr fr
#>     slug: function (value = NULL) 
#>     tld: function () 
#>     tlds: com com com net org fr fr fr
#>     to_ascii: function (x) 
#>     uri: function () 
#>     uri_extension: function () 
#>     uri_extensions: .html .html .html .htm .htm .php .php .jsp .asp
#>     uri_formats: {{url}} {{url}}{{uri_page}}/ {{url}}{{uri_page}}{{uri_ex ...
#>     uri_page: function () 
#>     uri_pages: index home search main post homepage category register l ...
#>     uri_path: function (deep = NULL) 
#>     uri_paths: app main wp-content search category tag categories tags  ...
#>     url: function (schemes = NULL) 
#>     url_formats: www.{{domain_name}}/ {{domain_name}}/
#>     user_name: function () 
#>     user_name_formats: {{last_names}}.{{first_names}} {{first_names}}.{{last_na ...
#>   Private:
#>     has_locale: function (locale, provider) 
#>     locales: en_US en_AU en_NZ de_DE bg_BG cs_CZ fa_IR fr_FR hr_HR
#>     parse_eval_safe: function (name) 
x$url()
#> [1] "http://botsford.net/"
x$user_name()
#> [1] "leroux.alain"
x$email()
#> [1] "[email protected]"

(x <- InternetProvider$new(locale = "hr_HR"))
#> <InternetProvider>
#>   Inherits from: <BaseProvider>
#>   Public:
#>     allowed_locales: function () 
#>     ascii_company_email: function () 
#>     ascii_email: function () 
#>     ascii_free_email: function () 
#>     ascii_safe_email: function () 
#>     bothify: function (text = "## ??") 
#>     check_locale: function (x) 
#>     clone: function (deep = FALSE) 
#>     company_email: function () 
#>     domain_name: function (levels = 1) 
#>     domain_word: function () 
#>     email: function (domain = NULL) 
#>     email_formats: {{user_name}}@{{domain_name}} {{user_name}}@{{free_email ...
#>     free_email: function () 
#>     free_email_domain: function () 
#>     free_email_domains: gmail.com hotmail.com yahoo.com net.hr zg.t-com.hr inet. ...
#>     image_placeholder_services: https://placeholdit.imgix.net/~text?txtsize=55&txt={{wid ...
#>     image_url: function (width = NULL, height = NULL) 
#>     initialize: function (locale = NULL) 
#>     ipv4: function (network = FALSE) 
#>     ipv6: function (network = FALSE) 
#>     lexify: function (text = "????") 
#>     locale: hr_HR
#>     mac_address: function () 
#>     numerify: function (text = "###") 
#>     random_digit: function () 
#>     random_digit_not_zero: function () 
#>     random_digit_not_zero_or_empty: function () 
#>     random_digit_or_empty: function () 
#>     random_element: function (x) 
#>     random_element_prob: function (x) 
#>     random_int: function (min = 0, max = 9999, size = 1) 
#>     random_letter: function () 
#>     randomize_nb_elements: function (number = 10, le = FALSE, ge = FALSE, min = NULL, max = NULL) 
#>     replacements: list
#>     safe_email: function () 
#>     safe_email_tlds: org com net
#>     slug: function (value = NULL) 
#>     tld: function () 
#>     tlds: hr com com.hr info org net biz
#>     to_ascii: function (x) 
#>     uri: function () 
#>     uri_extension: function () 
#>     uri_extensions: .html .html .html .htm .htm .php .php .jsp .asp
#>     uri_formats: {{url}} {{url}}{{uri_page}}/ {{url}}{{uri_page}}{{uri_ex ...
#>     uri_page: function () 
#>     uri_pages: index home search main post homepage category register l ...
#>     uri_path: function (deep = NULL) 
#>     uri_paths: app main wp-content search category tag categories tags  ...
#>     url: function (schemes = NULL) 
#>     url_formats: www.{{domain_name}}/ {{domain_name}}/
#>     user_name: function () 
#>     user_name_formats: {{last_names}}.{{first_names}} {{first_names}}.{{last_na ...
#>   Private:
#>     has_locale: function (locale, provider) 
#>     locales: en_US en_AU en_NZ de_DE bg_BG cs_CZ fa_IR fr_FR hr_HR
#>     parse_eval_safe: function (name) 
x$url()
#> [1] "http://gerhold.net/"
x$user_name()
#> [1] "radin.sasa"
x$email()
#> [1] "[email protected]"

# convert a string to ascii with stringi pkg
if (requireNamespace("stringi", quietly=TRUE)) {
  x$to_ascii("anï")
}
#> [1] "ani"