linux - Search for multiple terms in R -


i looking way search multiple terms egrep can in r.

for example:

cat fruit | egrep 'apples|grapes|oranges' 

you can in r, use grep function

fruit<-c("apples","bananas","tomatoes","grapes") grep('apples|grapes|oranges', fruit, value=true) # [1] "apples" "grapes" 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -