R to id