A macro seems like overkill here. Surely there is another way to write it. Maybe `randu(unsigned(length(r)))`?