[R] something equivalent to "switch" condition

Jason Rupert jasonkrupert at yahoo.com
Wed Apr 1 21:37:39 CEST 2009


Is there any syntax in R that allows a "switch"-type condition to be used? 

switch(variable){  
   case CONSTANT_VALUE;  
   break;  

   default:   
   break;
}


Thanks, 
Jason




More information about the R-help mailing list