Call an AzureML web service from R
Please please be careful with your API tokens (the numbers below are randomly generated to look like what you get with an Azure service)
# Use your numbers (below are not real numbers)
# Be careful where you put your auth tokens
result <- azuremlService(list(WebInput = data.frame(x=1:5, y=LETTERS[1:5])),
region = "ussouthcentral",
workspace = "8550bbba99572fc47e18e5fdd53e43e2",
service = "4e7ebd7ad816cd9dd1cb1b17c4cdb0c7",
auth = "YTHDwNeuZbQLWHjOEKzMWjVihThTcmsIdRRFkSsvHaFoxZcKTjdFmFPaIsfN+OEdoZlGttMJQrzUPOvvLeCej==")
httr::content(resp)
OR
result <- azuremlService(list(WebInput = data.frame(x=1:5, y=LETTERS[1:5])),
url = "https://ussouthcentral.services.azureml.net/workspaces/8550bbba99572fc47e18e5fdd53e43e2/services/4e7ebd7ad816cd9dd1cb1b17c4cdb0c7/execute?api-version=2.0&details=true",
auth = "YTHDwNeuZbQLWHjOEKzMWjVihThTcmsIdRRFkSsvHaFoxZcKTjdFmFPaIsfN+OEdoZlGttMJQrzUPOvvLeCej==")
The result is a named list of data frames. This is because you can have multiple outputs from AzureML services.
MIT © Mango Solutions
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.