I program R daily (admittedly mainly for statistics) but I don't feel this pain at all. To me, R feels like a more sane JavaScript. Are you missing type safety or better OOP?
R excels at two things: statistical packages and generating reports/papers (the rmarkdown ecosystem is simply fantastic at this). If either of those two things are the key features of your product it makes sense to use R for the rest of the glue code. I write R daily and I'm very productive with the language (having built a small ecosystem of tools to aid me with the mundane stuff).
If you're willing to give R a chance I highly recommend you check out syberia.io - it's a framework like rails/django for creating statistical models in R and packaging them into API containers.
variable_name <- "This is a string"
# These all tell you the class type
str(variable_name)
class(variable_name)
typeof(variable_name)
# Is variable character type? Boolean TRUE/FALSE
is.character(variable_name)
# This tells you the number of characters. > 1 is a string.
nchar(variable_name)
# With vector this time
variable_char_vector <- c("String A", "String B")
# How long?
length(variable_char_vector)
# What types?
str(variable_char_vector)
# Are they strings?
nchar(variable_char_vector)
I'm not an expert in a wide range of programming languages, but this doesn't seem to be a major shortcoming in R.However, the function I would write is:
string_test <- function(x){
is.character(x) && length(x) == 1
}
If you can say where that will fail, I'd like to know because it seems like you probably have more experience than I do around this.