Closing Thoughts
Is course ki har lesson ek single fact ka koi na koi consequence rahi hai: R mein scalars nahi hote, sirf vectors hote hain, aur iska arithmetic, indexing, data frames, aur even iski NA handling, sab us choice se shaped hain. Vectorized operations ordinary per-element kaam ke liye loops ko replace karte hain. Negative indices backward count karne ke bajaye exclude karte hain. Logical vectors selection masks ki tarah double kaam karte hain. Data frames sirf equal-length vectors hain jo table ke clothes pehne hue hain. Factors integers hain jinke saath labels ka ek fixed set attached hai. Aur NA deliberately propagate hoti hai, taaki missing data kabhi bhi bina aapke na.rm se opt-in kiye silently average ho kar gayab na ho jaaye.
cat("Vectors:", c(1, 2, 3), "\n")
cat("Done learning R basics.\n")
Vectors: 1 2 3 Done learning R basics.
Yahan se, natural next steps hain tidyverse (data frame manipulation ke liye dplyr, visualization ke liye ggplot2) aur R ke extensive statistical modeling functions (linear regression aur aage ke liye lm()) — jo sab us vectorized, data-frame-centric style mein aur bhi zyada lean karte hain jiski taraf yeh course build kar raha tha. Neeche practice exercise try karo, phir khud experiment karte rehne ke liye compiler par wapas jao.
Practice exercise
readLines(con = "stdin", n = 1) use karke stdin se ek line name mein read karo, phir "Goodbye, " ke baad name, uske baad "! Keep exploring R." print karo.