Dear members, The following is my code: > Stst <- 2 > switch(Stst, 1 = print("NO"), 2 = print("YES")) Error: unexpected '=' in "switch(Stst, 1 =" Why isn't it printing "YES" on to the console? many thanks in advance. Thanking you, Yours sincerely, AKSHAY M KULKARNI [[alternative HTML version deleted]]