What is R?

In short
R is a free programming language and software environment built for statistics, data analysis and graphics. People use it to load data, clean it, run statistical tests and draw charts. It runs on Windows, Mac and Linux, and is maintained by the R Core Team and a large community.
R is a programming language designed for working with data. It was made for statisticians, but today it is used by researchers, analysts, biologists, economists and developers who need to understand numbers. The official manuals describe it as a language and environment for statistical computing, which means it gives you both the code you write and the tools to run it.
How it works
You write R code and run it in an interactive session called the R console. You type an expression, press Enter, and R evaluates it and prints the result. Most work, however, is saved in script files so that you can run the same steps again later. R works with objects, which are named pieces of data such as numbers, text, tables or lists. You create an object with an assignment, then use functions to act on it.
R also has a large set of add-on libraries called packages. A package bundles functions, data and help files for a specific job, such as reading spreadsheets or building interactive charts. Packages are shared through CRAN, the Comprehensive R Archive Network, which is the main repository the manuals refer to.
When to use it
R fits best when your problem is about data. Typical cases include exploring a dataset, fitting a regression model, checking whether two groups differ, or producing a clear graph for a report. It is also useful for reproducible analysis, because a script records every step, so someone else can run it and get the same result.
R is less suited to building web backends or mobile apps. Other languages handle those tasks more naturally, although R can still be called from them in some setups. If your main goal is general software engineering, think about whether the data focus matches your project before you commit.
A simple example
Here is a short sample that creates a vector of numbers, calculates the average and prints it:
scores <- c(72, 85, 90, 64, 78)
average <- mean(scores)
print(average)
The symbol <- assigns a value to a name. The function c() combines values into a vector, which is the basic data type in R. The function mean() works out the average. Each line does one clear job, which is a good habit in R.
Installing and getting help
The official manuals cover installation and administration in detail, and they are available as HTML, PDF and EPUB files. The HTML versions are also included with most R installations and can be opened with the function help.start(). For a specific function, type a question mark followed by its name, such as ?mean, to read its help page. The manuals are published for the released version, the patched version and the version still in development, so check the one that matches your install.
Common mistakes
Beginners often mix up their data types. A number stored as text will not behave like a number in calculations, so check the type of your object before you analyse it. Another common issue is forgetting that R is case sensitive, so Mean and mean are different names. Finally, many new users install a package and then forget to load it in each new session. Use library() to load a package before you call its functions.
Alternatives
Python is a general-purpose language with strong data libraries, and it is a common choice for analysts and engineers alike. Julia is another option for numerical work. R remains popular because of its statistical depth and its many packages for specialised analysis. Choose the tool that fits your team, your data and the people who will read your results.
FAQ
Is R free to use?
Yes. R is free software, and you can download it and its manuals from the official CRAN website. Packages on CRAN are also free to install.
Do I need to be a statistician to learn R?
No. Basic R works well for simple calculations and charts. The statistical methods become useful as your questions get more advanced.
Which operating systems can run R?
The manuals cover Linux, Mac and Windows. Each platform has its own installation notes, so read the version that matches your computer.
What is the difference between R and RStudio?
R is the language and its engine. RStudio is a separate editor that many people use to write and run R code more comfortably.
Where can I read the official R documentation?
The R Manuals on CRAN are available in HTML, PDF and EPUB. You can also open the HTML help files from inside R with help.start().
Sources
This page is based on the official documentation below. Read it for full detail.
R — official documentation ↗