You are here:
Vanderbilt Biostatistics Wiki
>
Main Web
>
StatComp
>
RedcapApiExportR
(18 Jan 2016,
FrankHarrell
)
(raw view)
E
dit
A
ttach
---+ An R function for redcap exports through the API [[https://raw.githubusercontent.com/graywh/redcap/master/redcapExport.R][Here]] is an R function that exports data from redcap through the API within R. This function, along with new options provided by the redcap API system, applies the metadata to the data via factor levels and variable labels (in Hmisc R package). Will Gray wrote it. Thank him if you see him. This is now maintained on Will's github account. Scott Burns has written an [[http://sburns.org/2013/07/22/intro-to-redcap-api.html][introduction to redcap's API]]. His examples use python. ---+ An R Function to process !REDCap data exported using the web interface The function in the attachment list below helps you get a clean R data frame that does not include redundant versions of categorical variables. The function also senses which fields represent dates (yyyy-mm-dd format) and converts them to R Date variables. The inputs are the files created by REDCap for export to R: the .csv file with the data, and the .R file with R code to apply meta data. The function returns a data frame. To get access to the function use <highlight> require(Hmisc) getRs('importREDCap.r', put='source') # runs source() to define the function </highlight> The source code for the function may be inspected at https://github.com/harrelfe/rscripts/blob/master/importREDCap.r
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Edit
w
iki text
|
M
ore topic actions
Topic revision: r4 - 18 Jan 2016,
FrankHarrell
Main
Department Home Page
Biostatistics Graduate Program
Vanderbilt University Medical Center
Main Web
Main Web Home
Search
Recent Changes
Changes
Topic list
Biostatistics Webs
Archive
Main
Sandbox
System
Register
|
Log In
Copyright © 2013-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki?
Send feedback