Implement Newton Raphson In R