# \donttest{
# step 1: create a database using bidsify with db_enabled = TRUE
# (This example assumes you have already run bidsify to create a database)
# temp dir for testing
temp_dir <- tempdir()
# step 2: connect to eyeris DB (will fail gracefully if no DB exists)
tryCatch({
con <- eyeris_db_connect(temp_dir)
tables <- eyeris_db_list_tables(con)
# read timeseries data for a specific subject
data <- eyeris_db_read(con, data_type = "timeseries", subject = "001")
# close connection when done
eyeris_db_disconnect(con)
}, error = function(e) {
message("No eyeris DB found - create one first with bidsify(db_enabled = TRUE)")
})
# }
Run the code above in your browser using DataLab