Modifying Variables in R

Feb 22, 2015 • Dirk Eddelbuettel

The map below relates to the introductory R lesson on variables and assignments.

It focuses on the assignment challenge in the middle of the lesson where the following code snippet is given

mass <- 47.5  
age <- 122  
mass <- mass * 2.0  
age <- age - 20  

and a simple visualization is sought. My attempt follows:

R Variable Assignment Concept Map

It illustrates the basic (initial) assignment and subsequent update via multiplication and subtraction, respectively.