# Note: R is case sensitive! # Here we plot the histogram of the variable Head: hist(X$Head) # regress X$Head on X$Chest and store the results: result <- lsfit(X$Head,X$Chest) # print the regression results: ls.print(result) # pretty obvious what this does: plot(X$Head,X$Chest) # add the regression line to the plot: abline(result) # add a nonparametric regression line (a smoother): lines(lowess(X$Head,X$Chest), col=2)