Что-то вроде этого?
gbuas_focus <- structure(list(user_agent_string = structure(c(1L, 2L, 3L, 4L,
5L, 8L, 9L, 10L, 10L, 11L, 11L, 12L, 12L, 6L, 7L, 13L, 14L, 14L,
15L, 15L), .Label = c("Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1",
"Mozilla/5.0 (iPhone; CPU iPhone OS 12_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
"Mozilla/5.0 (Linux; Android 9; SM-G960U Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.157 Mobile Safari/537.36",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36",
"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36",
"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36",
"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
), class = "factor"), uas_id = c("UAS1", "UAS2", "UAS3", "UAS4",
"UAS5", "UAS6", "UAS7", "UAS8", "UAS9", "UAS10", "UAS11", "UAS12",
"UAS13", "UAS14", "UAS15", "UAS16", "UAS17", "UAS18", "UAS19",
"UAS20"), uas_count = c(1380544L, 1133471L, 830636L, 646202L,
433693L, 432073L, 423441L, 313840L, 303530L, 270289L, 221152L,
201028L, 178423L, 169872L, 142562L, 130877L, 128819L, 111131L,
102078L, 96986L), classification = structure(c(1L, 1L, 2L, 1L,
1L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 2L
), .Label = c("Bot", "Human"), class = "factor"), duplicate = c("No",
"No", "No", "No", "No", "No", "No", "No", "Yes", "No", "Yes",
"No", "Yes", "No", "No", "No", "No", "Yes", "No", "Yes"), phantom_etsl = c(0L,
0L, 2L, 0L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L), headchr_plugins = c(2L, 2L, 2L, 2L, 1L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), headchr_chrome_obj = c(2L,
2L, 2L, 2L, 0L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L), headchr_permissions = c(2L, 2L, 2L, 2L, 2L, 2L,
2L, 0L, 2L, 0L, 2L, 0L, 2L, 2L, 2L, 0L, 0L, 2L, 0L, 2L), chr_memory = c(2L,
2L, 2L, 2L, 2L, 2L, 2L, 0L, 2L, 2L, 2L, 0L, 2L, 2L, 2L, 2L, 0L,
2L, 2L, 2L), mq_screen = c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L)), class = "data.frame", row.names = c(NA,
-20L))
library(tidyverse)
col<-names(gbuas_focus)[6:11]
gbuas_focus %>%
gather(key, value, one_of(col)) %>%
ggplot() +
geom_point(aes(x=key, y=value, colour=duplicate), size=2) +
coord_flip() +
facet_grid(uas_id ~ classification) +
labs(y='Score', x='Variable', title="Understanding Misclassifying Variables")
Создано в 2019-06-13 пакетом представлением (v0.3.0)