R is a scripting language, most of the underlying infrastructure is written in Fortran, C and C++. R is also designed for stats, not writing software. Of course you're going to have a hard time if you treat it like a real programming language. That's why R provides easy interop with other languages.
But R also makes a lot of the tasks you do in data science far easier than it would be in a 'real language'.
But R also makes a lot of the tasks you do in data science far easier than it would be in a 'real language'.