# Learning R vs Learning a Spoken Language

Saghir Bashir (www.ilustat.com)

# Introduction

R has grown in popularity over the years which can be measured by using different metrics, for example, R downloads, the number of packages on CRAN1, participation in on-line communities, books published and so forth. This growth brings with it newcomers who are keen to learn the R programming language.

Learning R, like learning anything else, is a process from which you get what you put into it. In this post, I will argue that learning R should be treated like learning a spoken (written) language, i.e., as a continuous process without a truly defined end. Hereafter I will refer to spoken (written) languages as “spoken languages”.

# Learning a Spoken Language

I had different reasons to learn a spoken language, for example, initially to learn some basics (e.g. introducing myself, ordering food, asking directions), know enough to live in my new country and to engage with my new hosts. I started by learning to introduce myself (the “Hello world!”2 phase) and then I built on that.

All learning paths require “language immersion” (i.e., actively reading, writing and speaking) which by design incorporates making “mistakes” as part of the process. It takes courage to start to speak (and write) often with the fear of not knowing enough but once you do start you learn to auto-correct and learn from others. The more you immerse yourself the braver you become as each new thing learnt feeds the next. Even if you have an accent or keep making grammatical mistakes you’ll find that in most situations it won’t be too harmful and when they are, hopefully, some kind soul will inform you or you will realise yourself (e.g. I often realised from the facial expressions and/or body language).

Spoken languages evolve over time. This can be as a result of changes in vocabulary with new words entering the lexicon and “older” ones becoming less popular. The style of the language can also change over time and/or between “contexts” (e.g. legalese versus poetry). These changes force us to “maintain” the language which can be an auto-intuitive process that you adapt to quickly (e.g., adopting new words) or requiresome updating (e.g. learning, researching).

You could read the previous two paragraphs in the context of “learning R” (or any other programming language) as the objectives and the way to achieve them are similar. For the remainder of this post I will discuss some common features between learning R and a spoken language.

# Learning R

There are different objectives and motivating factors to learn R. You may, for example, want to develop “data science” programming skills to complement your job, make R programming part of your day to day work or become an advanced user. All these will require developing new skills and maintaining them. There is no one right path to learn anything so you should be open to experimenting until you find the things that work for you. It will be an emotional journey with highs and lows. There will be fun in masteringsomething new and frustration when you spend hours debugging your code to find that you forgot a comma or used the wrong case (it’ll keep happening… sigh!).

As a newcomer you may feel overwhelmed by all the information about the fancy things that R can do. Don’t worry even long time users can have that feeling. You may ask but “how do you get on top of it?”. You don’t and most importantly you don’t need to. This is the same for any spoken language as they have many different “styles”, for example,legalese, poetic, technical, scientific, business, humorous, journalistic to name but a few. You don’t need to master them all! You could specialise in technical writing and dab in a bit of poetry but you do not need to be a master of legalese until you have to sign a contract where you might be wiser to consult a lawyer. However each of them depends on some common “base grammar” that you use to have an understanding of the other domains. This is the “same” for R, there is “Base R” around which various ecosystems and packages are built (many of which overlap).

To get started you need to build some base knowledge (i.e. a foundation). For both R and a spoken language this could be achieved by doing a course or reading a booking. This typically means investing at least a few hours a week or doing an intensive course over a short period of time (e.g. two weeks). Whichever route you take the best rewards come when you immerse yourself as much as possible and use making mistakes as learning opportunities. Even making the same mistakes repeatedly is a good way to revisit and strengthen your knowledge and facilitate your future development.

For an “easier” learning path, develop your R knowledge and skills based on what you need to do and what interests you (i.e. some form of “specialisation”). The same applies to learning a new spoken language. There is nothing wrong with looking at areas that interest you but don’t overwhelm yourself. It is similar to being a technical writer who likes to read poetry. You don’t need to master or “understand” poetry to enjoy it. It will broaden your horizons and increases your knowledge. You don’t have to master all the areas as an understanding of the concepts is often enough.

When using a spoken language we all have our own “style” which can change or evolve over time. The biggest influence on our styles are probably the environment that you were exposed to in your earlier life, popular culture and “influencers” in your life. Your style will naturally change over time and perhaps change more radically due to some major reason or influence (e.g. after college adopting a “professional” style for a new job). Regardless of your style you usually do your best to make yourself understandable to others. The same logic applies to programming. Often there are different ways to program the same thing but you should focus on making it readable by others (including the future you) rather than trying to make it too “clever”. Think of it being like people who deliberately (and arguably annoyingly) use obscure long words. One of the most radical changes in my programming took place early in my career when I started to work in a regulated environment where programs had to be “reproducible” for both quality and auditing reasons. Knowing that someone was or could be watching made me focus harder on making sure my code was readable and understandable by others, essentially forcing me to “speak” the same language.

One of the challenges of learning something new is feeling inadequate or inferior to others (i.e., the imposter syndrome3). The same is true for spoken languages too. Embrace being an “imposter” and use it to feed your hunger to learn more in a healthy way. Some people will walk in front of you and others behind but it doesn’t matter so long as you go at your own pace whilst enjoying the journey and the view. It is not a competitive event. This is free advice from one “imposter” to another.

# Community Learning

Ever since R was released as a free software by Ross Ihaka and Robert Gentleman it has been a community driven project which can be seen across the various web and R user groups. R goes from strength to strength thanks to its community and thanks to the excellent R Core team0. Your learning and development depends on this community so embrace itwith open arms. For the most part R community members are polite and helpful. If someone is not behaving appropriately there are members who are willing to politelyintervene4. So joining in should be a relatively safe endeavour. How do you go about doing this?

First and foremost try to find people around you and build a local/your community with them. It does not matter if they have more or less experience than you. The R is community driven by people with differing experiences and backgrounds who help one another. No single person can know everything. So drop the hierarchy and collaborate as a community.

When you learn a new spoken language you will encounter new words, phrases and/or idioms. For these you will probably consult a dictionary, a grammar reference and/or a thesaurus (even if they are on-line). They will give you a different depth of understanding whilstenhancing your development. However, in programming terms, search engines make it easierto find solutions to your programming problems. One of the side effects of this approach is that people blindly copy and paste code without truly understanding it! To get a better understanding of R commands and code, use the R built-in help and (package) vignettes. They are your dictionary, thesaurus and grammar guides. The more you use them the more familiar they will become and the quicker you will become at findingsolutions for yourself. They can also be a saviour when you don’t have internet access. Having said that I encourage using on-line searches as they can teach you new things or reveal other approaches. Try to understand what the code is doing and why by simultaneously using the R built-in help and vignettes.

There is so much R related material on-line and in print THANKS to the many people who make it possible. How do you keep up with it all? You can’t and you don’t. Like with spoken language if you want to follow the news you cannot follow all the news sources available which makes you naturally selective. With R you have to do the same. For example, over the year I have chopped, changed and narrowed my selection down to actively following R Weekly5 and one twitter feed. I feel that both of these keep me informed enough to be content. Occasionally I complement these with watching some conference videos or reading a book. Pretty light but very informative at a level that I can manage without feeling overwhelmed with the added bonus of suppressing any fears of missing out.

To be immersed in learning a language will mean encountering social or professional situations where you are confronted with the language in a group setting. For spoken languages this could be at a dinner, party or coffee (tea) break and for a programming language at an R user group meeting, conference or on-line. Initially in both situations I felt like an alien and was afraid to speak. As I started to engage, people were kind, helpful and encouraging as many of them were also aliens or ex-aliens.

# Summary

Developing your R knowledge, skills and experience can take over your life if you let it. You could try various tricks or methods to develop more intensively but time and human nature are usually the limiting factors. Some intensive methods (e.g. doing a course, reading a book) can work for a limited duration but to be sustainable treat learning R like learning a new spoken language. Make it a life (career) project that you continuously maintain and nurture. Before you know it you will be a fluent R speaker.q()

1. The Comprehensive R Archive Network (CRAN): https://cran.r-project.org/
2. “Hello World!” https://en.wikipedia.org/wiki/Hello_world
3. Embrace the Imposter Syndrome! https://en.wikipedia.org/wiki/Impostor_syndrome
4. Yihui Xie helping newcomers: https://yihui.name/en/2018/05/no-slap-to-smiles/
5. R weekly: https://rweekly.org/
Share