过滤数据框
1.dplyr包
dplyr包使用dplyr包中的filter函数根据数据框中某一列进行数据过滤,这个过滤只能进行数字的比较
2.stringr配合过滤
stringr配合过滤使用stringr包中的str_detect函数对某一列进行正则过滤
filter(b,str_detect(V1,pattern = "^e"))
Last updated
Was this helpful?
dplyr包使用dplyr包中的filter函数根据数据框中某一列进行数据过滤,这个过滤只能进行数字的比较
stringr配合过滤使用stringr包中的str_detect函数对某一列进行正则过滤
filter(b,str_detect(V1,pattern = "^e"))
Last updated
Was this helpful?