# Example 1: calculate response rates for the whole study
# Get example data
data(example_data)
# Calculate response rate for each participant
# We don't specify time_col, period_start or period_end.
# Response rates will be based on all the participant's data
response_rate <- response_rate(data = example_data,
valid_col = answered,
participant_col = participant)
# Example 2: calculate response rates for a specific time period
data(example_data)
# Calculate response rate for each participant between dates
response_rate <- response_rate(data = example_data,
valid_col = answered,
participant_col = participant,
time_col = sent,
period_start = '2024-05-15',
period_end = '2024-05-31')
# Get participants with a response rate below 0.5
response_rate[response_rate$response_rate < 0.5,]
Run the code above in your browser using DataLab