download_osf_files: Download a list of files from OSF and recreate folder...

View source: R/peekbankr.R

download_osf_filesR Documentation

Download a list of files from OSF and recreate folder structure locally

Description

Download a list of files from OSF and recreate folder structure locally

Usage

download_osf_files(
  file_paths,
  osf_node_id = "pr6wu",
  local_base_dir = "data",
  debug = F,
  skip_existing = TRUE
)

Arguments

file_paths

A character vector of file paths on OSF to download

osf_node_id

The OSF node ID where the files are stored (default: "pr6wu")

local_base_dir

Base directory to save files locally (default: here::here("data"))

debug

Logical, whether to print debugging information (default: TRUE)

skip_existing

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

Value

returns paths to downloaded files

Examples

## Not run: 
# Download multiple files from OSF
download_osf_files(
  file_paths = c(
    "lab1/raw_data/file1.csv",
    "lab2/processed_data/file2.csv"
  ),
  osf_node_id = "pr6wu"
)

## End(Not run)

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