Grepl: Judge for Included Character

Description Usage Arguments Details Value Examples

View source: R/Grepl.R

Description

Judge for Included Character

Usage

1

Arguments

pattern

one or more vectors

x

one or more vectors

Details

'

Value

a matrix with logical words

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
a=c('abcd','agj','abcu')

# Grepl for one vector
pat1='b'
Grepl(pat1,a)

# Grepl for two vectors
pat2=c('c','d')
Grepl(pat2,a)

# use %or% in pattern
pat3=c('a%or%c','d')
Grepl(pat3,a)

# use %and% in pattern
pat4=c('a%and%c','d')
Grepl(pat4,a)

yikeshu0611/do documentation built on Aug. 5, 2021, 4:17 p.m.