Ri comes from Spanish de (and/or perhaps also Ptg. de).
Ri is in free variation with a host of alternative forms, including:
de di ri li re e i
all derived from the same source