In ploting.R, at line 669 startRMSE is being assigned to "h" in abline function. startRMSE is not defined throughout the plot.K.selection() function leading to a bug. Although on careful analysis it is found that startRMSE is initialized in the commented out part line 619 and 621.