The RSysrev client can be used to create projects on and upload json documents for review.  In this project, we use RSysrev to create a review of NIH opioid crisis small business grants.  View the final product at

Start by installing RSysrev version 0.1:

Install RSysrev

Get a sysrev token
To use RSysrev a pro plan on and a token is needed.  After signing up for an individual pro plan get an api token with RSysrev:

.token <- RSysrev::loginAPIToken()
After registering for sysrev pro, store your token in .token. The following function calls look for a token under the .token variable. Never share this token.

Never share a sysrev token or save them where others might see it.  Some bad guys use automated scrapers to search for tokens on sites like  

We recommend storing your token in an environmental variable and loading it in your notebooks with something like .token <- Sys.getenv("srtoken").

Create a dataset
With a token ready, a dataset can easily be created:

name        <- "NIDA.NIHReporter.Active"
description <- "SBIR Opioid Crisis Grants"
ref.url     <- ''

RSysrev::datasource.createDataset(name,description,ref.url) #returns 78
Create a dataset with RSysrev::datasource.createDataset

Log into with your sysrev credentials to find your dataset.

Look up your dataset on The graphql query is on the left. Your id will be different than 78

Hooray! We now have a dataset where we can store documents. It can also be imported into projects.  

Store documents in a dataset
You can upload R dataframes directly to your dataset. We start with the below spreadsheet downloaded from NIH Reporter.

Excerpt from an excel sheet describing OUD grants from NIH. Download at

To upload this dataframe to our dataset we:

# load the data frame into R
excelDF <- readxl::read_xlsx("./NIDA.NIHReporter.Active.Aug.24.2020.xlsx")
RSysrev::datasource.importDataframe( = 78,
    df            = excelDF,
    external.ids  = df$`Project Title`,
    filenames     = df$`Project Title`)
Import data into a dataset with RSysrev::datasource.importDataFrame

RSysrev::datasource.importDataframe imports each row from a data frame as a json entity.  After running this function our grant data set now has 305 entities, where each entity is a json object.  

Note that we chose the grant Project Title as an external identifier, this makes it easy to join datasets with other data that have a shared identifier, entities should have a unique We provided a filename for each entity, which is more relevant when uploading text files, or other file based entities, but should also be unique.  

The uploaded entities are visible on

After uploading entities into your data set, you can view them on

Import a dataset into sysrev
It is easy to import datasets into any sysrev you own:

RSysrev::sysrev.importDataset( = 78, = 36134)
Import dataset 78 into You must own both the dataset and the sysrev project.

All of these grants are now visible on For example:

A single grant entity at

With these steps, it is possible to set up a review of any text or json type entities you are interested in.