Getting started

Installation

The redivis library is hosted on github. Use devtools to install the latest version from the main branch:
1
devtools::install_github("redivis/redivis-r", ref="main")
Copied!

Authentication

If you are using this library within a Redivis notebook, you'll automatically be authenticated. You can ignore this section.
In order to authenticate with your Redivis account, you must first generate an API Token.
This API token must then be set as the REDIVIS_API_TOKEN environment variable before running your script. You can set the variable for your current session by running the following in your terminal:
1
export REDIVIS_API_TOKEN=YOUR_TOKEN
2
# or, within R
3
Sys.setenv(REDIVIS_API_TOKEN = "your_api_token")
Copied!

Usage

1
data <- (
2
redivis::organization("Demo")
3
$dataset("CMS 2014 Medicare Data")
4
$table("Hospice providers")
5
$to_tibble(max_results=100)
6
)
7
8
print(data)
Copied!
When referencing datasets, projects, and tables on Redivis, you should be familiar with the resource reference syntax.
Learn more:
Last modified 1mo ago