Updated R script for height data