.r
💻 CodeText-based

.r File — R Script

text/x-r

File Inspector

Drop any file to identify its extension and type — runs entirely in your browser

R

Drop a .r file here or click to choose

Or drop any file to identify its extension

Expected MIME type:text/x-r

Quick Facts

Extension.r
Full NameR Script
MIME Typetext/x-r
CategoryCode
TypeText-based (human-readable)
Typical Size1 KB – 100 KB
First Appeared1993

What Is a .r File?

R is a programming language and software environment designed specifically for statistical computing, data analysis, and graphical visualization. Created by Ross Ihaka and Robert Gentleman at the University of Auckland in 1993, R has become the lingua franca of statisticians, data scientists, and researchers. R files contain source code in a dynamically-typed, interpreted language with extensive built-in support for statistical operations, linear and nonlinear modeling, time-series analysis, classification, clustering, and data visualization. R's package ecosystem (CRAN) hosts over 19,000 packages covering virtually every statistical method and domain-specific analytical technique. The language features vectorized operations, data frames for tabular data (enhanced by tidyverse packages), formula notation for statistical models, and publication-quality graphics through ggplot2. R is widely used in academia, pharmaceutical research, bioinformatics, finance, and any field requiring rigorous statistical analysis. RStudio provides a dedicated IDE, R Markdown enables literate programming for reproducible research, and Shiny allows building interactive web applications for data exploration and dashboarding.

How to Open .r Files

RStudio
VS Code
Jupyter (with R kernel)
vim
Emacs/ESS
any text editor

Related File Extensions

More Code File Extensions

Other code formats you might encounter

Browse File Extensions by Category

Explore our reference of 259 file extensions with details, programs, and related formats.