Skip to main content
waffle.svg
Domo Knowledge Base

Installing the DomoR Plugin

Version 10

 

Intro

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. 

Prerequisites

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.

Note: The R Plugin requires httr 1.0.0 or lower and readr 0.2.0 or lower installed in your instance of R.

Installing DomoR

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.

Note: DomoR has not been published on CRAN (Comprehensive R Archive Network). 

Installing the Devtools Package

  • Install devtools by running

    • install.packages("devtools")

    • library("devtools")

Installing the DomoR Plugin

  • Install DomoR directly from Domo’s private GitHub repository:

install_github(repo="domoinc-r/DomoR")

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.

Initializing DomoR

Once you have generated a token from your Domo instance, initialize your R development environment using the following command:

DomoR::init('customer', 'domo_access_token')

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