An ordered set of instructions. It reads input, follows rules, and produces output.
Loading...
Loading...
Workspace
statistics data analysis visualization and research workflows
Definition first
R is a programming language for writing exact instructions, often used for statistics data analysis visualization and research workflows. Start with one mental model: input goes through steps and becomes output.
analysis.RRun Rscript analysis.RHabit Inspect each vector or data frame before modelingAn ordered set of instructions. It reads input, follows rules, and produces output.
A value is data. A variable is the name you use to hold and reuse that data.
A named piece of work. It takes input, does one job, and can return a result.
Rscript is the place that actually runs code from analysis.R.
First readable code
print(42)
Output 42Language lineage
See where R comes from, which languages feel close, and what to learn next.
Zero base path
Question bank
Pick a stage or search across the open programming bank. Jump straight to the matching drill.
R question 1. Choose the statement that matches printing a value.
R question 2. Choose the statement that matches naming a value.
R question 3. Choose the statement that matches reusable function.
R question 4. Choose the statement that matches basic collection.
R question 5. Choose the statement that matches printing a value.
R question 6. Choose the statement that matches naming a value.
R question 7. Choose the statement that matches reusable function.
R question 8. Choose the statement that matches basic collection.
R question 9. Choose the statement that matches printing a value.
R question 10. Choose the statement that matches naming a value.
R question 11. Choose the statement that matches reusable function.
R question 12. Choose the statement that matches basic collection.
R question 13. Choose the statement that matches printing a value.
R question 14. Choose the statement that matches naming a value.
R question 15. Choose the statement that matches reusable function.
R question 16. Choose the statement that matches basic collection.
R question 17. Choose the statement that matches printing a value.
R question 18. Choose the statement that matches naming a value.
Multiple choice
R question 1. Choose the statement that matches printing a value.
print(42)
Reference
Rscript analysis.Rentry point output syntax print
print(42)
variables assignment types <-
total <- 42 print(total)
function collection Vector
add <- function(a, b) {
a + b
}
scores <- c(40, 2)
print(length(scores))