Below, code is provided to create a vector (named length.cm
) containing the following lengths of
the same 6 study subjects:
165cm, 187cm, 185cm, 190cm, 152cm, 171cm.
Calculate the BMI of the 6 study subjects (save the calculated BMI’s as a vector BMI
).
Print the vector BMI
in RStudio, to check whether you obtained realistic values.