| ua_parse | R Documentation |
Takes in a character vector of user agent strings and returns a data frame (classed as tibble) of parsed user agent attributes.
ua_parse(user_agents, .progress = FALSE, useNA=FALSE)
get_cache()
user_agents |
a character vector of user agents |
.progress |
if 'TRUE' will display a progress bar in interactive mode |
useNA |
If 'TRUE' will ensure that for each user agent passed in a parsed result is returned and NA values will be returned for all attributes. The default value is FALSE for compatibility with existing behaviour. TRUE is recommended. When FALSE, NULL or zero length string user agent strings are not parsed and are not returned in the data frame and under some circumstances not all attributes are returned. |
a data frame classed as tibble with columns for:
user agent string (note that with useNA=TRUE a null string is returned as an NA value not a null)
user agent family (ua.family)
major & minor versions (ua.major, ua.minor)
patch level (ua.patch)
OS family (os.family)
major & minor OS versions (os.major, os.minor)
OS patch (os.patch)
device family (device.family)
device brand (device.brand) device model (device.model)
The Family values are identified as "Other" for unrecognised or unparseable user agent strings.
When useNA is true and the tibble package is available, an actual tibble is returned.
The regex YAML from uap-core is updated when the package is rebuilt. The date amd abbreviated hash of the last uap-core commit can be found in the NEWS file.
<https://github.com/ua-parser/uap-core/>
ua_parse(paste0("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.2 (KHTML, ",
"like Gecko) Ubuntu/11.10 Chromium/15.0.874.106 ",
"Chrome/15.0.874.106 Safari/535.2", collapse=""))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.