How we keep away categorical columns which are not in order in the column in the data set for the calculations of mean, standard deviations in R coding