Fixed more bugs in R and Rd files