user agent methods
Super class
charlatan::BaseProvider
-> UserAgentProvider
Public fields
locale
(character) the locale
user_agents
(character) user agent browser specific strings
windows_platform_tokens
(character) windows platform tokens
linux_processors
(character) linux processor options
mac_processors
(character) mac processor options
Methods
Inherited methods
charlatan::BaseProvider$bothify()
charlatan::BaseProvider$check_locale()
charlatan::BaseProvider$lexify()
charlatan::BaseProvider$numerify()
charlatan::BaseProvider$random_digit()
charlatan::BaseProvider$random_digit_not_zero()
charlatan::BaseProvider$random_digit_not_zero_or_empty()
charlatan::BaseProvider$random_digit_or_empty()
charlatan::BaseProvider$random_element()
charlatan::BaseProvider$random_element_prob()
charlatan::BaseProvider$random_int()
charlatan::BaseProvider$random_letter()
charlatan::BaseProvider$randomize_nb_elements()
Method new()
Create a new UserAgentProvider
object
Usage
UserAgentProvider$new(locale = NULL)
Method chrome()
a chrome user agent string
Examples
(x <- UserAgentProvider$new())
#> <UserAgentProvider>
#> Inherits from: <BaseProvider>
#> Public:
#> allowed_locales: function ()
#> bothify: function (text = "## ??")
#> check_locale: function (x)
#> chrome: function (version_from = 13, version_to = 63, build_from = 800,
#> clone: function (deep = FALSE)
#> firefox: function ()
#> initialize: function (locale = NULL)
#> internet_explorer: function ()
#> lexify: function (text = "????")
#> linux_platform_token: function ()
#> linux_processor: function ()
#> linux_processors: i686 x86_64
#> locale: en_US
#> mac_platform_token: function ()
#> mac_processor: function ()
#> mac_processors: Intel PPC U; Intel U; PPC
#> numerify: function (text = "###")
#> opera: function ()
#> 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)
#> safari: function ()
#> user_agent: function ()
#> user_agents: chrome firefox internet_explorer opera safari
#> windows_platform_token: function ()
#> windows_platform_tokens: Windows 95 Windows 98 Windows 98; Win 9x 4.90 Windows CE ...
#> Private:
#> locales: en_US
x$locale
#> [1] "en_US"
x$mac_processor()
#> [1] "PPC"
x$linux_processor()
#> [1] "x86_64"
x$user_agent()
#> [1] "Mozilla/5.0 (Windows NT 6.1; ia-FR; rv:1.9.1.20) Gecko/2015-04-29 18:03:32 Firefox/3.8"
x$chrome()
#> [1] "Mozilla/5.0 (X11; Linux i686) AppleWebKit/5341 (KHTML, like Gecko) Chrome/13.0.822.0 Safari/5341"
x$firefox()
#> [1] "Mozilla/5.0 (X11; Linux i686; rv:1.9.7.20) Gecko/2018-10-01 14:55:38 Firefox/3.8"
x$internet_explorer()
#> [1] "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.1)"
x$opera()
#> [1] "Opera/8.24.(X11; Linux x86_64; mt-MT) Presto/2.9.165 Version/12.00"
x$safari()
#> [1] "Mozilla/5.0 (Windows; U; Windows NT 5.2) AppleWebKit/535.29.4 (KHTML, like Gecko) Version/4.0.3 Safari/535.29.4"