Skip to contents

Setup & Authentication

Connect to formr using the API or classic authentication

formr_store_keys()
Store Credentials in Keyring
formr_api_authenticate()
Authenticate with formr
formr_api_logout()
Revoke Access Token (Logout)
formr_api_session()
Get Current API session
formr_api_is_authenticated()
Check if currently authenticated
formr_api_token_expiry()
Get token expiry information
formr_connect()
Connect to formr
formr_disconnect()
Disconnect from formr
formr_last_host()
Get the last specified host
formr_default_dir()
Get or set the default directory for downloads and backups
.formr
Per-request environment populated by rforms.org

API - Project Management

Tools for managing runs and syncing local files with the server

formr_api_pull_project()
Pull Project from Server Scaffolds folder structure if missing, then overwrites local files with Server state.
formr_api_push_project()
Push Project to Server
formr_api_backup_run()
Backup a study

API - Runs & Sessions

Manage runs, create sessions, and perform actions

formr_api_runs()
List all runs
formr_api_create_run()
Create a new run
formr_api_run_settings()
Get or Update Run Settings
formr_api_run_structure()
Get or Update Run Structure (Run Units)
formr_api_delete_run()
Delete a Run
formr_api_sessions()
List Sessions in a Run
formr_api_create_session()
Create Session(s)
formr_api_session_action()
Perform Action on Session(s)
formr_api_unit_sessions()
List Per-Unit Sessions in a Run
formr_overview_sankey()
Render a participant-flow Sankey for an overview script

API - Surveys & Files

Upload and manage survey structures and attached files

formr_api_surveys()
List Surveys
formr_api_survey_structure()
Get Survey Structure (Items)
formr_api_upload_survey()
Upload/Update Survey
formr_api_delete_survey()
Delete a Survey
formr_api_files()
List files attached to a run
formr_api_upload_file()
Upload File(s) to Run
formr_api_delete_file()
Delete file(s) from a run
formr_api_delete_all_files()
Delete ALL files attached to a run

API - Results

Fetch, recognize, and process results using the new pipeline

formr_api_results()
Get and Process Run Results
formr_api_fetch_results()
Lower-level API Result Fetcher
formr_api_recognise()
Apply Type Definitions and Labels
formr_api_reverse()
Reverse Items and Update Labels
formr_api_aggregate()
Aggregate Scales
summary(<formr_results>)
Summarize Processing History

Classic formr Functions

Classic functions for retrieving data

formr_results()
Download processed, aggregated results from formr
formr_raw_results()
Download data from formr
formr_post_process_results()
Processed, aggregated results
formr_recognise()
Recognise data types based on item table
formr_aggregate()
Aggregate data based on item table
formr_reverse()
Reverse items based on item table or a fallback_max
formr_items()
Download items from formr
formr_item_displays()
Download detailed result timings and display counts from formr
formr_uploaded_files()
Download uploaded files from formr
formr_shuffled()
Download random groups
formr_user_detail()
Download random groups
formr_user_overview()
Download random groups
formr_backup_study()
Backup a study
formr_backup_surveys()
Backup surveys
formr_backup_files()
Backup uploaded files from formr
formr_upload_items()
Upload new item table
formr_run_structure()
Download run structure from formr
formr_simulate_from_items()
Simulate data based on item table

Feedback & Plotting

Generate feedback plots and text for participants

qplot_on_normal()
Plot a normed value on the standard normal
qplot_on_bar()
Plot normed values as a barchart
qplot_on_polar()
Time-polar plot
feedback_chunk()
Text feedback based on groups
email_image()
generates valid email cids

RMarkdown & Rendering

Helpers for rendering RMarkdown within formr

formr_render()
render text for formr
formr_render_commonmark()
render inline text for formr
formr_inline_render()
render inline text for formr
formr_knit()
knit rmarkdown to markdown for formr
asis_knit_child()
knit_child as is
knit_prefixed()
knit prefixed
markdown_custom_options()
custom markdown options for rmarkdown's pandoc
markdown_github()
github_markdown for rmarkdown
markdown_hard_line_breaks()
hard line breaks
render_text()
render text
word_document()
word_document from rmarkdown, but has an added option not to break on error
paste.knit_asis()
paste.knit_asis
print(<knit_asis>)
Print new lines in knit_asis outputs

Helpers & Shorthands

Utility functions for writing survey logic

first()
Gives the first non-missing element
last()
Gives the last non-missing element
current()
Gives the last element, doesn't omit missings
finished()
How many surveys were finished?
expired()
How many surveys were expired?
if_na()
Replace NA values with something else
if_na_null()
This function makes sure you know what to expect when evaluating uncertain results in an if-clause. In most cases, you should not use this function, because it can lump a lot of very different cases together, but it may have some use for fool-proofing certain if-clauses on rforms.org, where a field in a survey may either not exist, be missing or have a value to check.
ifelsena()
Like ifelse(), but allows you to assign a third value to missings.
time_passed()
checks how much time has passed relative to the user's last action
next_day()
checks whether a new day has broken (date has increased by at least one day)
in_time_window()
checks whether the current time is in a certain time window
`%contains%`
check whether a character string contains another
`%contains_word%`
check whether a character string contains another as a word
`%begins_with%`
check whether a character string begins with a string
`%ends_with%`
check whether a character string ends with a string
random_date_in_range()
Random date in range

Data Wrangling

Internal utilities for item and scale manipulation

aggregate_and_document_scale()
Aggregate variables and remember which variables this were
choice_labels_for_values()
switch choice values with labels
reverse_labelled_values()
Reverse labelled values
rescue_attributes()
Rescue lost attributes
item()
get item from survey attribute
items()
get item list from survey attributes
as.data.frame(<formr_item_list>)
Transform formr_item_list into a data.frame for ease of use
as.data.frame(<formr_api_run_structure>)
Convert formr run structure to data.frame
print(<formr_api_run_structure>)
Print method for formr run structure
get_opencpu_rds()
pass in the url to the RDS representation of a openCPU session object, get the object

Text Messaging

Integrations with SMS providers

text_message_twilio()
Send text message via Twilio
text_message_clickatell()
Send text message via Clickatell
text_message_massenversand()
Send text message via Massenversand.de