vendredi 12 août 2016

R programming - Pattern matching (exact word only)

I have just started to learn R programming.

Pls could you provide clarity on below question.

I have a file(XLS) that contains 1 column (with some keywords, i.e. data, data1, test, test1)

I have another file (XLS) that contains 2 columns

(Column 1 : ID1, ID2, ID3, ID4
Column 2 : data, data_analyst, test, test_analyst) 

Now, how do i use pattern matching to get the output for all ID's that have a matching pattern and display the pattern name

eg. my output should be as follows :

ID1 : pattern matching (data) 
ID2 : pattern not matching 
ID3 : pattern matching (test)
ID4 : pattern not matching

Appreciate your response, as i am really confused

Aucun commentaire:

Enregistrer un commentaire