Hi,
Some years ago, I have written a R-client for BaseX. That client used a R-file that could be sourced into your R-code (https://github.com/BaseXdb/basex/tree/master/basex-api/src/main/r/RbaseXClie...). Since not all functions from the server protocol were implemented, I decided to rewrite the client and build a package. This package has now been accepted by Cran (https://cran.r-project.org/web/packages/RBaseX/index.html).
I am still working on some improvements but that will take some time. In the meantime, enjoy it.
Ben Engbers