R is an open-source language for statistical computing and graphics, maintained by the R Core Team and a global contributor community. It runs as an interpreter (REPL) or via Rscript for batch scripts.
Core characteristics
- Vectorized — operations apply element-wise; avoid manual loops when possible
- Functional — functions are first-class; apply-family and purrr (local) iterate cleanly
- Data-centric — data frames, factors, and formula syntax for models
- Extensible — CRAN hosts thousands of packages for every analysis niche
Typical workflow (local)
- Install R from CRAN; use RStudio or VS Code as IDE
- Run
Rscript analysis.Ror work interactively in the console - Install packages:
install.packages("dplyr") - Share reproducible reports with R Markdown (
rmarkdownpackage)
Where R appears
Clinical trials, epidemiology, econometrics, marketing analytics, Shiny dashboards, and research publications. Compare general backends with Python or typed JVM services with Java.
Important interview questions and answers
- Q: Is R only for academics?
A: No—pharma, finance, and tech analytics teams use R in production pipelines, often alongside Python and SQL. - Q: R vs Python for data science?
A: Both work; R leads in stats-native APIs and ggplot2; Python leads in ML engineering and web glue—many teams use both.
Self-check
- What command runs an R script from the terminal?
- Name one domain where R is commonly used.
Tip: R source uses .R files executed by R or Rscript—think stats-native analysis with CRAN extensions.
Interview prep
- Is R open source?
Yes—R is GPL-licensed with source available from CRAN and community mirrors.
- Who uses R?
Biostatisticians, epidemiologists, econometricians, pharma, marketing analytics, and research teams publishing reproducible reports.