Program control can be used to make your program react intelligently to your data, by following branching decision trees. It is also possible to write SAS-style data management code with loops and if statements if you are having a hard time figuring out how to do something with vectors.
Lecture: LearnRProgramControl2014
In the lab we will learn how to create and annotate R’s built-in plots.
Lab Activity: LearnRGraphics
Data files for lab (NHANES III data):
adult.csv
R Script with lab answers:
NHANES script
University Operator: (919) 962-2211 | © 2025 The University of North Carolina at Chapel Hill |