kids encyclopedia robot

R (programming language) facts for kids

Kids Encyclopedia Facts
Quick facts for kids
R
R logo.svg
R terminal.jpg
R terminal
Paradigms Multi-paradigm: Array programming, object-oriented, imperative, functional
Designed by Ross Ihaka and Robert Gentleman (statistician)
Developer R Core Team
First appeared August 1993; 31 years ago (1993-08)
Stable release
4.0.2 ("Taking Off Again") / June 22, 2020; 5 years ago (2020-06-22)
License GNU GPL v2
Filename extensions
  • .r
  • .rdata
  • .rds
  • .rda
Influenced by
  • Common Lisp
  • Scheme
  • XLispStat
Influenced
Julia

R is a special programming language and a free computer program. It is mainly used for statistics, which is about collecting and analyzing data. Think of it as a powerful tool for working with numbers and making sense of information.

R was created to help people develop statistical software. It's an open-source program, meaning anyone can use and change it. Many people who work with statistics find R very helpful. It is also becoming as popular as other programming languages like Python.

How R is Used

The R language was first made just for statistics. But now, people use it in many other science areas. For example, it is used in ecology to study how living things interact with their environment.

History of R

R was first released in August 1993. It was created by Ross Ihaka and Robert Gentleman. Over the years, R has been updated many times. Each update adds new features or makes it work better.

Here are some important moments in R's history:

  • 1997: R became part of the GNU Project. This means it is free software.
  • 2000: Version 1.0 of R was released. The people who made it said it was ready for everyone to use.
  • 2004: Version 2.0 came out. This version made it faster to load data.
  • 2005: Version 2.1 added support for Unicode, which helps R work with many different languages.
  • 2013: Version 3.0.0 was released. This was a big update that allowed R to handle even larger numbers.
  • 2017: Version 3.4.0 made R programs run faster by default.
  • 2020: Version 4.0.0 was released.

R Communities

R has many groups of users around the world. These groups help people share ideas and learn more about R.

There are also many events where R users can meet. These include big conferences like "useR!" and smaller meetups.

useR! Conferences

The main yearly meeting for R users is called "useR!". The first one was in May 2004 in Vienna, Austria. Since then, the useR! conference has happened every year (except 2005).

Some past conference locations include:

Future conferences that were planned:

The R Journal

The R Journal is an online magazine for the R project. It is free to read and has articles about how to use and improve the R language.

Basic R Commands

These examples show how to use simple commands in R. You can type these commands into the R program.

In R, you often use `<-` to give a value to a name. You can also use `=`, but `<-` is more common.

> x <- 1:6  # This creates a list of numbers from 1 to 6.
> y <- x^2  # This creates a new list where each number is x multiplied by itself.
> print(y)  # This shows you the numbers in the list called y.
[1]  1  4  9 16 25 36

> mean(y)  # This calculates the average of the numbers in y.
[1] 15.16667

> var(y)  # This calculates how spread out the numbers in y are.
[1] 178.9667

> model <- lm(y ~ x)  # This creates a simple math model to see how y changes with x.
> print(model)  # This shows you the main results of the model.

Call:
lm(formula = y ~ x)

Coefficients:
(Intercept)            x
     -9.333        7.000

> summary(model)  # This gives you a more detailed report about the model.

Call:
lm(formula = y ~ x)

Residuals:
      1       2       3       4       5       6
 3.3333 -0.6667 -2.6667 -2.6667 -0.6667  3.3333

Coefficients:
            Estimate Std. Error t value Pr(>|t|)
(Intercept)  -9.3333     2.8441  -3.282 0.030453 x             7.0000     0.7303   9.585 0.000662 **---
Signif. codes:  0 ‘'''*’ 0.001 ‘'''’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 3.055 on 4 degrees of freedom
Multiple R-squared:  0.9583, Adjusted R-squared:  0.9478
F-statistic: 91.88 on 1 and 4 DF,  p-value: 0.000662

> par(mfrow = c(2, 2))  # This sets up a space to show 4 graphs at once.
> plot(model)  # This creates helpful graphs based on the model.
Plots from lm example
Graphs created by R to help understand the math model.

Images for kids

See also

Kids robot.svg In Spanish: R (lenguaje de programación) para niños

kids search engine
R (programming language) Facts for Kids. Kiddle Encyclopedia.