0

I want to match the string from a dataset i.e. Indian Inst Technol, Dept Mech & Ind Engn, Roorkee; to INDIAN INST TECHNOL ROORKEE which is read from a .CSV file. How do I match it correspondingly and increment the IIT Roorkee counter?

Edit I tried

str="INDIAN INST TECHNOL ROORKEE"
strm="Indian Inst Technol, Dept Mech & Ind Engn, Roorkee;"
grep(str, strm, ignore.case = TRUE, perl = FALSE, value = FALSE, fixed = FALSE, useBytes = FALSE)

But it returned 0

Edit 2- I just want to match the strings before ';' semicolon is reached in the strm. The only problem is to allow some words in between and still getting a true!

vds5344
  • 41
  • 5
  • have you tried grep or one of its variants? – amit Apr 07 '16 at 13:52
  • Please post a code example of what you have tried. – Timm S. Apr 07 '16 at 13:54
  • >str="INDIAN INST TECHNOL ROORKEE" > strm="Indian Inst Technol, Dept Mech & Ind Engn, Roorkee;" > > > grep(str, strm, ignore.case = TRUE, perl = FALSE, value = FALSE, fixed = FALSE, useBytes = FALSE) – vds5344 Apr 07 '16 at 14:01

0 Answers0