Skip to contents

[Stable]

Usage

get_processed_files(db)

Arguments

db

A database connection, as created by create_db().

Value

A data frame containing the file_name, participant_id, and study_id of the processed files.

Examples

# Create a database
db <- create_db(tempdir(), "mydb.db")

# Add some processed files
DBI::dbExecute(db, "INSERT INTO Study VALUES('study1', 'data_format1')")
#> [1] 1
DBI::dbExecute(db, "INSERT INTO Participant VALUES('participant1', 'study1')")
#> [1] 1
DBI::dbExecute(db, "INSERT INTO ProcessedFiles VALUES('file1', 'participant1', 'study1')")
#> [1] 1

# Get the processed files
get_processed_files(db)
#>   file_name participant_id study_id
#> 1     file1   participant1   study1

# Cleanup
close_db(db)
file.remove(file.path(tempdir(), "mydb.db"))
#> [1] TRUE