no more dependence on R maybe on Rmath.h