Mode:
Duration:
1
2
3
4
5
set.seed(123)
for (i in 1:3) {
num <- sample(1:100, 1)
cat(paste0('Random ', i, ': ', num, '\n'))
}Coding works best on desktop or with an external keyboard.
set.seed(123)
for (i in 1:3) {
num <- sample(1:100, 1)
cat(paste0('Random ', i, ': ', num, '\n'))
}Coding works best on desktop or with an external keyboard.
Generates random numbers between 1 and 100 and prints them.
set.seed(123)
for (i in 1:3) {
num <- sample(1:100, 1)
cat(paste0('Random ', i, ': ', num, '\n'))
}R is a high-level, interpreted programming language and environment specifically designed for statistical computing, data analysis, and graphical representation. It provides a rich ecosystem of packages and functions for statistical modeling, data visualization, and reproducible research.
Origin & Creator
Created by Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand, in 1993 as an open-source alternative to S and S-PLUS.
Industrial Note
R is heavily used in statistical research, data science, machine learning experiments, and academic publications where reproducible data analysis is critical.