Detect in list2 if there are any strings (whole or part of bigger string) that is contained in list1
问题 I have two lists: list1<-list("q","w","e","r","t") list2<-list("a","a","aq","c","f","g") I need a code that will give TRUE because q is in the third cell of list2 . I need to search for every cell of list1 in list2 . I mean that I need to search every cell of list2 for any strings that are contained in every cell of list1 . Matching should be as for the whole match but also for partial (if string from list1 is a part of the bigger string in list2 ) and in both cases I need to receive TRUE .