import_instruments {tidyREDCap} | R Documentation |
Import all instruments into individual R tables
Description
This function takes the url and key for a REDCap project and returns a table for each instrument/form in the project.
Usage
import_instruments(
url,
token,
drop_blank = TRUE,
record_id = "record_id",
first_record_id = 1,
envir = .GlobalEnv
)
Arguments
url |
The API URL for your the instance of REDCap |
token |
The API security token |
drop_blank |
Drop records that have no data. TRUE by default. |
record_id |
Name of |
first_record_id |
A value of the custom |
envir |
The name of the environment where the tables should be saved. |
Value
one data.frame
for each instrument/form in a REDCap project. By
default the datasets are saved into the global environment.
Examples
## Not run:
import_instruments(
"https://redcap.miami.edu/api/",
Sys.getenv("test_API_key")
)
## End(Not run)