# select
mtcars %>% as.tbl() %>%
dplyr::select(mpg,cyl,am,gear)
# mutate
mtcars %>% as.tbl() %>%...dplyr::select(mpg,cyl,am,gear) %>%
mutate(mpg1=mpg,
new=mpg*cyl)
# A...# filter
df = mtcars %>% as.tbl() %>%
dplyr::select(mpg,cyl,am,gear) %>%
mutate(mpg1=mpg,...,因子及数值类型相互转换,上述数据里面dbl 意思是数值类型(double class)我们现在产生新的字符串chr及因子fct。...代码如下
df = mtcars %>% as.tbl() %>%
dplyr::select(mpg,cyl,am,gear) %>%
mutate(mpg1=ifelse(mpg<25,