通过R中的向量在列表中查找一些元素

时间:2017-06-30 17:13:06

标签: r

我有一个文字和一些要在其中找到的词语。

示例:

test = 'a sentence full of text'
search = c('a', 'sentence', 'error')

我正在使用匹配,但它出错...

匹配(搜索,测试)

[1] NA NA NA

我想获得一个关于这个词的索引或向量包含TRUE / FALSE ...

示例:

[1] 1 2 (index)

[1] TRUE TRUE FALSE

韩国社交协会

1 个答案:

答案 0 :(得分:1)

喜欢这个fetch(AppConstants.TODOS, { method: 'POST', body: JSON.stringify(values) }) .then(response => response.text()) .then((body) => { console.log(body); });