Average the pollen readings
Before you start this intermediate track
Numeric vectors and basic averages. Read data-frame columns and logical filters.
Guided code reading and debugging. Runnable coding challenges are available in JavaScript, Python, and SQL.
Predict the result.
What text does this script print?
pollen <- c(3, 6, 9)average <- mean(pollen)label <- "Average:"cat(label, average, "\n")Each mission is a separate base R script. Run it with Rscript; no packages or input files are needed. Quiz answers show the text printed by cat, without a console prompt.
Review the lesson
A field researcher records three pollen readings in one numeric vector. The c function combines values, and mean calculates their arithmetic average. Assign the result with <-, then use cat to print a clean report. This is a first step toward describing a larger collection of measurements.