To better understand your question: Are you asking if R integrates with ThingWorx Analytics (TWA, formerly Machine Learning)?
The Machine Learning tool operates by API calls to perform operations. R is used to create analytical models and graphical representations of statistics. Graphical outputs are not a function of TWA on its own, many users opt to create their own integrations with Business Intelligence tools.
ThingWorx Composer and Foundation have the capability of integrating and creating mashups to visually represent the outputs of your modelling.
Please let me know if this helps answer your question.
When trying to use a model created with R along with ThingWorx there could be two options :
Either you only use the Data as the commnon resource between R and ThingWorx. In that case you could gather Data through ThingWorx (using ThingWorx Things properties and serivces ) then provide the gathered Data to R through a Database or dataset that would get the input from ThingWorx and provide the Output to R.
You would then perform the analytics Part using the R model (this part would have no interaction with ThingWorx). Once the results are ready they would be outputed to a Dataset that ThingWorx could query and display the results within it's mashups. This whole concept would include not direct interaction between R and ThingWorx.
A second option would be if you are using the RGui or any application based on R is to have a Direct interaction between R and ThingWorx. To do so you would need to have an extension developed for that purpose. Curently in the ThingWorx Marketplace No R-Extension has been developed yet. So you would then need to develope your own extension for that .
Please refere to the below guide on further information on how to do that :
We have as an example of ThingWorx interaction with Analytics tools an already existing extension for using ThingWorx with ThingWorx Analytics through which new Models could be created
I hope his answers your quesiton.