merge selectVariables.R doc and selectiontotale.R code into selectVariables.R