According to the ?switch
help page
If the value of EXPR is not a character string it is coerced to integer. If this is between 1 and nargs()-1 then the corresponding element of ... is evaluated and the result returned: thus if the first argument is 3 then the fourth argument is evaluated and returned.
Additionally, the help page provided this example of using a numerical expression
## Numeric EXPR does not allow a default value to be specified
## -- it is always NULL
for(i in c(-1:3, 9)) print(switch(i, 1, 2 , 3, 4))
So when using a numeric switch, only integer values are allowed. Checking that two decimal values are exactly equal isn't always that easy thus it is not allowed. Perhaps there is a better way for you to track this particular condition than using a non-integer numeric value.