Returns number of unique values in a vector
nVal(x)
x
A vector of observations of a variable
The number of unique values in the vector
nVal(runif(10))