I have created a if loop as follows: name = "e" if (name == "v") { u = 0 } else u = 1
however i am getting error : Error: unexpected 'else' in "else" definitely I can write in : ifelse() form, however I want to write in this way. Can anyone tell me where is my error? thanks in advance --------------------------------- Forgot the famous last words? Access your message archive online. Click here. [[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.