I think the function that is 1 if every coordinate is rational and 0 elsewhere might do what you want.

Edit: Oops, no it doesn't. Obviously.

Maybe divide R^n into equivalence classes where x~y iff x-y has all rational coordinates. Well-order the equivalence classes and set your function equal to 2^{-n} on the first countable infinity of them, and zero elsewhere.