我有一个data.frame命名all,其中包含一系列因子,这些因素包括"word","nonword"以及其他一些因素.我的目标是只选择具有因子值"word"的行.
all
"word"
"nonword"
我的解决方案grep("\bword\b",all[,5])没有返回
grep("\bword\b",all[,5])
如何识别单词边界?
regex r word-boundary dataframe
dataframe ×1
r ×1
regex ×1
word-boundary ×1