download_stimuli | R Documentation |
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.
download_stimuli(
con,
local_base_dir = "stimulus_data",
datasets = c(),
skip_existing = T
)
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 |
Returns the stimulus df with an additional column for the paths of the downloaded stimuli
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.