Get R from CP state class

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
undoing the output parameter iR

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>