download_stimuli: Download stimulus images from OSF for Peekbank repository

View source: R/peekbankr.R

download_stimuliR Documentation

Download stimulus images from OSF for Peekbank repository

Description

This function downloads stimulus images for selected Peekbank datasets from OSF. It retrieves stimulus metadata from a Peekbank database connection, constructs the full paths to the stimulus images on OSF, and downloads them to a local directory.

Usage

download_stimuli(
  con,
  local_base_dir = "stimulus_data",
  datasets = c(),
  skip_existing = T
)

Arguments

con

A database connection object created by connect_to_peekbank()

datasets

Character vector of dataset names to download stimuli for. If empty (default), downloads stimuli for all datasets.

skip_existing

skip downloading a file if a file with that name already exists in that path locally

Value

Returns the stimulus df with an additional column for the paths of the downloaded stimuli

Examples

## Not run: 
con <- connect_to_peekbank("2025.1")

# Download stimuli for all datasets
download_stimuli(con, local_base_dir = "stimulus_data")

# Download stimuli for specific datasets
download_stimuli(con, local_base_dir = "stimulus_data", datasets = c("reflook_v4", "reflook_socword"))

## End(Not run)


langcog/peekbankr documentation built on April 12, 2025, 2:46 p.m.