Run the field data from the node table via an R script and return the results

I have multiple nodes and each node contains table data in a specific format.

I need to get this table data in any format and process it on the server side in an R script. I was thinking of going quiet or writing a specific module to that. The execution of the script must be triggered by a link / button on the node page. It could also be a piece of php code in a block or so.

How would you approach this challenge? Is there another way and what would be the advanced solution?

Thank you!

/ Greg