R interviews focus on vectors, data frames, factors, missing data, formula interfaces, apply vs vectorization, and when to use tidyverse vs base—compare with Python pandas questions.
Must-know topics
- 1-based indexing and recycling rules
- NA handling and na.rm
- data.frame subsetting with [, $, [[
- lm formula syntax and S3 methods
- Base R vs dplyr/ggplot2 (local install context)
Important interview questions and answers
- Q: Vectorization vs loops?
A: Prefer vectorized ops; loops for side effects—apply when row/column logic is complex. - Q: R vs Python for stats?
A: R native formulas and CRAN stats depth; Python for ML engineering glue—many teams use both. - Q: Factor purpose?
A: Categorical levels for models and ordered plots—not just strings.
Self-check
- List three R topics to review before interviews.
- Why is 1-based indexing a common bug source?
Tip: Be ready to explain 1-based indexing, NA propagation, and formula lm interfaces.
Interview prep
- Common R pitfall?
Forgetting NA handling and 1-based indexing when coming from Python.