Hi, How to make an if condition work, if the condition inside if() is created dynamically ,and that is a string .If i type teh dynamically created string the if works fine but when dynamically created,it is a string and going inside the if() ,an error is thrown saying : rgument is not logical ..I even tried changing teh mode of the string to logical,but it doesn't work
Say my dynamically created string is :-- str<- name=='tom' || name=='harry' || name=='tina' where the names are diffrent for diffrent DBs. if(name=='tom' || name=='harry' || name=='tina' ) { some code } If i do this if(str) { some code } It doesn't work:( -- Thanks Moumita [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.