The R Plugin is an R package that allows you to transfer data between Domo and R easily, simplifying the process of moving DataSets between the two. You can access the plugin and installation information in the Data Center.
Times when the R Plugin may be the best solution are these:
If your data science team is using R for most transformations and needs to get that data into Domo.
When you need to do any sort of statistical analysis or data exploration that’s outside of the scope of SQL.
If you are already using R scripts for data processing.
When you need capabilities beyond SQL for forecasting, text analysis, or other data science tasks.
If you require Rapid App prototyping or are creating dynamic reproducible documents/reports.
This topic takes you through the entire installation and initialization process for the DomoR plugin.
To install and initialize the DomoR plugin you will need two pieces of information:
Your customer instance name, denoted as customer in this documentation.This is the part of your login URL before domo.com. For example, if your Domo login URL was https://modocorp.domo.com, the customer instance name would be modocorp.
A Domo Access Token, denoted as domo_access_token in this documentation. This is required to access your Domo instance via the Domo API. A user at your company with an "Admin" security role (or a custom role with "Manage All Company Settings" or "Manage All Access Tokens" enabled) will need to generate this token by going to Admin > Security > Access Tokens in your account and clicking Generate Access Token in the upper right corner.
Domo has provided a process to install DomoR from Domo’s private GitHub repository. To install it you need a helper package. Hadley Wickham has built a library called "devtools" that allows you to install an R package directly from GitHub.
Installing the Devtools Package
Install devtools by running
Installing the DomoR Plugin
- Install DomoR directly from Domo’s private GitHub repository:
Initializing the R Environment
Now that that plugin is installed, you need to initialize it in your instance of R with your Domo customer instance (https://customer.domo.com) and your domo_access_token.
Generating a Domo Access Token
To generate a domo_access_token, log in to your Domo instance as an "Admin"-level user (or a user with a custom role with "Manage All Company Settings" or "Manage All Access Tokens" enabled) and go to Admin > Security > Access Tokens. For more information about security roles, see Security Role Reference.
Once you have generated a token from your Domo instance, initialize your R development environment using the following command:
Here, customer is the portion of your Domo URL before domo.com (e.g. modocorp for modocorp.domo.com) and domo_access_token is the access token you generated in your Domo instance.
After you have initialized your development environment, DomoR will allow you to do the following:
List your DataSets
Fetch a DataSet and convert it to a data frame
Create a DataSet by uploading your data frame
Replace a DataSet by uploading your data frame