Top level

These are the top-level functions used to launch a psychTestR test.

make_test()

Make psychTestR test

test_options()

Test options

display_options()

Display options

Timelines

Timelines are sequences of test elements that define a psychTestR test.

as.timeline()

Coerce to timeline

is.timeline()

Is it a timeline object?

join()

Join test elements

new_timeline()

New timeline

new_results_section()

New results section

timeline

Timeline

Modules

Modules group test elements into self-contained units.

module()

Create module

begin_module()

Begin module

end_module()

End module

Fundamental test elements

There are three fundamental types of test elements: pages, reactive pages, and code blocks.

is.test_element()

Is object a test element?

code_block()

Code block

reactive_page()

Reactive page

page()

New page

Control logic

By default, psychTestR steps through the list of test elements one by one. These control logic functions provide more complex behaviour.

conditional()

Conditional test block

loop_while()

Deprecated functions in package psychTestR.

order_at_run_time()

Order at run time

randomise_at_run_time()

Randomise at run time

skip_n_pages()

Skip pages

while_loop()

While loop

Answers

At a given point in the test, the answer variable corresponds to the participant’s most recent response.

`answer<-`()

Answer

answer()

Answer

Results

During a psychTestR session, a results variable accumulates, incrementally storing the participant’s results during the test.

elt_save_results_to_disk()

Save results to disk (test element version)

get_results()

Get results

`results<-`()

Set results

results()

Access results

save_result()

Save result

save_results_to_disk()

Save results to disk

Pre-made pages

These functions define several pre-made page types that may be useful in test development, either for direct use, or for reference when constructing a new page type.

audio_NAFC_page()

Make NAFC audio page

basic_demographics_default_intro()

Default demographics introduction

dropdown_page()

Make dropdown list page

final_page()

New final page

finish_test_and_give_code()

Finish test and give code

get_basic_demographics()

Get basic demographics

get_p_id()

Get participant ID

NAFC_page()

New NAFC page

one_button_page()

New one-button page

slider_page()

Slider page

text_input_page()

Text input page

video_NAFC_page()

Make NAFC video page

volume_calibration_page()

Make volume calibration page

UI constructors

These are helper functions for constructing new page types.

make_ui_NAFC()

Make NAFC buttons

trigger_button()

Trigger button

Global and local variables

These functions support the creation and manipulation of global and local variables specific to a participant’s testing session.

get_global() set_global() get_local() set_local() assert_global_is_null()

Global and local variables

Automated testing

These functions support automated testing of psychTestR experiments.

AppTester

App tester

Errors

These functions support displaying errors to the participant.

display_error()

Display a popup error message

`error<-`()

Error

error()

Error

Internationalisation

These functions are used for creating tests that support multiple languages.

i18n()

Translate

i18n_dict

Dictionary

Test opening/closing

These functions are used for closing and opening tests, for example, when a participant quota has been reached.

close_test()

Close test

open_test()

Open test

is_test_closed()

Is test closed?

URL parameters

These functions are used for accessing and manipulating URL parameters.

get_url_params()

Get URL parameters

set_url_param()

Set a URL parameter

Session info

These functions provide information about the current testing session.

get_session_info()

Get session info

get_supplementary_results_dir()

Supplementary results directory

p_id()

Get participant ID

Demos

These functions are for demonstration purposes.

demo()

Demo

demo_options()

Demo options

demo.get_url_params()

Demo: Getting URL parameters

demo.set_url_params()

Demo: Getting URL parameters

Expert use

These are miscellaneous functions that are unlikely to be useful to most users.

check_dirs()

Check directories

register_next_results_section()

Register next results section

test_permissions()

Test write permissions

with_i18n_state()

With i18n state

Misc.

Miscellaneous other functions.

imports

Objects imported from other packages

Deprecated

These are functions that are supported for backwards compatibility, but whose use are not encouraged.

pt_options()

Alias for test_options()