Useful functions to connect to 'TM1' https://www.ibm.com/uk-en/marketplace/planning-and-analytics instance from R via REST API.
install.packages("tm1r")
Start with creating a connection object with tm1_connection
function.
Then send this object to any other function that you want to work with.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.