grepMulti: Multiple pattern matching.

Description Usage Arguments Value See Also Examples

Description

grepMulti matches pattern, in this case a user name(s)/appliance(s), to a character vector x of all users/appliances, respectively.

Usage

1

Arguments

pattern

a character string to be matched in the given character vector.

x

a character vector to be matched to.

Value

grepMulti returns a vector of the indices of x that matched with the elements of pattern.

See Also

grepMetaData: searches meta data given a targeted user and/or appliance and returns the selected row of data.
searchMetaData

Examples

1
2
3
4
5
6
7
user.name <- c('David')
appliance.name <- c('Fridge')
user.list <- c('Kanye', 'David', 'John')
appliance.list <- c('AirWasher', 'Fridge', 'MicroOven', 'Fridge')

grepMulti(user.name, user.list) # 2
grepMulti(appliance.name, appliance.list) # 2 4

EncoredTechR/baseEncored documentation built on May 6, 2019, 3:47 p.m.