It is just a suggestion, but I think it would be good to have an argument in documentPath that allows to have the complete path directory (and not only the referential, which starts with ~). Currently, it is necessary to use external packages to achieve this in RStudio.