a secure web application for building and managing online surveys and databases. While REDCap can be used to collect virtually any type of data in any environment, it is specifically geared to support online and offline data capture for research studies and operations. Use this tag when developing a REDCap project, developing a REDCap External Module, or exchanging data through its API. https://www.project-redcap.org/
Questions tagged [redcap]
119 questions
16
votes
2 answers
bind_rows of different data types
I'd like to stack a list of data.frames, but sometimes the columns have different data types. I'd like the operation to coerce to the lowest common denominator (which is usually character in my case).
This stacking occurs inside a package function…

wibeasley
- 5,000
- 3
- 34
- 62
16
votes
4 answers
data collection for statistics: from web to a database
I'm a statistician by trade and I'd like some recommendations on how to set up a website that can collect data into a database. For personal use, I use Google Forms to collect data, and everything gets populated into a spreadsheet. However, this…

Vinh Nguyen
- 1,014
- 1
- 9
- 19
4
votes
3 answers
Editing a .r file from within another .r file
I am trying to make my current project reproducible, and so am creating a master document (eventually a .rmd file) that will be used to call and execute several other documents. This way myself and other investigators only need to open and run one…

Carolyn W Clayton
- 93
- 8
3
votes
1 answer
REDCap automatically populate fields from earlier records
I want to populate a dropdown menu with what was inserted in that field in early records (not forms with piping).
Specifically, I have a field named "Journal". If someone before recorded the journal "Metabolomics", I want it to appear in the…

Luca Vedovelli
- 33
- 4
3
votes
3 answers
Trying to extract a date from a 5 or 6-digit number
I am trying to extract a date from a number. The date is stored as the first 6 digits of a 11-digit personal ID-number (date-month-year). Unfortunately the cloud-based database (REDCap) output of this gets formatted as a number, so that the leading…

Bjorn Blomberg
- 51
- 1
- 5
3
votes
1 answer
cannot load redcapAPI package
I have been using redcapAPI package for sometime now to manage my dataset in REDCap. A few days ago, it started presenting some persistent error below
library(redcapAPI)
Error: package or namespace load failed for ‘redcapAPI’:
object…

Christopher
- 83
- 8
3
votes
1 answer
Parsing back to 'messy' API strcuture
I'm fetching data from an online database (REDCap) via API and the data gets delivered in as comma separated string like this,
RAW.API <-…

Eric Fail
- 8,191
- 8
- 72
- 128
2
votes
2 answers
How to use exportRecordsTyped function from the redcapAPI package to import the data without factors?
I had previously used the following code to import data from REDCap:
data.df <- redcapAPI::exportRecords(rcon,
forms = c("setup_log"),
labels = FALSE,
factors =…

Shannon
- 33
- 7
2
votes
2 answers
Apply a branching logic for an entire section in a REDCap instrument
How can I apply a branching logic for an entire section. At present, I have to do it to individual questions within the section.

franklwambo19
- 169
- 6
2
votes
1 answer
How can I make randomization automatic on REDCap?
I am running a survey on REDCap where participants need to be assigned to one of three groups before receiving a group-specific intervention to reduce their smartphone use (e.g., 1 - intervention one, 2 - intervention 2, 3 - intervention 3). I have…

Dasha Sandra
- 33
- 2
2
votes
1 answer
How to automatically select a categorical variable based on calculated number in REDCap?
I am creating a REDCap tool which gives patients a numerical acuity score based on their medical history. Each numerical score also corresponds to a color code (Green 1-3, Yellow 4-6, Red 7+) that nurses use. Is there a way to automatically display…

Lucy Ranieri
- 21
- 1
2
votes
1 answer
Calculated fields- Formula using number e
Not sure if possible, but here's a working version of a form I want to reproduce in Redcap- http://extubation.net/
Provided equation that is calculated-
Gestational age, oxygen, respiratory score, day of life, pH, and weight at extubation are the…

RickP
- 67
- 6
2
votes
1 answer
How to Autofill REDCap Checkboxes Based on Previous Checkbox Results in Same Instrument
I want to automatically fill survey checkboxes based on results from a previous field in the same instrument. For my example, if respondents are using the red kit of tools, I want them to select yes in the initial toolkit question, so the subsequent…

Warren
- 21
- 2
2
votes
1 answer
Pandas apply rowwise function on multiple columns
I have a dataframe and a function that I want to apply on multiple columns via pandas.apply. Currently I am doing so using a for loop, which I would like to replace with a single line of code.
This is my dataframe:
d1 = {'id': [1, 1, 2], 'event':…

phoebe_albeduddel
- 41
- 7
2
votes
1 answer
Custom validation REDCap hook
I want to add a custom validation for a Textbox field in REDCap for all surveys and created forms, via a REDCap hook
How can a custom validation be added to REDCap Designer to be able to use that custom validation for Textbox fields in forms and…

Matias Haeussler
- 1,061
- 2
- 12
- 25