Hello

I'm translating a Visual Basic routine to R.

Which command in R is similar to "select case" in VB?

See the example:

select case int(AG)
 case 0, 5, 8, 10
  VAR = 37
 case 1, 4
  VAR = 70
 case 3, 6, 9
  VAR = 90
 case 2, 7
  VAR = 112
end select

A chain of "if else" would not be very elegant. Is there another option?

Thanks in advance. Best regards.

Antonio Olinto

	[[alternative HTML version deleted]]

