redcap_export_records_sas | R Documentation |
The SAS export capability of REDCap v9.5 is broken such that the generated SAS script has voluminous syntactical errors. This function attempts to replicate the intended functionality of REDCap by downloading the data to a csv file and generating a syntactically correct SAS import script. If sas is found on the path, the script is executed in SAS batch mode to produce the desired sas7bdat file.
redcap_export_records_sas( token, filename = timestamp_filename("redcap_sas_export"), redcap_uri = "https://redcap.wustl.edu/redcap/api/", linesize = 78, pagesize = 60 )
token |
The user-specific string that serves as the password for a project. |
filename |
The name to be used for all output files (.csv, .sas, .log, and .sas7bdat). Must be a valid SAS name. |
redcap_uri |
The URI (uniform resource identifier) of the REDCap project. |
linesize |
SAS linesize system option for formatting any sas output. |
pagesize |
SAS pagesize system option for formatting any sas output. |
## Not run: token <- REDCapR::retrieve_credential_local("~/.REDCapR", 7842)$token redcap_export_records_sas(token, timestamp_filename("static")) token <- REDCapR::retrieve_credential_local("~/.REDCapR", 6785)$token redcap_export_records_sas(token, timestamp_filename("mother")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.