The problem isn't whether switch can take a empty string, it's whether an empty string is a valid object name. It isn't. With this usage, you're doing the same thing as
"" = "BLANK"
What behavior are you trying to get from switch? Describe it, with a reproducible example, and we'll see if we can point you in the right direction!
In response to the comment: switch isn't written to be able to handle an empty string that returns something other than the default. If you want one value for the default and another for an empty string, you'll need a wrapper, like this:
f <- function(x){
if(x == "") return("BLANK")
switch(x, A = "a", B = "b", C = "c", "OTHER")
}
f("A")
# [1] "a"
f("ABC")
# [1] "OTHER"
f("")
# [1] "BLANK"