美文网首页
20190506-R语言向量操作函数match、pmatch、c

20190506-R语言向量操作函数match、pmatch、c

作者: 天空的小白 | 来源:发表于2019-05-06 19:04 被阅读0次

match

Usage
match(x, table, nomatch = NA_integer_, incomparables = NULL);
匹配两个向量,返回向量x中的元素在table中出现的位置;
Example

match

pmatch

Usage
pmatch(x, table, nomatch = NA_integer_, duplicates.ok = FALSE)
部分匹配,类比grep;pmatch要求第二个字符以第一个字符开头,而grep不要求;
Example

pmatch

charmatch

Usage
: 部分匹配,类比grep

charmatch

相关文章

网友评论

      本文标题:20190506-R语言向量操作函数match、pmatch、c

      本文链接:https://www.haomeiwen.com/subject/wdotoqtx.html