get a non-numeric to binary operator in the for loop. Looks like the race character string might be getting fed into `median()`