Function to order the labels of the socioeconomic and demographic variables

order_var(data, g)

Arguments

data

dataset in which we want to order the labels of the socioeconomic and demographic variables

g

variable for which we want to sort the labels

Value

a dataset in which the labels are ordered for the selected socioeconomic or demographic variable