Learn R Programming

redcapAPI (version 2.10.0)

surveyMethods: Export Survey Participant Information

Description

These methods enable the user to export information relating to survey participants.

Usage

exportSurveyParticipants(rcon, instrument, event, ...)

exportSurveyLink(rcon, record, instrument, event, repeat_instance = 1, ...)

exportSurveyQueueLink(rcon, record, ...)

exportSurveyReturnCode( rcon, record, instrument, event, repeat_instance = 1, ... )

# S3 method for redcapApiConnection exportSurveyParticipants(rcon, instrument = NULL, event = NULL, ...)

# S3 method for redcapApiConnection exportSurveyLink( rcon, record, instrument, event = NULL, repeat_instance = 1, ... )

# S3 method for redcapApiConnection exportSurveyQueueLink(rcon, record, ...)

# S3 method for redcapApiConnection exportSurveyReturnCode( rcon, record, instrument, event = NULL, repeat_instance = 1, ... )

Value

exportSurveyParticipants returns a data frame with the columns:

emailThe e-mail address of the participant.
email_occurrenceThe number of times the invitation has been sent (after the next invite).
identifierParticipant identifier (if it exists) to match the survey response to a participant.
recordRecord ID of the participant.
invitation_sent_statusBoolean value indicating if a survey invitation has been sent.
invitation_send_timeDate/time the survey invitation was sent.
response_statusBoolean value indicating if the participant has responded.
survey_access_codeThe participant's survey access code.
survey_linkThe participant's survey link.
survey_queue_linkThe participants' survey queue link.

exportSurveyLink returns a character(1) giving the link for the user to access the survey form.

exportSurveyQueueLink returns a character(1) giving the survey queue link for the user.

exportSurveyReturnCode returns a character(1) giving the survey return code for the user.

Arguments

rcon

A redcapConnection object.

record

character(1) or integerish(1). The record ID of a survey participant.

instrument

character(1). The name of a survey instrument.

event

character(1) The event name of the event for which participant information should be exported.

repeat_instance

integerish(1). The repeat instance if the instrument is designated as a repeating instrument. Default value is 1.

...

Arguments to pass to other methods

Functions

  • exportSurveyParticipants(): Export survey participants for a survey instrument.

  • exportSurveyLink(): Export a survey participant's survey instrument link.

  • exportSurveyQueueLink(): Export a survey participant's survey queue link.

  • exportSurveyReturnCode(): Export a survey participant's instrument return code.

Examples

Run this code
if (FALSE) {
unlockREDCap(connections = c(rcon = "project_alias"), 
             url = "your_redcap_url", 
             keyring = "API_KEYs", 
             envir = globalenv())
             
# Export survey participants
exportSurveyParticipants(rcon, 
                         instrument = "survey_form")
                         
# Export survey participants for an event
exportSurveyParticipants(rcon, 
                         instrument = "survey_form", 
                         event = "event_1_arm_1")
                         
# Export survey link
exportSurveyLink(rcon, 
                 record = 1, 
                 instrument = "survey_form")
                 
# Export survey queue link
exportSurveyQueueLink(rcon, 
                      record = 1)
                      
# Export survey return code
exportSurveyReturnCode(rcon, 
                       user = 1, 
                       instrument = "survey_form")
}

Run the code above in your browser using DataLab