On Fri, 20 May 2022 10:16:05 +0200 Neha gupta <neha.bologna90 using gmail.com> wrote: > prot <- ifelse(test$CE == '2', 1, 0) /// Error comes here I can't reproduce the error at this line with the data you have attached. Are you sure it's not happening elsewhere? What does traceback() say after the error? -- Best regards, Ivan