grep在R中没有正确搜索 [英] grepl not searching correctly in R
本文介绍了grep在R中没有正确搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在向量中搜索.com,但grepl不适合我。有人知道为什么我正在做以下工作:
I want to search ".com" in a vector, but grepl isn't working out for me. Anyone know why? I am doing the following
vector <- c("fdsfds.com","fdsfcom")
grepl(".com",vector)
返回
This returns
[1] TRUE TRUE
我想要它请严格引用fdsfds.com。
I want it to strictly refer to "fdsfds.com"
推荐答案
这篇关于grep在R中没有正确搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文