grep_split: Extention for grep function

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/grep_split.R

Description

grep a string whether in another string or vector, the string are split by space.

Usage

1
grep_split(keyword, x)

Arguments

keyword

a character string, separator "|" is permitted.

x

a character vector where matches are sought.

Details

Extention for grep functin.

Value

The function return the numbers vector which contain the keyword.

Author(s)

Zongfu Cao (caozongfu@nrifp.org.cn)

See Also

grep

Examples

1
2
3
x <- c("you and he and I", "you", "Tom", "I", "you and I", "he and I")
grep_split("you and I | Tom", x)
#[1] 1 5 3

VarfromPDB documentation built on May 2, 2019, 2:10 a.m.