Function to return mode
get_mode_for_vec(v)
v
a vector
mode if success -1 for failure
get_mode_for_vec(c(1, 1, 2, 3))