productivity and efficiency analysis using r