An R User’s Guide to Other Programming Languages (2024)

Posted on August 11, 2024 by Albert Rapp in R bloggers | 0 Comments

[This article was first published on Albert Rapp, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Real-world problem often happen at the intersection of many areas. For example, maybe you want to build a web app for easier data ingestion. As an R user that’s no problem. You can easily dabble into the world of web development using the fantastic Shiny package.

But if you’re in that world, you will soon reach the boundaries of where using only R code can get you out of trouble. You will soon find that any meaningful Shiny app will have to sooner rather than later deal with problems that happen at the intersection of R and traditional webdev languages like HTML, CSS & JS. That’s where it helps to know a bit about these languages.

Similarly, you may want to incorporate a cool machine learning model into your app that’s only available in Python. In that case, knowing how to handle Python can be beneficial. Even if you do most of your scripting in R.

Or if some part of your R analysis is slow, it can be helpful to refactor some of your code in a compiled programming language like C++. That way, some of your bottle-neck functions can become blazingly fast all of a sudden.

And there are lots more examples where knowing your way around other programming languages can be really helpful. No one is saying that you need to give up R and become an expert in the other languages, though. You can make great progress by just knowing the basics of a language and combining that with your programming knowledge that you have already acquired through R programming.

In that spirit, this collection of resources is supposed to help you ease your way into other programming languages. The goal here is to highlight resources that will give you a gentle nudge towards these other languages when coming from R. Some of the resources I have created, some of them are things I’ve collected from the wider R community. If I forgot one of your favorite resources, don’t hesitate to put them into the comments.

Python

Probably the most popular data science programming language currently is Python. It’s particularly strong in the ML field.

HTML & CSS

If you ever want to make your {gt}/{flextable}/{reactable} tables or your Shiny app or your Quarto documents look nice, then there’s no way around these two languages. A lot of the things that these languages can offer you, can be practiced from within R using the {htmltools} package.

Javascript

Javascript (JS) is another language that is used everywhere within web development. If HTML & CSS make your documents, tables and apps look nice, JS makes them interactive.

  • A nice way to dip your toes into the JS waters comes via Observable plots. They give you a nice way to to create charts using the grammar of graphics (just like {ggplot2}). A nice side-by-side comparison can be found in this fantastic guide by Allison Horst

  • There is also a nice video series for Observable plots.

  • A nice and free resource is also the JavaScript for R book by John Coene

  • If you want to take a deeper dive into web development with Javascript, you may also enjoy the free “Deep Dive Into Modern Web Development” course (even if it’s not R centered)

Related

To leave a comment for the author, please follow the link and comment on their blog: Albert Rapp.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

An R User’s Guide to Other Programming Languages (2024)

FAQs

How does R compare to other programming languages? ›

Typically, the R programming language offers low performance, though you'll still be able to find packages in the system that allow a developer to improve the speed. Compared to other programming languages, R is highly specialized, meaning skills in it can't be as easily applied to other fields than data processing.

Why is R not considered a programming language? ›

Unlike languages such as Python and Java, R is not a general-purpose programming language. Instead, it's considered a domain-specific language (DSL), meaning its functions and use are designed for a specific area of use or domain. In R's case, that's statistical computing and analysis.

What programming language is closest to R? ›

MATLAB, Python, Golang, SAS, and Rust are the most popular alternatives and competitors to R Language.

What programming language is R based on? ›

R was started by professors Ross Ihaka and Robert Gentleman as a programming language to teach introductory statistics at the University of Auckland. The language was inspired by the S programming language, with most S programs able to run unaltered in R.

Is R dying out? ›

It's not dying. It is very popular in the field of statistics and across universities all around the world.

How difficult is R compared to Python? ›

Overall, Python's easy-to-read syntax gives it a smoother learning curve. R tends to have a steeper learning curve at the beginning, but once you understand how to use its features, it gets significantly easier. Tip: Once you've learned one programming language, it's typically easier to learn another one.

Why is R not popular? ›

R is less popular than Python but is still widely recognized. It is not beginner friendly and has a steep learning curve as its syntax is difficult to read and requires programmers to write more lines of code even for simple operations. R is mainly used for complex data analysis in data science.

Is Python replacing R? ›

For advanced statistical modeling and data analysis, R still leads. But Python provides a better general-purpose programming language for data tasks like machine learning, while remaining competent for data analysis, cleaning, and visualization.

Is R still relevant in 2024? ›

Perform statistical analysis in R with functions and packages. Performing statistical analysis in R is a valuable skill for aspiring data analysts to learn in 2024. R provides a wide range of functions and packages that make it easier to prepare data and perform complex analyses.

What can Python do that R can't? ›

R also supports a lot of statistical modeling tools such as modelr, Hmisc, and others. R can't be used in production code because of its focus on research, while Python, a general-purpose language, can be used both for prototyping and as a product itself.

Should I learn R if I know Python? ›

Both languages are well suited for any data science tasks you may think of. The Python vs R debate may suggest that you have to choose either Python or R. While this may be true for newcomers to the discipline, in the long run, you'll likely need to learn both.

What computer language is most in-demand? ›

12 most in-demand programming languages to learn in 2024
  • Go.
  • SQL.
  • Kotlin.
  • TypeScript.
  • JavaScript.
  • C & C++
  • Java.
  • Python.

Is R difficult to learn? ›

R is considered one of the more difficult programming languages to learn due to how different its syntax is from other languages like Python and its extensive set of commands. It takes most learners without prior coding experience roughly four to six weeks to learn R. Of course, this depends on several factors.

Do people still use R? ›

R is on the rise as a powerful business analytics tool with contributions from popular statisticians to the open source community over 20 years.

Does R count as coding? ›

In addition, the R programming language gets used by many quantitative analysts as a programming tool since it's useful for data importing and cleaning. As of August 2021, R is one of the top five programming languages of the year, so it's a favorite among data analysts and research programmers.

How is R compared to other technologies? ›

R programming language is much slower than other programming languages such as MATLAB and Python. In comparison to other programming language, R packages are much slower. In R, algorithms are spread across different packages.

Why is R different from other languages? ›

R is an open source programming language that's optimized for statistical analysis and data visualization. Developed in 1992, R has a rich ecosystem with complex data models and elegant tools for data reporting.

How similar is R to C? ›

Syntax and Coding Style: The syntax of C is more complex and stricter compared to R. C uses curly braces {} for code blocks and requires semicolons at the end of each statement. R, on the other hand, uses a more concise and expressive syntax, with the concept of code blocks defined by indentation.

Why R is the best programming language? ›

Unsurprisingly, the language was purposefully designed to assist with data analysis. R offers various techniques, including linear and nonlinear modeling, time-series analysis, classification, and clustering. This makes it perfectly suited for data analysis tasks.

Top Articles
Latest Posts
Article information

Author: Melvina Ondricka

Last Updated:

Views: 6081

Rating: 4.8 / 5 (68 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Melvina Ondricka

Birthday: 2000-12-23

Address: Suite 382 139 Shaniqua Locks, Paulaborough, UT 90498

Phone: +636383657021

Job: Dynamic Government Specialist

Hobby: Kite flying, Watching movies, Knitting, Model building, Reading, Wood carving, Paintball

Introduction: My name is Melvina Ondricka, I am a helpful, fancy, friendly, innocent, outstanding, courageous, thoughtful person who loves writing and wants to share my knowledge and understanding with you.