Add implementation for r_set_new()

Closes #164