frequencies_to_r