我 words <- c("word1", "word")
text <- c("this is word1", "this is word2", "this is word4")
如果我使用sapply(words, grepl, text)让你真假回答的列表, 代替我怎样让这个已经匹配了确切的话 使得答案将是 "this is word1"
我对R这个愚蠢的问题是新来的。 欢迎任何想
另据帧匹配我是比较新的R. 我有一个数据帧locs有1可变V1,看起来像: V1
edmonton general hospital
cardiovascular institute, hospital san carlos, madrid spain
hospital of santa maria, lisbon, portugal
,并且有另一个数据帧cities两个变量如下所示:
我处理的是如下 Has no anorexia
She denies anorexia
Has anorexia
Positive for Anorexia
我的目标是排除有话像denies, denied, no,只保留厌食的积极迹象句子句的句子。 最终的结果应该是 Has anorexia
Positive for Anorexia
我试着用g