Can you be more precise on this ? what do you want to achieve ?
To expose data between program, making an API is one solution and plumber is great for that !
EDIT: For reference, there is another thread about that. How to save JSON Data into R Markdown