Return a javascript function to save data locally

save_locally()

Value

A javascript function to save data locally

Details

The purpose of the save_locally() is to return a javascript function that, when called from within the jsPsych experiment, will write the data to a CSV file on the local machine (in the data folder associated with the experiment). The intention is that when an experiment is to be deployed locally (i.e., using the run_locally() function to run the experiment using an R server on the local machine), the save_locally() function provides the mechanism for saving the data. If the goal is simply to save the data set at the end of the experiment, the easiest way to do this is when building the experiment using build_experiment(). Specifically, the method for doing this is to include the argument on_finish = save_locally() as part of the call to build_experiment().

See also