Skip to contents

Data Processing and Results

Functions for handling survey results and data processing

formr_connect()
Connect to formr
formr_disconnect()
Disconnect from formr
formr_last_host()
Get the last specified host
formr_store_keys()
Store keys in keyring
formr_items()
Download items from formr
formr_item_displays()
Download detailed result timings and display counts from formr
formr_upload_items()
Upload new item table
formr_simulate_from_items()
Simulate data based on item table
formr_results()
Download processed, aggregated results from formr
formr_raw_results()
Download data from formr
formr_uploaded_files()
Download uploaded files from formr
formr_backup_files()
Backup uploaded files from formr
formr_post_process_results()
Processed, aggregated results
formr_aggregate()
Aggregate data based on item table
formr_recognise()
Recognise data types based on item table
formr_reverse()
Reverse items based on item table or a fallback_max
formr_run_structure()
Download run structure from formr
formr_user_detail()
Download random groups
formr_user_overview()
Download random groups
formr_shuffled()
Download random groups
formr_backup_study()
Backup a study
formr_backup_surveys()
Backup surveys

formr OAuth API and Connection

Functions for OAuth API access and connection management

formr_api_access_token()
Connect to formr API
formr_api_results()
Get result from formr
formr_api_session()
Get current API session Return or set URL in list form for formr API (if available)

Item Management

Functions for managing survey items, scales, and related operations

item()
get item from survey attribute
items()
get item list from survey attributes
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
as.data.frame(<formr_item_list>)
Transform formr_item_list into a data.frame for ease of use

Feedback and Plotting

Functions for visualization and feedback generation

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

Rendering and Markdown

Functions for rendering and markdown processing

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

Time and Messaging

Functions for time-related operations and messaging

in_time_window()
checks whether the current time is in a certain time window
next_day()
checks whether a new day has broken (date has increased by at least one day)
time_passed()
checks how much time has passed relative to the user's last action
text_message_clickatell()
Send text message via Clickatell
text_message_massenversand()
Send text message via Massenversand.de
text_message_twilio()
Send text message via Twilio
email_image()
generates valid email cids

Helper Functions

Utility functions and operators for common operations

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 formr.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.
rescue_attributes()
Rescue lost attributes
`%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
get_opencpu_rds()
pass in the url to the RDS representation of a openCPU session object, get the object