XNAT library for R