add a function cs in cd.r and fixed a documentation typo in tranv.r