0

i have the following code:

if(projectname %in% checkProjects) {
  print(projectname, "exists")
}

This code reads in the value for projectname from an excel sheet and checks if each projectname that was read in exist in checkProjects.

Suppose there's a name called FileRemoval in checkProjects. If the user had fileremoval or Fileremoval or any variation of the name in lower or capitalcase in their excel sheet, the above code wont catch it. It will only catch "FileRemoval".

So my question is, how do i check for projectname in checkProjects in a case insensitive fashion?

i looked into grep and grepl but I'm concerned that that using that (if not done correctly) would end up grabbing names that have FileRemoval in it...i.e. "FileRemovals".

user2831586
  • 119
  • 2
  • 10

0 Answers0