R语言学习笔记

grep函数

2019-12-01  本文已影响0人  麒麟991

※ grep

Usage
grep(pattern, x, ignore.case = FALSE, perl = FALSE, value = FALSE, fixed = FALSE, useBytes = FALSE, invert = FALSE);
在向量x中寻找含有特定字符串(pattern参数指定)的元素,返回其在x中的下标;
Arguments

grepl

Usage
grepl(pattern, x, ignore.case = FALSE, perl = FALSE, fixed = FALSE, useBytes = FALSE)
类似grep,但是返回逻辑向量,即是否包含pattern
Example

image

作者:天空的小白
链接:https://www.jianshu.com/p/afdd8385e6ca
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

上一篇 下一篇

猜你喜欢

热点阅读