labvanced logoLabVanced
  • Research
    • Publications
    • Researcher Interviews
    • Use Cases
      • Developmental Psychology
      • Linguistics
      • Clinical & Digital Health
      • Educational Psychology
      • Cognitive & Neuro
      • Social & Personality
      • Arts Research
      • Sports & Movement
      • Marketing & Consumer Behavior
      • Economics
      • HCI / UX
      • Commercial / Industry Use
    • Labvanced Blog
    • Services
  • Technology
    • Feature Overview
    • Code-Free Study Building
    • Eye Tracking
    • Mouse Tracking
    • Generative AI Integration
    • Multi User Studies
    • More ...
      • Reaction Time/Precise Timing
      • Text Transcription
      • Heart Rate Detection (rPPG)
      • Emotion Detection
      • Questionnaires/Surveys
      • Experimental Control
      • Data Privacy & Security
      • Desktop App
      • Mobile App
  • Learn
    • Guide
    • Videos
    • Walkthroughs
    • FAQ
    • Release Notes
    • Documents
    • Classroom
  • Experiments
    • Cognitive Tests
    • Sample Studies
    • Public Experiment Library
  • Pricing
    • Licenses
    • Top-Up Recordings
    • Subject Recruitment
    • Study Building
    • Dedicated Support
    • Checkout
  • About
    • About Us
    • Contact
    • Downloads
    • Careers
    • Impressum
    • Disclaimer
    • Privacy & Security
    • Terms & Conditions
    • Third-Party Licenses
  • Appgo to app icon
  • Logingo to app icon
Learn
Guide
Videos
Walkthroughs
FAQ
Newsletter Archive
Documents
Classroom
  • 中國人
  • Deutsch
  • Français
  • Español
  • English
  • 日本語
Guide
Videos
Walkthroughs
FAQ
Newsletter Archive
Documents
Classroom
  • 中國人
  • Deutsch
  • Français
  • Español
  • English
  • 日本語
  • Guide
    • GETTING STARTED

      • Task Editor
      • Stimulus Presentation
      • Correctness of Response
      • Objects
      • Events
      • Variables
      • Task Wizard
      • Trial System
      • Study Design
        • Tasks
        • Blocks
        • Sessions
        • Groups
    • FEATURED TOPICS

      • Randomization & Balance
      • Eye Tracking
      • Questionnaires
      • Desktop App
      • Sample Studies
      • Participant Recruitment
      • API Access
        • REST API
        • Webhook API
        • WebSocket API
      • Other Topics

        • Precise Stimulus Timings
        • Multi User Studies
        • Head Tracking in Labvanced | Guide
    • MAIN APP TABS

      • Overview: Main Tabs
      • Dashboard
      • My Studies
      • Shared Studies
      • My Files
      • Experiment Library
      • My Account
      • License & Services
    • STUDY TABS

      • Overview: Study-Specific Tabs
      • Study Design
        • Tasks
        • Blocks
        • Sessions
        • Groups
      • Task Editor
        • Task Controls
        • The Trial System
        • Canvas and Page Frames
        • Objects
        • Object Property Tables
        • Variables
        • System Variables Tables
        • The Event System
        • Text Editor Functions
        • Eyetracking in a Task
        • Head Tracking in a Task
        • Multi-User Studies
      • Settings
      • Variables
      • Media
      • Texts & Translate
      • Launch & Participate
      • Subject Management
      • Dataview and Export
        • Dataview and Variable & Task Selection (OLD Version)
        • Accessing Recordings (OLD Version)
  • Videos
    • Video Overview
    • Getting Started in Labvanced
    • Creating Tasks
    • Element Videos
    • Events & Variables
    • Advanced Topics
  • Walkthroughs
    • Introduction
    • Stroop Task
    • Lexical Decision Task
    • Posner Gaze Cueing Task
    • Change Blindness Flicker Paradigm
    • Eye-tracking Sample Study
    • Infant Eye-tracking Study
    • Attentional Capture Study with Mouse Tracking
    • Rapid Serial Visual Presentation
    • ChatGPT Study
    • Eye Tracking Demo: SVGs as AOIs
    • Multi-User Demo: Show Subjects' Cursors
    • Gamepad / Joystick Controller- Basic Set Up
    • Desktop App Study with EEG Integration
    • Between-subjects Group Balancing and Variable Setup
  • FAQ
    • Features
    • Support Policy & Guidelines
    • Security & Data Privacy
    • Licensing
    • Precision of Labvanced
    • Programmatic Use & API
    • Using Labvanced Offline
    • Troubleshooting
    • Study Creation Questions
  • Newsletter Archive
  • Documents
  • Classroom

Data Frame Variables

A data frame variable holds tabular data in a spreadsheet-like structure: rows are entries and columns are variables, each of which can hold string, numeric, boolean, or file values. Data frames are not populated through participant responses. You upload a .csv file to load data into them, and the experiment reads from them at runtime using the event system.

Data frames are the standard tool in Labvanced for managing structured input: lists of stimuli, counterbalancing schedules, file-to-image mappings, and any other scenario where you need to feed rows of prepared data into your experiment one trial at a time.

When to use a data frame

Use a data frame any time your experiment needs to load pre-prepared, structured data rather than collecting values from participants.

  • You have a list of stimulus words, sentences, images, or audio files that should appear trial by trial
  • You need to counterbalance conditions across participants
  • You want to shuffle trial order at the start of an experiment and then read entries sequentially
  • You are loading OpenAI prompts, custom messages, or other string data from a prepared file

Setting up a data frame

Creating a data frame takes three steps: prepare your CSV, create the variable, and import the file.

Formatting your CSV

Each column in your CSV becomes one variable (column) in the data frame. Each row is one entry. If your first row contains column names, enable Use first row as header on import.

For file-based stimuli (images, audio), put the filenames in the relevant column. You can then use Map strings to files on import to link those names to uploaded files in your study.

Creating the data frame variable

  1. Open your study and go to the Variables tab in the left panel, or open the Variables panel tab in the task editor.
  2. Click + New Variable and set the Data Type to Data Frame.
  3. Click Save. The Data Frame Dialog opens.
The Data Frame Dialog in Labvanced, showing a data frame with four columns and four rows of numeric data.

Uploading your CSV

In the Data Frame Dialog, click Upload 2D CSV Data. A file picker opens. After you select your file, the Import Options dialog appears.

The Import Options dialog in Labvanced, showing checkboxes for Map strings to files, Use first row as header, and Transpose data.
OptionWhat it does
Map strings to filesTreats string values in the CSV as filenames and links them to files uploaded to your study
Use first row as headerUses the first row of your CSV as column names rather than data
Transpose dataUploads the data without transposing rows and columns

Click Ok to import. The data frame is populated with your CSV contents.

Editing a data frame

Once a data frame is created, you can extend it with new columns, edit individual cell values directly, or replace all contents with a fresh CSV upload.

Adding columns

To add a new column after the initial import, click Add variable / Column at the top of the Data Frame Dialog. This adds an empty column that you can name and configure. If the new column contains filenames, click Map all strings to files in the dialog afterward to link them to the uploaded files in your study.

Editing cell values

To edit individual cell values directly, enable the Edit Values checkbox in the Data Frame Dialog. Cells become editable in place. Disable the checkbox to return to the read-only view.

Using data frames in the event system

Data frames are read and written through the event system. Two actions in the Data Frame Operations category handle this.

Read from / Write to Data Frame Action

Use this action to read a row or column from the data frame into an array variable, or to write values back in.

Key parameters:

ParameterDescription
Data frame variableThe data frame to read from or write to
Read or WriteDirection of the operation
By row or columnWhether to read a full row or a full column
Index typeHow the row or column is selected: fixed value, variable, or last row
Index variableThe variable used as the index when Index type is set to variable
Output variableThe array variable where the result is stored

The most common pattern is: maintain a numeric counter variable that increments each trial, use it as the Index variable, and read the corresponding row into an array. Each element of the array then maps to one column of that row.

Shuffle Data Frame Entries Action

Use this action to randomize the order of rows or columns in the data frame. Run it once at the start of the experiment (triggered by a session-start event) before any trials begin.

Parameters:

ParameterDescription
Data frameThe data frame to shuffle
By rows or columnsWhether to shuffle the order of rows or columns

A common workflow: stimulus list per trial

A typical setup for reading one row of stimuli per trial:

  1. Upload a CSV with one row per trial and columns for each stimulus attribute (e.g., word, condition, correct_response).
  2. Create a numeric variable trial_index with a start value of 0 and Reset at Trial Start disabled.
  3. At experiment start, add a Shuffle Data Frame Entries action on your data frame (by rows).
  4. On each trial start, add a Read from / Write to Data Frame action: read by row, Index variable = trial_index, Output variable = an array variable (e.g., current_trial_data).
  5. After reading, increment trial_index by 1 using a Set / Record Variable arithmetic action.
  6. Use the array variable elements to set object properties or drive event logic for that trial.

Further reading

Variable Types

A reference for all six variable types and when to use each one.

Variable Properties

A full reference for every variable setting: data type, scale, format, start value, reset behavior, and recording options.

Data Frame Operations

The event system actions for reading from, writing to, and shuffling data frames at runtime.

Data Frame Patterns

How to apply data frames to common research designs: sequential stimulus presentation, counterbalancing, and file-based stimuli.

Randomization and Counterbalancing

How to use data frames, the trial system, and events to counterbalance and randomize your study.

Working with Variables

The hub page for the working-with-variables section: types, properties, recording options, and data frames.