r and res