basic
R MARKDOWN
Front (Q1): What are R code chunks in R Markdown?
Back (A1): Sections where R code can run inside the document ({r} ... ).
Front (Q2): What is the purpose of R Markdown?
Back (A2): Combine text + code to create reproducible reports (PDF/HTML/Word).
Front (Q3): What does echo=FALSE do in a code chunk?
Back (A3): Hides the code, but shows the results.
Front (Q4): What does eval=FALSE do?
Back (A4): Shows code but does not execute it.
Front (Q5): What does message=FALSE and warning=FALSE do?
Back (A5): Hides messages & warnings in the output.
Front (Q6): What does cache=TRUE do?
Back (A6): Reuses previously stored results to speed up knit time.
Front (Q7): What is a chunk for plotting a graph fully hidden?
Back (A7):
```{r, echo=FALSE, message=FALSE, warning=FALSE}
π΄ GIT / VERSION CONTROL
Front (Q8): Why is version control important?
Back (A8): Tracks changes, rollback versions, supports collaboration & branching.
Front (Q9): Initial Git configuration commands?
Back (A9):
git config --global user.name "Name"
git config --global user.email "email"
Front (Q10): What does git fetch do?
Back (A10): Downloads changes from remote β does not merge.
Front (Q11): What does git pull do?
Back (A11): Fetch and merge remote changes into local branch.
Front (Q12): What does git clone URL do?
Back (A12): Makes a full local copy of a remote repository.
Front (Q13): File states in Git
Back (A13):
Untracked β Git doesn't know it
Unmodified β No recent changes
Modified β Changed locally
Staged β Ready for commit
Front (Q14): After committing a file, what is its status?
Back (A14): Unmodified.
Front (Q15): Why use branching?
Back (A15): Develop features/experiments without affecting main working code.
Front (Q16): Command to check file status?
Back (A16): git status
Front (Q17): How to ignore files in Git?
Back (A17): Add patterns to .gitignore.
π΄ UNIX / TERMINAL
Front (Q18): Redirect vs append
Back (A18):> β overwrite>> β append
Front (Q19): Pipe operator in Linux
Back (A19): | β send output of one command to another.
Front (Q20): What does chmod 700 file do?
Back (A20): Only owner can read, write, execute.
β PALM CARDS PACK β SET 2
π― R Fundamentals + Tidyverse + Data Structures
π΄ R DATA TYPES / STRUCTURES
Front (Q21): Main atomic data types in R?
Back (A21): numeric, character, logical, integer, complex
Front (Q22): Difference: NA vs NULL vs NaN
Back (A22):
NA = missing value
NULL = no value / empty
NaN = "not a number" (e.g., 0/0)
Front (Q23): What is a pure function?
Back (A23): Output depends only on inputs, no side effects.
Front (Q24): What is an anonymous function?
Back (A24): A function with no name, usually inline:
function(x) x^2
π΄ SEQ, REP, VECTORS
Front (Q25): Create: 0 β 100 by 2
Back (A25): seq(0, 100, by=2)
Front (Q26): Repeat 1 three times
Back (A26): rep(1, 3)
Front (Q27): Name main indexing start in R?
Back (A27): 1 (not 0!)
π΄ TIDYVERSE
Front (Q28): What does %>% do?
Back (A28): Pipes data into the next function.
Front (Q29): What do filter(), select(), mutate(), summarise(), arrange() do?
Back (A29):
filter β subset rows
select β choose columns
mutate β new columns
summarise β collapse to summary row(s)
arrange β reorder rows
Front (Q30): Example: extract airline, model, tailnum & manufacturer for dest="IAH" (concept)
Back (A30): Join flights + planes + airlines, then filter dest == "IAH".
Front (Q31): Anti-join does what?
Back (A31): Returns rows in left table with no match in right table.
Front (Q32): How inner join works?
Back (A32): Only retains rows with matching key values in both tables.
π΄ APPLY FAMILY (Brief β even if minimal in exam)
Front (Q33): apply vs sapply vs tapply vs mapply
Back (A33):
apply β matrix dims
sapply β simplify results
tapply β apply by group
mapply β multiple vectors
β PALM CARDS PACK β SET 3
π― Graphics + Functions + Control Flow
π΄ BASE & GGPLOT
Front (Q34): Difference between ggplot() and plot()
Back (A34): ggplot uses layered grammar of graphics; plot is single-call base graphics.
Front (Q35): Basic scatter in ggplot
Back (A35):
ggplot(df, aes(x,y)) + geom_point()
Front (Q36): Good plotting practices (3)
Back (A36): Clear labels, avoid clutter, focus on one message.
Front (Q37): What is facetting used for?
Back (A37): Split into multiple small plots by a grouping variable.
π΄ FUNCTIONS / CONTROL FLOW
Front (Q38): for loop vs while loop
Back (A38):
for = iteration over fixed sequence
while = runs until condition false
Front (Q39): What is an error message?
Back (A39): Code cannot run until the issue is corrected.
π΄ DATA CLEANING PIPELINE
Front (Q40): Steps to load, examine, arrange, analyse
Back (A40):read.csv() β head()/summary() β tidyverse verbs β plots/models