Tidyverse 中的分类数据
Emily Robinson
Data Scientist
gathered_data %>%
distinct(response_var)
# A tibble: 9 x 1
response_var
<chr>
1 在飞机上换到未售出的座位是否失礼?
2 一般来说,和陌生人多说几句是否失礼?
3 在飞机上放倒座椅是否失礼?
4 为了更靠近某人而请他与您换座位是否失礼?
5 为了更靠近某人而请他与您换座位是否失礼?
6 若您要去洗手间,叫醒乘客是否失礼?
7 若您想走动,叫醒乘客是否失礼?
8 一般而言,带婴儿上飞机是否失礼?
9 一般而言,明知孩子会吵闹仍带其上飞机是否失礼?
str_detect("happy", ".")
[1] TRUE
str_detect("happy", "h.")
[1] TRUE
str_detect("happy", "y.")
[1] FALSE
string <- "Statistics is the best"
str_remove(string, ".*the ")
[1] "best"
Tidyverse 中的分类数据