I have a list full of generic drugs, and a user makes an input to check if this drug exists in my list (scraped from Medline). The program checks if this drug exists in my list . The thing is that i checked the drug existence with:
vast<-user_comp %in% medline_comps[1]
user_comp being the user drug input and medline_comps the list of drug names which was always true.
And the variable "vast" was always true because for example "Phenylephrine" exists in medline_comps. The thing is i haven's changed anything in the code and suddenly vast started returning FALSE, i have tried rebooting R, clearing every object from the workspace and without any change %in%
started returning FALSE instead of TRUE. I double checked the existense of the drug in the list, i even copy pasted the drug in the list and put it in the user input and is still returning FALSE when in the past was returning TRUE.
Is there a special reason why R could give you different results when you havent changed anything in the code?
An example of my list is:
medline_comps[1]
[[1]]
[1] "Phenylephrine" "Pyrethrin and Piperonyl Butoxide Topical"
[3] "Antipyrine-Benzocaine Otic" "Hydrocortisone
So if i input Phenylephrine, vast should definetly be TRUE as it was before but now is returning only FALSE, is there any logical explanation to this?